Examples of UserIdGroupPair


Examples of org.jclouds.ec2.domain.UserIdGroupPair

         for (String userId : ipPermission.getTenantIdGroupNamePairs().keySet()) {
            for (String groupName : ipPermission.getTenantIdGroupNamePairs().get(userId)) {
               client.getSecurityGroupApi().get().
                  revokeSecurityGroupIngressInRegion(region,
                                                     name,
                                                     new UserIdGroupPair(userId, groupName));
            }
         }
      }

      return getSecurityGroupById(new RegionAndName(region, group.getName()).slashEncode());
View Full Code Here

Examples of org.jclouds.ec2.domain.UserIdGroupPair

         for (String userId : tenantIdGroupNamePairs.keySet()) {
            for (String groupName : tenantIdGroupNamePairs.get(userId)) {
               client.getSecurityGroupApi().get().
                  revokeSecurityGroupIngressInRegion(region,
                                                     name,
                                                     new UserIdGroupPair(userId, groupName));
            }
         }
      }

      return getSecurityGroupById(new RegionAndName(region, group.getName()).slashEncode());
View Full Code Here

Examples of org.jclouds.ec2.domain.UserIdGroupPair

         Set<SecurityGroup> oneResult = client.describeSecurityGroupsInRegion(null, group1Name);
         assertNotNull(oneResult);
         assertEquals(oneResult.size(), 1);
         final SecurityGroup group = oneResult.iterator().next();
         assertEquals(group.getName(), group1Name);
         final UserIdGroupPair to = new UserIdGroupPair(group.getOwnerId(), group1Name);
         client.authorizeSecurityGroupIngressInRegion(null, group2Name, to);
         assertEventually(new GroupHasPermission(client, group2Name, new Predicate<IpPermission>() {
            @Override
            public boolean apply(IpPermission arg0) {
               return arg0.getTenantIdGroupNamePairs().equals(ImmutableMultimap.of(group.getOwnerId(), group1Id));
            }
         }));

         client.revokeSecurityGroupIngressInRegion(null, group2Name,
                 new UserIdGroupPair(group.getOwnerId(), group1Name));
         assertEventually(new GroupHasNoPermissions(client, group2Name));
      } finally {
         client.deleteSecurityGroupInRegion(null, group2Name);
         client.deleteSecurityGroupInRegion(null, group1Name);
      }
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.