Package org.apache.airavata.commons.gfac.type

Examples of org.apache.airavata.commons.gfac.type.ApplicationDescription


        Assert.assertTrue(airavataAPI.getApplicationManager().isServiceDescriptorExists(
                serviceDescription.getType().getName()));

        // Deployment descriptor
        ApplicationDescription applicationDeploymentDescription = descriptorBuilder
                .buildApplicationDeploymentDescription("EchoApplication", "/bin/echo", "/tmp");

        log("Adding deployment description ...");
        try {
            airavataAPI.getApplicationManager().addApplicationDescription(serviceDescription, hostDescription,
                    applicationDeploymentDescription);
            Assert.fail("Application Descriptor should already exists and should go to update.");
        } catch (DescriptorRecordAlreadyExistsException e) {

            log("Updating application description ....");
            airavataAPI.getApplicationManager().updateApplicationDescription(serviceDescription, hostDescription,
                    applicationDeploymentDescription);
        }

        Assert.assertTrue(airavataAPI.getApplicationManager().isApplicationDescriptorExists(
                serviceDescription.getType().getName(), hostDescription.getType().getHostName(),
                applicationDeploymentDescription.getType().getApplicationName().getStringValue()));

        log("Saving workflow ...");
        Workflow workflow = new Workflow(getWorkflowComposeContent("src/test/resources/EchoWorkflow.xwf"));

        try {
View Full Code Here


        else {
          //TODO
        }


        ApplicationDescription applicationDeploymentDescription = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
        ApplicationDeploymentDescriptionType app = applicationDeploymentDescription.getType();
        GridFtp ftp = new GridFtp();

        try {
            GSSCredential gssCred = ((GSISecurityContext)jobExecutionContext.getSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT)).getGssCredentails();
View Full Code Here

            HostDescription registeredHost = getRegisteredHost(airavataAPI, this.serviceName);
            // if user specify a host, no matter what we pick that host for all the nodes, todo: allow users to specifi node specific host
            if(hostName != null) {
                registeredHost = airavataAPI.getApplicationManager().getHostDescription(hostName);
            }
            ApplicationDescription applicationDescription = airavataAPI.getApplicationManager().getApplicationDescription(serviceName, registeredHost.getType().getHostName());

            // When we run getInParameters we set the actualParameter object, this has to be fixed
            URL resource = EmbeddedGFacInvoker.class.getClassLoader().getResource("gfac-config.xml");
            OMElement inputMessage = getInParameters();
            Object wsifMessageElement = new WSIFMessageElement(XMLUtil.stringToXmlElement3(inputMessage.toStringWithConsume()));
View Full Code Here

            if (!airavataRegistry.isHostDescriptorExists(hostdescName)) {
                Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
                builder.entity("Given host does not exist...");
                return builder.build();
            }
            ApplicationDescription applicationDescription = DescriptorUtil.createApplicationDescription(applicationDescriptor);
            ServiceDescriptor serviceDescriptor = applicationDescriptor.getServiceDescriptor();
            String serviceName;
            if (serviceDescriptor != null) {
                if (serviceDescriptor.getServiceName() == null) {
                    serviceName = applicationDescriptor.getName();
View Full Code Here

            if (!airavataRegistry.isHostDescriptorExists(hostdescName)) {
                Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
                builder.entity("Host does not available...");
                return builder.build();
            }
            ApplicationDescription applicationDescription = DescriptorUtil.createApplicationDescription(applicationDescriptor);
            ServiceDescriptor serviceDescriptor = applicationDescriptor.getServiceDescriptor();
            String serviceName;
            if (serviceDescriptor != null) {
                if (serviceDescriptor.getServiceName() == null) {
                    serviceName = applicationDescriptor.getName();
View Full Code Here

    public Response getApplicationDescriptor(@QueryParam("serviceName") String serviceName,
                                             @QueryParam("hostName") String hostName,
                                             @QueryParam("applicationName") String applicationName) {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            ApplicationDescription applicationDescription = airavataRegistry.getApplicationDescriptor(serviceName, hostName, applicationName);
            if (applicationDescription != null) {
                ApplicationDescriptor applicationDescriptor = DescriptorUtil.createApplicationDescriptor(applicationDescription);
                applicationDescriptor.setHostdescName(hostName);
                ServiceDescription serviceDescription = airavataRegistry.getServiceDescriptor(serviceName);
                ServiceDescriptor serviceDescriptor = DescriptorUtil.createServiceDescriptor(serviceDescription);
View Full Code Here

    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response getApplicationDescriptorPerServiceHost(@QueryParam("serviceName") String serviceName,
                                                           @QueryParam("hostName") String hostName) {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            ApplicationDescription applicationDescription = airavataRegistry.getApplicationDescriptors(serviceName, hostName);
            ApplicationDescriptor applicationDescriptor = DescriptorUtil.createApplicationDescriptor(applicationDescription);
            applicationDescriptor.setHostdescName(hostName);
            ServiceDescription serviceDescription = airavataRegistry.getServiceDescriptor(serviceName);
            ServiceDescriptor serviceDescriptor = DescriptorUtil.createServiceDescriptor(serviceDescription);
            applicationDescriptor.setServiceDescriptor(serviceDescriptor);
View Full Code Here

            Map<String, ApplicationDescription> applicationDeploymentDescriptionMap = airavataRegistry.getApplicationDescriptors(serviceName);
            ApplicationDescriptorList applicationDescriptorList = new ApplicationDescriptorList();
            ApplicationDescriptor[] applicationDescriptors = new ApplicationDescriptor[applicationDeploymentDescriptionMap.size()];
            int i = 0;
            for (String hostName : applicationDeploymentDescriptionMap.keySet()) {
                ApplicationDescription applicationDescription = applicationDeploymentDescriptionMap.get(hostName);
                ApplicationDescriptor applicationDescriptor = DescriptorUtil.createApplicationDescriptor(applicationDescription);
                applicationDescriptor.setHostdescName(hostName);

                ServiceDescription serviceDescription = airavataRegistry.getServiceDescriptor(serviceName);
                ServiceDescriptor serviceDescriptor = DescriptorUtil.createServiceDescriptor(serviceDescription);
View Full Code Here

            Map<String[], ApplicationDescription> applicationDeploymentDescriptionMap = airavataRegistry.getApplicationDescriptors();
            ApplicationDescriptorList applicationDescriptorList = new ApplicationDescriptorList();
            ApplicationDescriptor[] applicationDescriptors = new ApplicationDescriptor[applicationDeploymentDescriptionMap.size()];
            int i = 0;
            for (String[] descriptors : applicationDeploymentDescriptionMap.keySet()) {
                ApplicationDescription applicationDescription = applicationDeploymentDescriptionMap.get(descriptors);
                ApplicationDescriptor applicationDescriptor = DescriptorUtil.createApplicationDescriptor(applicationDescription);
                applicationDescriptor.setHostdescName(descriptors[1]);
                ServiceDescription serviceDescription = airavataRegistry.getServiceDescriptor(descriptors[0]);
                if (serviceDescription == null) {
                    Response.ResponseBuilder builder = Response.status(Response.Status.NO_CONTENT);
View Full Code Here

        try {
            Map<String[], ApplicationDescription> applicationDeploymentDescriptionMap = airavataRegistry.getApplicationDescriptors();
            DescriptorNameList descriptorNameList = new DescriptorNameList();
            List<String> appDesNames = new ArrayList<String>();
            for (String[] descriptors : applicationDeploymentDescriptionMap.keySet()) {
                ApplicationDescription applicationDescription = applicationDeploymentDescriptionMap.get(descriptors);
                appDesNames.add(applicationDescription.getType().getApplicationName().getStringValue());
            }
            descriptorNameList.setDescriptorNames(appDesNames);
            if (applicationDeploymentDescriptionMap.size() != 0) {
                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
                builder.entity(descriptorNameList);
View Full Code Here

TOP

Related Classes of org.apache.airavata.commons.gfac.type.ApplicationDescription

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.