Examples of withSecurityGroupIds()


Examples of org.jclouds.aws.ec2.options.AWSRunInstancesOptions.withSecurityGroupIds()

              if (awsTemplateOptions.getGroupIds().size() > 0)
                 awsInstanceOptions.withSecurityGroupIdsForNetworkInterface(awsTemplateOptions.getGroupIds());
          }else{
              AWSRunInstancesOptions.class.cast(instanceOptions).withSubnetId(subnetId);
              if (awsTemplateOptions.getGroupIds().size() > 0)
                 awsInstanceOptions.withSecurityGroupIds(awsTemplateOptions.getGroupIds());
          }
      } else {
          if (awsTemplateOptions.getGroupIds().size() > 0)
             awsInstanceOptions.withSecurityGroupIds(awsTemplateOptions.getGroupIds());
         super.addSecurityGroups(region, group, template, instanceOptions);
View Full Code Here

Examples of org.jclouds.aws.ec2.options.AWSRunInstancesOptions.withSecurityGroupIds()

              if (awsTemplateOptions.getGroupIds().size() > 0)
                 awsInstanceOptions.withSecurityGroupIds(awsTemplateOptions.getGroupIds());
          }
      } else {
          if (awsTemplateOptions.getGroupIds().size() > 0)
             awsInstanceOptions.withSecurityGroupIds(awsTemplateOptions.getGroupIds());
         super.addSecurityGroups(region, group, template, instanceOptions);
      }
   }
}
View Full Code Here

