Package org.jclouds.savvis.vpdc.domain

Examples of org.jclouds.savvis.vpdc.domain.VDC


   @Test
   public void testVM() throws Exception {
      for (Resource org1 : restContext.getApi().listOrgs()) {
         Org org = api.getOrg(org1.getId());
         VDC_LOOP : for (Resource vdc : org.getVDCs()) {
            VDC VDC = api.getVDCInOrg(org.getId(), vdc.getId());
            for (Resource vApp : Iterables.filter(VDC.getResourceEntities(), new Predicate<Resource>() {

               @Override
               public boolean apply(Resource arg0) {
                  return VCloudMediaType.VAPP_XML.equals(arg0.getType());
               }
View Full Code Here


         Org org = api.getBrowsingApi().getOrg(matcher.group(1));

         Location orgLocation = new LocationBuilder().scope(LocationScope.REGION).id(org.getId()).description(
                  org.getDescription()).parent(provider).build();

         VDC vdc = api.getBrowsingApi().getVDCInOrg(org.getId(), matcher.group(2));

         Location vdcLocation = new LocationBuilder().scope(LocationScope.ZONE).id(vdc.getId()).description(
                  vdc.getDescription()).parent(orgLocation).build();

         return new LocationBuilder().scope(LocationScope.NETWORK).id(from.getId()).description(from.getName()).parent(
                  vdcLocation).build();
      } else {
         throw new IllegalArgumentException("network unparsable: " + from);
View Full Code Here

   public Iterable<VM> listNodes() {
      Builder<VM> builder = ImmutableSet.builder();
      for (Resource org1 : api.listOrgs()) {
         Org org = api.getBrowsingApi().getOrg(org1.getId());
         for (Resource vdc : org.getVDCs()) {
            VDC VDC = api.getBrowsingApi().getVDCInOrg(org.getId(), vdc.getId());
            for (Resource vApp : Iterables.filter(VDC.getResourceEntities(), new Predicate<Resource>() {

               @Override
               public boolean apply(Resource arg0) {
                  return VCloudMediaType.VAPP_XML.equals(arg0.getType());
               }
View Full Code Here

   public Iterable<Network> listLocations() {
      Builder<Network> builder = ImmutableSet.builder();
      for (Resource org1 : api.listOrgs()) {
         Org org = api.getBrowsingApi().getOrg(org1.getId());
         for (Resource vdc : org.getVDCs()) {
            VDC VDC = api.getBrowsingApi().getVDCInOrg(org.getId(), vdc.getId());
            // optionally constrain locations
            if (email != null && VDC.getDescription().indexOf(email) != -1)
               continue;
            for (Resource network : VDC.getAvailableNetworks()) {
               builder.add(api.getBrowsingApi().getNetworkInVDC(org.getId(), vdc.getId(), network.getId()));
            }
         }
      }
      return builder.build();
View Full Code Here

TOP

Related Classes of org.jclouds.savvis.vpdc.domain.VDC

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.