Package org.apache.airavata.gfac.context.security

Examples of org.apache.airavata.gfac.context.security.AmazonSecurityContext


            /* If there is a instance control component connects to this
             * component send information in soap header */
            for (Node n : wsNode.getControlInPort().getFromNodes()) {
                if (n instanceof InstanceNode) {
                    AmazonSecurityContext amazonSecurityContext;
                    final String awsAccessKeyId = config.getAwsAccessKey();
                    final String awsSecretKey = config.getAwsSecretKey();
                    final String username = ((InstanceNode) n).getUsername();

                    if (((InstanceNode) n).isStartNewInstance()) {
                        final String amiId = ((InstanceNode) n).getIdAsValue();
                        final String instanceType = ((InstanceNode) n).getInstanceType();

                        amazonSecurityContext =
                                new AmazonSecurityContext(username, awsAccessKeyId, awsSecretKey, amiId, instanceType);
                    } else {
                        final String instanceId = ((InstanceNode) n).getIdAsValue();
                        amazonSecurityContext =
                                new AmazonSecurityContext(username, awsAccessKeyId, awsSecretKey, instanceId);
                    }

                    this.config.getConfiguration().setAmazonSecurityContext(amazonSecurityContext);
                }
            }
View Full Code Here


        jobExecutionContext.setApplicationContext(applicationContext);
        applicationContext.setServiceDescription(serv);
        applicationContext.setApplicationDeploymentDescription(ec2Desc);
        applicationContext.setHostDescription(host);

        AmazonSecurityContext amazonSecurityContext =
                new AmazonSecurityContext(userName, accessKey, secretKey, instanceId);
        jobExecutionContext.addSecurityContext(AmazonSecurityContext.AMAZON_SECURITY_CONTEXT, amazonSecurityContext);

        MessageContext inMessage = new MessageContext();
        ActualParameter genomeInput1 = new ActualParameter();
        ((StringParameterType)genomeInput1.getType()).setValue(sequence1);
View Full Code Here

            /* If there is a instance control component connects to this
             * component send information in soap header */
            for (Node n : wsNode.getControlInPort().getFromNodes()) {
                if (n instanceof InstanceNode) {
                    AmazonSecurityContext amazonSecurityContext;
                    final String awsAccessKeyId = config.getAwsAccessKey();
                    final String awsSecretKey = config.getAwsSecretKey();
                    final String username = ((InstanceNode) n).getUsername();

                    if (((InstanceNode) n).isStartNewInstance()) {
                        final String amiId = ((InstanceNode) n).getIdAsValue();
                        final String instanceType = ((InstanceNode) n).getInstanceType();

                        amazonSecurityContext =
                                new AmazonSecurityContext(username, awsAccessKeyId, awsSecretKey, amiId, instanceType);
                    } else {
                        final String instanceId = ((InstanceNode) n).getIdAsValue();
                        amazonSecurityContext =
                                new AmazonSecurityContext(username, awsAccessKeyId, awsSecretKey, instanceId);
                    }

                    this.config.getConfiguration().setAmazonSecurityContext(amazonSecurityContext);
                }
            }
View Full Code Here

            /* If there is a instance control component connects to this
             * component send information in soap header */
            for (Node n : wsNode.getControlInPort().getFromNodes()) {
                if (n instanceof InstanceNode) {
                    AmazonSecurityContext amazonSecurityContext;
                    final String awsAccessKeyId = config.getAwsAccessKey();
                    final String awsSecretKey = config.getAwsSecretKey();
                    final String username = ((InstanceNode) n).getUsername();

                    if (((InstanceNode) n).isStartNewInstance()) {
                        final String amiId = ((InstanceNode) n).getIdAsValue();
                        final String instanceType = ((InstanceNode) n).getInstanceType();

                        amazonSecurityContext =
                                new AmazonSecurityContext(username, awsAccessKeyId, awsSecretKey, amiId, instanceType);
                    } else {
                        final String instanceId = ((InstanceNode) n).getIdAsValue();
                        amazonSecurityContext =
                                new AmazonSecurityContext(username, awsAccessKeyId, awsSecretKey, instanceId);
                    }

                    this.config.getConfiguration().setAmazonSecurityContext(amazonSecurityContext);
                }
            }
View Full Code Here

            /* If there is a instance control component connects to this
             * component send information in soap header */
            for (Node n : wsNode.getControlInPort().getFromNodes()) {
                if (n instanceof InstanceNode) {
                    AmazonSecurityContext amazonSecurityContext;
                    final String awsAccessKeyId = config.getAwsAccessKey();
                    final String awsSecretKey = config.getAwsSecretKey();
                    final String username = ((InstanceNode) n).getUsername();

                    if (((InstanceNode) n).isStartNewInstance()) {
                        final String amiId = ((InstanceNode) n).getIdAsValue();
                        final String instanceType = ((InstanceNode) n).getInstanceType();

                        amazonSecurityContext =
                                new AmazonSecurityContext(username, awsAccessKeyId, awsSecretKey, amiId, instanceType);
                    } else {
                        final String instanceId = ((InstanceNode) n).getIdAsValue();
                        amazonSecurityContext =
                                new AmazonSecurityContext(username, awsAccessKeyId, awsSecretKey, instanceId);
                    }

                    this.config.getConfiguration().setAmazonSecurityContext(amazonSecurityContext);
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.airavata.gfac.context.security.AmazonSecurityContext

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.