Examples of org.jclouds.aws.ec2.options.AWSRunInstancesOptions.withSecurityGroupIds()

      if (launchSpec.getBlockDeviceMappings().size() > 0)
         options.withBlockDeviceMappings(launchSpec.getBlockDeviceMappings());
      if (launchSpec.getSecurityGroupNames().size() > 0)
         options.withSecurityGroups(launchSpec.getSecurityGroupNames());
      if (launchSpec.getSecurityGroupIds().size() > 0)
         options.withSecurityGroupIds(launchSpec.getSecurityGroupIds());
      options.asType(checkNotNull(launchSpec.getInstanceType(), "instanceType"));
      if (launchSpec.getSubnetId() != null){
         if (Boolean.TRUE.equals(launchSpec.isPublicIpAddressAssociated()))  {
            options.associatePublicIpAddressAndSubnetId(launchSpec.getSubnetId());
            if (launchSpec.getSecurityGroupIds().size() > 0){
View Full Code Here

Examples of org.jclouds.aws.ec2.options.AWSRunInstancesOptions.withSecurityGroupIds()

      if (launchSpec.getBlockDeviceMappings().size() > 0)
         options.withBlockDeviceMappings(launchSpec.getBlockDeviceMappings());
      if (launchSpec.getSecurityGroupNames().size() > 0)
         options.withSecurityGroups(launchSpec.getSecurityGroupNames());
      if (launchSpec.getSecurityGroupIds().size() > 0)
         options.withSecurityGroupIds(launchSpec.getSecurityGroupIds());
      options.asType(checkNotNull(launchSpec.getInstanceType(), "instanceType"));
      if (launchSpec.getSubnetId() != null)
         options.withSubnetId(launchSpec.getSubnetId());
      if (launchSpec.getKernelId() != null)
         options.withKernelId(launchSpec.getKernelId());
View Full Code Here

Examples of org.jclouds.aws.ec2.options.AWSRunInstancesOptions.withSecurityGroupIds()

   @Override
   protected void addSecurityGroups(String region, String group, Template template, RunInstancesOptions instanceOptions) {
      AWSEC2TemplateOptions awsTemplateOptions = AWSEC2TemplateOptions.class.cast(template.getOptions());
      AWSRunInstancesOptions awsInstanceOptions = AWSRunInstancesOptions.class.cast(instanceOptions);
      if (awsTemplateOptions.getGroupIds().size() > 0)
         awsInstanceOptions.withSecurityGroupIds(awsTemplateOptions.getGroupIds());
      String subnetId = awsTemplateOptions.getSubnetId();
      if (subnetId != null) {
         AWSRunInstancesOptions.class.cast(instanceOptions).withSubnetId(subnetId);
      } else {
         super.addSecurityGroups(region, group, template, instanceOptions);
View Full Code Here

Examples of org.jclouds.aws.ec2.options.AWSRunInstancesOptions.withSecurityGroupIds()

      if (launchSpec.getBlockDeviceMappings().size() > 0)
         options.withBlockDeviceMappings(launchSpec.getBlockDeviceMappings());
      if (launchSpec.getSecurityGroupNames().size() > 0)
         options.withSecurityGroups(launchSpec.getSecurityGroupNames());
      if (launchSpec.getSecurityGroupIds().size() > 0)
         options.withSecurityGroupIds(launchSpec.getSecurityGroupIds());
      options.asType(checkNotNull(launchSpec.getInstanceType(), "instanceType"));
      if (launchSpec.getSubnetId() != null)
         options.withSubnetId(launchSpec.getSubnetId());
      if (launchSpec.getKernelId() != null)
         options.withKernelId(launchSpec.getKernelId());
View Full Code Here

Examples of org.jclouds.aws.ec2.options.AWSRunInstancesOptions.withSecurityGroupIds()

   @Override
   protected void addSecurityGroups(String region, String group, Template template, RunInstancesOptions instanceOptions) {
      AWSEC2TemplateOptions awsTemplateOptions = AWSEC2TemplateOptions.class.cast(template.getOptions());
      AWSRunInstancesOptions awsInstanceOptions = AWSRunInstancesOptions.class.cast(instanceOptions);
      if (awsTemplateOptions.getGroupIds().size() > 0)
         awsInstanceOptions.withSecurityGroupIds(awsTemplateOptions.getGroupIds());
      String subnetId = awsTemplateOptions.getSubnetId();
      if (subnetId != null) {
         AWSRunInstancesOptions.class.cast(instanceOptions).withSubnetId(subnetId);
      } else {
         super.addSecurityGroups(region, group, template, instanceOptions);
View Full Code Here

Examples of org.jclouds.aws.ec2.options.AWSRunInstancesOptions.withSecurityGroupIds()

   @Override
   protected void addSecurityGroups(String region, String group, Template template, RunInstancesOptions instanceOptions) {
      AWSEC2TemplateOptions awsTemplateOptions = AWSEC2TemplateOptions.class.cast(template.getOptions());
      AWSRunInstancesOptions awsInstanceOptions = AWSRunInstancesOptions.class.cast(instanceOptions);
      if (awsTemplateOptions.getGroupIds().size() > 0)
         awsInstanceOptions.withSecurityGroupIds(awsTemplateOptions.getGroupIds());
      String subnetId = awsTemplateOptions.getSubnetId();
      if (subnetId != null) {
         AWSRunInstancesOptions.class.cast(instanceOptions).withSubnetId(subnetId);
      } else {
         super.addSecurityGroups(region, group, template, instanceOptions);
View Full Code Here

Examples of org.jclouds.aws.ec2.options.AWSRunInstancesOptions.withSecurityGroupIds()

      if (launchSpec.getBlockDeviceMappings().size() > 0)
         options.withBlockDeviceMappings(launchSpec.getBlockDeviceMappings());
      if (launchSpec.getSecurityGroupNames().size() > 0)
         options.withSecurityGroups(launchSpec.getSecurityGroupNames());
      if (launchSpec.getSecurityGroupIds().size() > 0)
         options.withSecurityGroupIds(launchSpec.getSecurityGroupIds());
      options.asType(checkNotNull(launchSpec.getInstanceType(), "instanceType"));
      if (launchSpec.getSubnetId() != null)
         options.withSubnetId(launchSpec.getSubnetId());
      if (launchSpec.getKernelId() != null)
         options.withKernelId(launchSpec.getKernelId());
View Full Code Here

Examples of org.jclouds.aws.ec2.options.AWSRunInstancesOptions.withSecurityGroupIds()

      if (!launchSpec.getBlockDeviceMappings().isEmpty())
         options.withBlockDeviceMappings(launchSpec.getBlockDeviceMappings());
      if (!launchSpec.getSecurityGroupNames().isEmpty())
         options.withSecurityGroups(launchSpec.getSecurityGroupNames());
      if (!launchSpec.getSecurityGroupIds().isEmpty())
         options.withSecurityGroupIds(launchSpec.getSecurityGroupIds());
      options.asType(checkNotNull(launchSpec.getInstanceType(), "instanceType"));
      if (launchSpec.getSubnetId() != null)
         options.withSubnetId(launchSpec.getSubnetId());
      if (launchSpec.getKernelId() != null)
         options.withKernelId(launchSpec.getKernelId());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.