Package org.apache.aiaravata.application.catalog.data.resources

Examples of org.apache.aiaravata.application.catalog.data.resources.SshJobSubmissionResource


     * Returns a success/failure of the deletion.
     */
    @Override
    public boolean updateSSHJobSubmissionDetails(String jobSubmissionInterfaceId, SSHJobSubmission sshJobSubmission) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
      try {
            SshJobSubmissionResource submission = AppCatalogThriftConversion.getSSHJobSubmission(sshJobSubmission);
            submission.setJobSubmissionInterfaceId(jobSubmissionInterfaceId);
            submission.save();
            return true;
        } catch (AppCatalogException e) {
            logger.error("Error while adding job submission interface to resource compute resource...", e);
            AiravataSystemException exception = new AiravataSystemException();
            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
View Full Code Here


        }
        return resource;
    }
 
  private static Resource createSshJobSubmission(SshJobSubmission o) {
        SshJobSubmissionResource sshJobSubmissionResource = new SshJobSubmissionResource();
        if (o != null) {
            sshJobSubmissionResource.setResourceJobManagerId(o.getResourceJobManagerId());
            sshJobSubmissionResource.setResourceJobManagerResource((ResourceJobManagerResource) createResourceJobManager(o.getResourceJobManager()));
            sshJobSubmissionResource.setJobSubmissionInterfaceId(o.getJobSubmissionInterfaceId());
            sshJobSubmissionResource.setAlternativeSshHostname(o.getAlternativeSshHostname());
            sshJobSubmissionResource.setSecurityProtocol(o.getSecurityProtocol());
            sshJobSubmissionResource.setSshPort(o.getSshPort());
        }
        return sshJobSubmissionResource;
    }
View Full Code Here

    @Override
    public String addSSHJobSubmission(SSHJobSubmission sshJobSubmission) throws AppCatalogException {
        try {
          sshJobSubmission.setJobSubmissionInterfaceId(AppCatalogUtils.getID("SSH"));
        String resourceJobManagerId = addResourceJobManager(sshJobSubmission.getResourceJobManager());
        SshJobSubmissionResource resource = AppCatalogThriftConversion.getSSHJobSubmission(sshJobSubmission);
        resource.setResourceJobManagerId(resourceJobManagerId);
        resource.getResourceJobManagerResource().setResourceJobManagerId(resourceJobManagerId);
        resource.save();
          return resource.getJobSubmissionInterfaceId();
        }catch (Exception e) {
            logger.error("Error while saving SSH Job Submission...", e);
            throw new AppCatalogException(e);
        }
    }
View Full Code Here

//    }

    @Override
    public SSHJobSubmission getSSHJobSubmission(String submissionId) throws AppCatalogException {
        try {
            SshJobSubmissionResource resource = new SshJobSubmissionResource();
            resource = (SshJobSubmissionResource)resource.get(submissionId);
            return AppCatalogThriftConversion.getSSHJobSubmissionDescription(resource);
        }catch (Exception e){
            logger.error("Error while retrieving SSH Job Submission...", e);
            throw new AppCatalogException(e);
        }
View Full Code Here

TOP

Related Classes of org.apache.aiaravata.application.catalog.data.resources.SshJobSubmissionResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.