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

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


        return serviceDescription.toXML();
    }

    public String getDeploymentDescription(String serviceId, String hostId)
            throws RegistryException{
        ApplicationDeploymentDescription deploymentDescription = registry.getDeploymentDescription(serviceId, hostId);
        return  deploymentDescription.toXML();
    }
View Full Code Here


        host1.getType().setHostAddress("121.121.12.121");

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

        host1.getType().setHostAddress("121.121.12.121");

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

        host1.getType().setHostAddress("121.121.12.121");

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

        host1.getType().setHostAddress("121.121.12.121");

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

        host1.getType().setHostAddress("121.121.12.121");

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

     * @param appBean ApplicationBean
     * @return ApplicationDeploymentDescription
     */
    public static ApplicationDeploymentDescription createAppDeploymentDescription(
            ApplicationBean appBean) {
        ApplicationDeploymentDescription appDesc = new ApplicationDeploymentDescription();

        if(appBean.getJobType() != null) {
            appDesc.getType().changeType(GramApplicationDeploymentType.type);
            GramApplicationDeploymentType gram = (GramApplicationDeploymentType) appDesc.getType();
            ApplicationDeploymentDescriptionType.ApplicationName name =
                    ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
            name.setStringValue(appBean.getApplicationName());

            gram.setApplicationName(name);
            gram.setExecutableLocation(appBean.getExecutable());
            gram.setScratchWorkingDirectory(appBean.getTmpDir());
            gram.setMaxWallTime(appBean.getMaxWallTime());
            if (appBean.getPcount() != null) {
                gram.setCpuCount(appBean.getPcount());
            }
            if (appBean.getMinMemory() != null) {
                gram.setMinMemory(appBean.getMinMemory());
            }

            gram.setJobType(getJobTypeEnum(appBean.getJobType()));
            ProjectAccountType projectAccount;
            projectAccount = getProjectAccountType(gram);
            projectAccount.setProjectAccountNumber(appBean.getProjectName());
            projectAccount.setProjectAccountDescription("");

            QueueType queueName;
            queueName = getQueueType(gram);
            queueName.setQueueName(appBean.getQueue());

        } else {
            ApplicationDeploymentDescriptionType app = appDesc.getType();
            ApplicationDeploymentDescriptionType.ApplicationName name =
                    ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
            name.setStringValue(appBean.getApplicationName());

            app.setApplicationName(name);
View Full Code Here

     * @param appBean ApplicationBean
     * @return ApplicationDeploymentDescription
     */
    public static ApplicationDeploymentDescription createAppDeploymentDescription(
            String applicationName, ApplicationBean appBean) {
        ApplicationDeploymentDescription appDesc = new ApplicationDeploymentDescription();

        if(appBean.getJobType() != null) {
            appDesc.getType().changeType(GramApplicationDeploymentType.type);
            GramApplicationDeploymentType gram = (GramApplicationDeploymentType) appDesc.getType();
            ApplicationDeploymentDescriptionType.ApplicationName name =
                    ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
            name.setStringValue(applicationName);

            gram.setApplicationName(name);
            gram.setExecutableLocation(appBean.getExecutable());
            gram.setScratchWorkingDirectory(appBean.getTmpDir());
            gram.setMaxWallTime(appBean.getMaxWallTime());
            if (appBean.getPcount() != null) {
                gram.setCpuCount(appBean.getPcount());
            }
            if (appBean.getMinMemory() != null) {
                gram.setMinMemory(appBean.getMinMemory());
            }

            gram.setJobType(getJobTypeEnum(appBean.getJobType()));
            ProjectAccountType projectAccount;
            projectAccount = getProjectAccountType(gram);
            projectAccount.setProjectAccountNumber(appBean.getProjectName());
            projectAccount.setProjectAccountDescription("");

            QueueType queueName;
            queueName = getQueueType(gram);
            queueName.setQueueName(appBean.getQueue());

        } else {
            ApplicationDeploymentDescriptionType app = appDesc.getType();
            ApplicationDeploymentDescriptionType.ApplicationName name =
                    ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
            name.setStringValue(applicationName);

            app.setApplicationName(name);
View Full Code Here

        return serviceDescription.toXML();
    }

    public String getDeploymentDescription(String serviceId, String hostId)
            throws RegistryException{
        ApplicationDeploymentDescription deploymentDescription = registry.getDeploymentDescription(serviceId, hostId);
        return  deploymentDescription.toXML();
    }
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

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.