Examples of authorizeSecurityGroupIngressInRegion()


Examples of org.jclouds.ec2.features.SecurityGroupApi.authorizeSecurityGroupIngressInRegion()

      SecurityGroup group = createNiceMock(SecurityGroup.class);
      Set<SecurityGroup> groups = ImmutableSet.<SecurityGroup> of(group);

      client.createSecurityGroupInRegion("region", "group", "group");
      client.authorizeSecurityGroupIngressInRegion("region", "group", IpProtocol.TCP, 22, 22, "0.0.0.0/0");
      expect(client.describeSecurityGroupsInRegion("region", "group")).andReturn(Set.class.cast(groups));
      expect(group.getOwnerId()).andReturn("ownerId");
      client.authorizeSecurityGroupIngressInRegion("region", "group", new UserIdGroupPair("ownerId", "group"));

      replay(client);
View Full Code Here

Examples of org.jclouds.ec2.features.SecurityGroupApi.authorizeSecurityGroupIngressInRegion()

      client.createSecurityGroupInRegion("region", "group", "group");
      client.authorizeSecurityGroupIngressInRegion("region", "group", IpProtocol.TCP, 22, 22, "0.0.0.0/0");
      expect(client.describeSecurityGroupsInRegion("region", "group")).andReturn(Set.class.cast(groups));
      expect(group.getOwnerId()).andReturn("ownerId");
      client.authorizeSecurityGroupIngressInRegion("region", "group", new UserIdGroupPair("ownerId", "group"));

      replay(client);
      replay(group);

      CreateSecurityGroupIfNeeded function = new CreateSecurityGroupIfNeeded(client, tester);
View Full Code Here

Examples of org.jclouds.ec2.features.SecurityGroupApi.authorizeSecurityGroupIngressInRegion()

      SecurityGroup group = createNiceMock(SecurityGroup.class);
      Set<SecurityGroup> groups = ImmutableSet.<SecurityGroup> of(group);

      client.createSecurityGroupInRegion("region", "group", "group");
      client.authorizeSecurityGroupIngressInRegion("region", "group", IpProtocol.TCP, 22, 22, "0.0.0.0/0");
      expect(client.describeSecurityGroupsInRegion("region", "group")).andReturn(Set.class.cast(groups));
      expect(group.getOwnerId()).andReturn("ownerId");
      client.authorizeSecurityGroupIngressInRegion("region", "group", new UserIdGroupPair("ownerId", "group"));

      replay(client);
View Full Code Here

Examples of org.jclouds.ec2.features.SecurityGroupApi.authorizeSecurityGroupIngressInRegion()

      client.createSecurityGroupInRegion("region", "group", "group");
      client.authorizeSecurityGroupIngressInRegion("region", "group", IpProtocol.TCP, 22, 22, "0.0.0.0/0");
      expect(client.describeSecurityGroupsInRegion("region", "group")).andReturn(Set.class.cast(groups));
      expect(group.getOwnerId()).andReturn("ownerId");
      client.authorizeSecurityGroupIngressInRegion("region", "group", new UserIdGroupPair("ownerId", "group"));

      replay(client);
      replay(group);

      CreateSecurityGroupIfNeeded function = new CreateSecurityGroupIfNeeded(client, tester);
View Full Code Here

Examples of org.jclouds.ec2.features.SecurityGroupApi.authorizeSecurityGroupIngressInRegion()

         cleanupExtendedStuffInRegion(null, securityGroupClient, keyPairClient, group);

         // create a security group that allows ssh in so that our scripts later
         // will work
         securityGroupClient.createSecurityGroupInRegion(null, group, group);
         securityGroupClient.authorizeSecurityGroupIngressInRegion(null, group, IpProtocol.TCP, 22, 22, "0.0.0.0/0");

         // create a keypair to pass in as well
         KeyPair result = keyPairClient.createKeyPairInRegion(null, group);
         options.as(EC2TemplateOptions.class).keyPair(result.getKeyName());
        
