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

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


        assertNotNull("application descriptor retrieved successfully", description);
        registry.removeApplicationDescriptor("testService", "testHost", "testApplication");
    }

    public void testGetApplicationDescriptorsForService() throws Exception {
        ApplicationDeploymentDescription applicationDeploymentDescription = new ApplicationDeploymentDescription(ApplicationDeploymentDescriptionType.type);
        ApplicationDeploymentDescriptionType.ApplicationName applicationName = applicationDeploymentDescription.getType().addNewApplicationName();
        applicationName.setStringValue("testApplication");
        applicationDeploymentDescription.getType().setApplicationName(applicationName);
        applicationDeploymentDescription.getType().setInputDataDirectory("/bin");
        applicationDeploymentDescription.getType().setExecutableLocation("/bin/echo");
        applicationDeploymentDescription.getType().setOutputDataDirectory("/tmp");

        registry.addApplicationDescriptor("testService", "testHost1", applicationDeploymentDescription);
        registry.addApplicationDescriptor("testService", "testHost2", applicationDeploymentDescription);

        Map<String,ApplicationDeploymentDescription> applicationDescriptors = registry.getApplicationDescriptors("testService");
View Full Code Here


        registry.removeApplicationDescriptor("testService", "testHost2", "testApplication");
    }


    public void testGetApplicationDescriptors() throws Exception {
        ApplicationDeploymentDescription applicationDeploymentDescription = new ApplicationDeploymentDescription(ApplicationDeploymentDescriptionType.type);
        ApplicationDeploymentDescriptionType.ApplicationName applicationName = applicationDeploymentDescription.getType().addNewApplicationName();
        applicationName.setStringValue("testApplication");
        applicationDeploymentDescription.getType().setApplicationName(applicationName);
        applicationDeploymentDescription.getType().setInputDataDirectory("/bin");
        applicationDeploymentDescription.getType().setExecutableLocation("/bin/echo");
        applicationDeploymentDescription.getType().setOutputDataDirectory("/tmp");

        registry.addApplicationDescriptor("testService", "testHost1", applicationDeploymentDescription);
        registry.addApplicationDescriptor("testService", "testHost2", applicationDeploymentDescription);

        Map<String[], ApplicationDeploymentDescription> applicationDescriptors = registry.getApplicationDescriptors();
View Full Code Here

    }


    public void testRemoveApplicationDescriptor() throws Exception {
        ApplicationDeploymentDescription applicationDeploymentDescription = new ApplicationDeploymentDescription(ApplicationDeploymentDescriptionType.type);
        ApplicationDeploymentDescriptionType.ApplicationName applicationName = applicationDeploymentDescription.getType().addNewApplicationName();
        applicationName.setStringValue("testApplication");
        applicationDeploymentDescription.getType().setApplicationName(applicationName);
        applicationDeploymentDescription.getType().setInputDataDirectory("/bin");
        applicationDeploymentDescription.getType().setExecutableLocation("/bin/echo");
        applicationDeploymentDescription.getType().setOutputDataDirectory("/tmp");

        registry.addApplicationDescriptor("testService", "testHost", applicationDeploymentDescription);
        registry.removeApplicationDescriptor("testService", "testHost", "testApplication");

        assertFalse("application descriptor removed successfully", registry.isApplicationDescriptorExists("testService", "testHost", "testApplication"));
View Full Code Here

        } catch (RepositoryException e) {
            fail("Failed creating the JCR Registry");
        }

        HostDescription host = createHostDescription();
        ApplicationDeploymentDescription appDesc = createAppDeploymentDescription();
        ServiceDescription serv = createServiceDescription();

        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
        InputParameterType input = InputParameterType.Factory.newInstance();
        input.setParameterName("echo_input");
