Package org.jclouds.compute.domain

Examples of org.jclouds.compute.domain.SecurityGroupBuilder


      ).getSecurityGroupExtension().get();

      ImmutableMultimap.Builder<String, String> permBuilder = ImmutableMultimap.builder();
      permBuilder.put("adrian", "adriancole");

      SecurityGroup origGroup = new SecurityGroupBuilder().id("13").build();

      SecurityGroup newGroup = extension.addIpPermission(IpProtocol.TCP, 22, 22,
              permBuilder.build(), emptyStringSet(), emptyStringSet(), origGroup);

      assertEquals(1, newGroup.getIpPermissions().size());
View Full Code Here


      builder.toPort(11);
      builder.cidrBlock("1.1.1.1/24");

      IpPermission perm = builder.build();

      SecurityGroup origGroup = new SecurityGroupBuilder().id("13").build();

      SecurityGroup newGroup = extension.removeIpPermission(perm, origGroup);

      assertEquals(newGroup.getIpPermissions().size(), 0);
   }
View Full Code Here

              ImmutableList.of(getWithRuleResponse, revokeRuleResponse,
                      queryAsyncJobResultAuthorizeIngressResponse, getEmptyResponse)
      ).getSecurityGroupExtension().get();


      SecurityGroup origGroup = new SecurityGroupBuilder().id("13").build();

      SecurityGroup newGroup = extension.removeIpPermission(IpProtocol.UDP, 11, 11, emptyMultimap(),
              ImmutableSet.of("1.1.1.1/24"), emptyStringSet(), origGroup);

      assertEquals(newGroup.getIpPermissions().size(), 0);
View Full Code Here

      builder.toPort(22);
      builder.tenantIdGroupNamePair("adrian", "adriancole");

      IpPermission perm = builder.build();

      SecurityGroup origGroup = new SecurityGroupBuilder().id("13").build();

      SecurityGroup newGroup = extension.removeIpPermission(perm, origGroup);

      assertEquals(newGroup.getIpPermissions().size(), 0);
   }
View Full Code Here

      ).getSecurityGroupExtension().get();

      ImmutableMultimap.Builder<String, String> permBuilder = ImmutableMultimap.builder();
      permBuilder.put("adrian", "adriancole");

      SecurityGroup origGroup = new SecurityGroupBuilder().id("13").build();

      SecurityGroup newGroup = extension.removeIpPermission(IpProtocol.TCP, 22, 22,
              permBuilder.build(), emptyStringSet(), emptyStringSet(), origGroup);

      assertEquals(newGroup.getIpPermissions().size(), 0);
View Full Code Here

      IpPermission perm = builder.build();

      SecurityGroupExtension extension = requestsSendResponses(requestResponseMap.build()).getSecurityGroupExtension().get();

      SecurityGroupBuilder groupBuilder = new SecurityGroupBuilder();
      groupBuilder.id("us-east-1/sg-3c6ef654");
      groupBuilder.providerId("sg-3c6ef654");
      groupBuilder.name("jclouds#some-group");
      groupBuilder.location(new LocationBuilder()
                            .scope(LocationScope.REGION)
                            .id(region)
                            .description("region")
                            .build());
     
      SecurityGroup origGroup = groupBuilder.build();

      SecurityGroup newGroup = extension.addIpPermission(perm, origGroup);

      assertEquals(1, newGroup.getIpPermissions().size());
View Full Code Here

      requestResponseMap.put(authorizeSecurityGroupIngressRequestRange, authorizeSecurityGroupIngressResponse);

      SecurityGroupExtension extension = requestsSendResponses(requestResponseMap.build()).getSecurityGroupExtension().get();

      SecurityGroupBuilder groupBuilder = new SecurityGroupBuilder();
      groupBuilder.id("us-east-1/sg-3c6ef654");
      groupBuilder.providerId("sg-3c6ef654");
      groupBuilder.name("jclouds#some-group");
      groupBuilder.location(new LocationBuilder()
                            .scope(LocationScope.REGION)
                            .id(region)
                            .description("region")
                            .build());
     
      SecurityGroup origGroup = groupBuilder.build();

      SecurityGroup newGroup = extension.addIpPermission(IpProtocol.TCP,
                                                         22,
                                                         40,
                                                         emptyMultimap(),
View Full Code Here

      IpPermission perm = builder.build();

      SecurityGroupExtension extension = requestsSendResponses(requestResponseMap.build()).getSecurityGroupExtension().get();

      SecurityGroupBuilder groupBuilder = new SecurityGroupBuilder();
      groupBuilder.id("us-east-1/sg-3c6ef654");
      groupBuilder.providerId("sg-3c6ef654");
      groupBuilder.name("jclouds#some-group");
      groupBuilder.location(new LocationBuilder()
                            .scope(LocationScope.REGION)
                            .id(region)
                            .description("region")
                            .build());
      groupBuilder.ownerId("993194456877");
     
      SecurityGroup origGroup = groupBuilder.build();

      SecurityGroup newGroup = extension.addIpPermission(perm, origGroup);

      assertEquals(1, newGroup.getIpPermissions().size());
View Full Code Here

      requestResponseMap.put(authorizeSecurityGroupIngressRequestGroupTenant, authorizeSecurityGroupIngressResponse);

      SecurityGroupExtension extension = requestsSendResponses(requestResponseMap.build()).getSecurityGroupExtension().get();

      SecurityGroupBuilder groupBuilder = new SecurityGroupBuilder();
      groupBuilder.id("us-east-1/sg-3c6ef654");
      groupBuilder.providerId("sg-3c6ef654");
      groupBuilder.name("jclouds#some-group");
      groupBuilder.ownerId("993194456877");
      groupBuilder.location(new LocationBuilder()
                            .scope(LocationScope.REGION)
                            .id(region)
                            .description("region")
                            .build());
     
      SecurityGroup origGroup = groupBuilder.build();

      ImmutableMultimap.Builder<String, String> permBuilder = ImmutableMultimap.builder();
      permBuilder.put(origGroup.getOwnerId(), origGroup.getId());
     
      SecurityGroup newGroup = extension.addIpPermission(IpProtocol.TCP,
View Full Code Here

      IpPermission perm = builder.build();

      SecurityGroupExtension extension = requestsSendResponses(requestResponseMap.build()).getSecurityGroupExtension().get();

      SecurityGroupBuilder groupBuilder = new SecurityGroupBuilder();
      groupBuilder.id("jclouds#some-group");
      groupBuilder.providerId("sg-3c6ef654");
      groupBuilder.name("jclouds#some-group");
      groupBuilder.location(new LocationBuilder()
                            .scope(LocationScope.REGION)
                            .id(region)
                            .description("region")
                            .build());
     
      SecurityGroup origGroup = groupBuilder.build();

      SecurityGroup newGroup = extension.addIpPermission(perm, origGroup);

      assertEquals(1, newGroup.getIpPermissions().size());
View Full Code Here

TOP

Related Classes of org.jclouds.compute.domain.SecurityGroupBuilder

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.