View Full Code Here

Examples of org.jclouds.ec2.services.SecurityGroupClient.authorizeSecurityGroupIngressInRegion()

         cleanupExtendedStuffInRegion(null, securityGroupClient, keyPairClient, group);

         // create a security group that allows ssh in so that our scripts later
         // will work
         securityGroupClient.createSecurityGroupInRegion(null, group, group);
         securityGroupClient.authorizeSecurityGroupIngressInRegion(null, group, IpProtocol.TCP, 22, 22, "0.0.0.0/0");

         // create a keypair to pass in as well
         KeyPair result = keyPairClient.createKeyPairInRegion(null, group);
         options.as(EC2TemplateOptions.class).keyPair(result.getKeyName());
        
View Full Code Here

Examples of org.jclouds.ec2.services.SecurityGroupClient.authorizeSecurityGroupIngressInRegion()

      SecurityGroup group = createNiceMock(SecurityGroup.class);
      Set<SecurityGroup> groups = ImmutableSet.<SecurityGroup> of(group);

      client.createSecurityGroupInRegion("region", "group", "group");
      client.authorizeSecurityGroupIngressInRegion("region", "group", IpProtocol.TCP, 22, 22, "0.0.0.0/0");
      expect(client.describeSecurityGroupsInRegion("region", "group")).andReturn(Set.class.cast(groups));
      expect(group.getOwnerId()).andReturn("ownerId");
      client.authorizeSecurityGroupIngressInRegion("region", "group", new UserIdGroupPair("ownerId", "group"));

      replay(client);
View Full Code Here

Examples of org.jclouds.ec2.services.SecurityGroupClient.authorizeSecurityGroupIngressInRegion()

      client.createSecurityGroupInRegion("region", "group", "group");
      client.authorizeSecurityGroupIngressInRegion("region", "group", IpProtocol.TCP, 22, 22, "0.0.0.0/0");
      expect(client.describeSecurityGroupsInRegion("region", "group")).andReturn(Set.class.cast(groups));
      expect(group.getOwnerId()).andReturn("ownerId");
      client.authorizeSecurityGroupIngressInRegion("region", "group", new UserIdGroupPair("ownerId", "group"));

      replay(client);
      replay(group);

      CreateSecurityGroupIfNeeded function = new CreateSecurityGroupIfNeeded(client, tester);
View Full Code Here

Examples of org.jclouds.ec2.services.SecurityGroupClient.authorizeSecurityGroupIngressInRegion()

         cleanupExtendedStuffInRegion(null, securityGroupClient, keyPairClient, group);

         // create a security group that allows ssh in so that our scripts later
         // will work
         securityGroupClient.createSecurityGroupInRegion(null, group, group);
         securityGroupClient.authorizeSecurityGroupIngressInRegion(null, group, IpProtocol.TCP, 22, 22, "0.0.0.0/0");

         // create a keypair to pass in as well
         KeyPair result = keyPairClient.createKeyPairInRegion(null, group);
         options.as(EC2TemplateOptions.class).keyPair(result.getKeyName());
        
View Full Code Here

Examples of org.jclouds.ec2.services.SecurityGroupClient.authorizeSecurityGroupIngressInRegion()

      SecurityGroup group = createNiceMock(SecurityGroup.class);
      Set<SecurityGroup> groups = ImmutableSet.<SecurityGroup> of(group);

      client.createSecurityGroupInRegion("region", "group", "group");
      client.authorizeSecurityGroupIngressInRegion("region", "group", IpProtocol.TCP, 22, 22, "0.0.0.0/0");
      expect(client.describeSecurityGroupsInRegion("region", "group")).andReturn(Set.class.cast(groups));
      expect(group.getOwnerId()).andReturn("ownerId");
      client.authorizeSecurityGroupIngressInRegion("region", "group", new UserIdGroupPair("ownerId", "group"));

      replay(client);
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.