View Full Code Here

        serv.getType().setName("SimpleEcho");
        return serv;
    }

    private ApplicationDeploymentDescription createAppDeploymentDescription() {
        ApplicationDeploymentDescription appDesc = new ApplicationDeploymentDescription();
        ApplicationDeploymentDescriptionType app = appDesc.getType();
        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory
                .newInstance();
        name.setStringValue("EchoLocal");
        app.setApplicationName(name);
        app.setExecutableLocation("/bin/echo");
View Full Code Here


    /*
     * App
     */
    ApplicationDeploymentDescription appDesc = new ApplicationDeploymentDescription();
    ApplicationDeploymentDescriptionType app = appDesc.getType();
    ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
    name.setStringValue("EchoLocal");
    app.setApplicationName(name);
    app.setExecutableLocation("/bin/echo");
    app.setScratchWorkingDirectory("/tmp");
View Full Code Here

    host.getType().setHostAddress("localhost");

    /*
     * App
     */
    ApplicationDeploymentDescription appDesc = new ApplicationDeploymentDescription();
    ApplicationDeploymentDescriptionType app = appDesc.getType();
    ApplicationName name = ApplicationName.Factory.newInstance();
    name.setStringValue("EchoLocal");
    app.setApplicationName(name);
   
    /*
 
View Full Code Here

        host.getType().setHostAddress(properties.getProperty("host.fqdn.name"));
        ((GlobusHostType) host.getType()).setGridFTPEndPointArray(new String[]{properties.getProperty("gridftp.endpoint")});
        ((GlobusHostType) host.getType()).setGlobusGateKeeperEndPointArray(new String[]{properties.getProperty("gram.endpoints")});

        /* Application */
        ApplicationDeploymentDescription appDesc = new ApplicationDeploymentDescription(GramApplicationDeploymentType.type);
        GramApplicationDeploymentType app = (GramApplicationDeploymentType) appDesc.getType();
        app.setCpuCount(1);
        app.setNodeCount(1);
        ApplicationDeploymentDescriptionType.ApplicationName name = appDesc.getType().addNewApplicationName();
        name.setStringValue("EchoMPILocal");
        app.setExecutableLocation("/share/home/01437/ogce/airavata-test/mpi-hellow-world");
        app.setScratchWorkingDirectory(properties.getProperty("scratch.working.directory"));
        app.setCpuCount(16);
        app.setJobType(MigrationUtil.getJobTypeEnum("MPI"));
        //app.setMinMemory();
        ProjectAccountType projectAccountType = ((GramApplicationDeploymentType) appDesc.getType()).addNewProjectAccount();
        projectAccountType.setProjectAccountNumber(properties.getProperty("allocation.charge.number"));

        /* Service */
        ServiceDescription serv = new ServiceDescription();
        serv.getType().setName("SimpleMPIEcho");
View Full Code Here

        host.getType().setHostAddress(properties.getProperty("host.fqdn.name"));
        ((GlobusHostType) host.getType()).setGridFTPEndPointArray(new String[]{properties.getProperty("gridftp.endpoint")});
        ((GlobusHostType) host.getType()).setGlobusGateKeeperEndPointArray(new String[]{properties.getProperty("gram.endpoints")});

        /* Application */
        ApplicationDeploymentDescription appDesc = new ApplicationDeploymentDescription(GramApplicationDeploymentType.type);
        GramApplicationDeploymentType app = (GramApplicationDeploymentType) appDesc.getType();
        app.setNodeCount(1);
        ApplicationDeploymentDescriptionType.ApplicationName name = appDesc.getType().addNewApplicationName();
        name.setStringValue("MockPwscfMPI");
        app.setExecutableLocation("/share/home/01437/ogce/airavata-test/applications/MockPwscf/pwscf.w");
        app.setScratchWorkingDirectory(properties.getProperty("scratch.working.directory"));
        app.setStaticWorkingDirectory("/share/home/01437/ogce/airavata-test/applications/MockPwscf");
        app.setCpuCount(4);
        app.setJobType(MigrationUtil.getJobTypeEnum("MPI"));
        app.setMaxWallTime(9);
        ProjectAccountType projectAccountType = ((GramApplicationDeploymentType) appDesc.getType()).addNewProjectAccount();
        projectAccountType.setProjectAccountNumber(properties.getProperty("allocation.charge.number"));

        /* Service */
        ServiceDescription serv = new ServiceDescription();
        serv.getType().setName("MockPwscfMPIService");
View Full Code Here

                    + " does not found on resource Catalog " + registryService);

        /*
         * Load app
         */
        ApplicationDeploymentDescription app = null;
        try {
            app = registryService.getDeploymentDescription(context.getServiceName(),
                    getRegisteredHost(registryService,context.getServiceName()).getType().getHostName());
        } catch (RegistryException e2) {
            e2.printStackTrace();
View Full Code Here

TOP

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

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.