Package org.jclouds.trmk.vcloud_0_8.domain

Examples of org.jclouds.trmk.vcloud_0_8.domain.InternetService


      VDC result = factory.create(injector.getInstance(VDCHandler.class)).parse(is);
      assertEquals(result.getName(), "Miami Environment 1");
      assertEquals(result.getHref(), URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/vdc/32"));
      assertEquals(result.getResourceEntities(), ImmutableMap.<String, ReferenceType> of(
            "adriantest",
            new ReferenceTypeImpl("adriantest", TerremarkVCloudMediaType.VAPP_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/vapp/15124")),
            "centos-53",
            new ReferenceTypeImpl("centos-53", TerremarkVCloudMediaType.VAPP_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/vapp/15120"))));

      assertEquals(result.getAvailableNetworks(), ImmutableMap.of(
            "10.114.34.128/26",
            new ReferenceTypeImpl("10.114.34.128/26", "application/vnd.vmware.vcloud.network+xml", URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/network/1708"))));
      assertEquals(
            result.getCatalog(),
            new ReferenceTypeImpl("Miami Environment 1", CATALOG_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/vdc/32/catalog")));
      assertEquals(
            result.getPublicIps(),
            new ReferenceTypeImpl("Public IPs", "application/xml", URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/vdc/32/publicIps")));
      assertEquals(
            result.getInternetServices(),
            new ReferenceTypeImpl("Internet Services", "application/xml", URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/vdc/32/internetServices")));
   }
View Full Code Here


      InputStream is = getClass().getResourceAsStream("/instantiatedvapp.xml");

      VApp result = factory.create(injector.getInstance(VAppHandler.class)).parse(is);

      VApp expects = new VAppImpl("centos53", URI
               .create("http://10.150.4.49/api/v0.8/vApp/10"), Status.RESOLVED, 123456789l, new ReferenceTypeImpl(null,
               "application/vnd.vmware.vcloud.vdc+xml", URI.create("http://10.150.4.49/api/v0.8/vdc/4")),
               ImmutableListMultimap.<String, String> of(), null, null, null, ImmutableSet
                        .<ResourceAllocationSettingData> of());
      assertEquals(result, expects);
   }
View Full Code Here

               ResourceAllocationSettingData.builder().instanceID("9").elementName("Hard Disk 1").resourceType(
                        ResourceType.DISK_DRIVE).hostResource("104857").addressOnParent("0").parent("3")
                        .virtualQuantity(104857l).build());

      VApp expects = new VAppImpl("centos53", URI
               .create("http://10.150.4.49/api/v0.8/vApp/10"), Status.ON, Long.valueOf(104857), new ReferenceTypeImpl(null,
               "application/vnd.vmware.vcloud.vdc+xml", URI.create("http://10.150.4.49/api/v0.8/vdc/4")),
               networkToAddresses, null, "Other Linux (32-bit)", system, resourceAllocations);
      assertEquals(result.getHref(), expects.getHref());
      assertEquals(result.getName(), expects.getName());
      assertEquals(result.getNetworkToAddresses(), expects.getNetworkToAddresses());
View Full Code Here

   public void testApplyInputStream() {
      InputStream is = getClass().getResourceAsStream("/orglist.xml");

      Map<String, ReferenceType> result = factory.create(injector.getInstance(OrgListHandler.class)).parse(is);
      assertEquals(result, ImmutableMap.of("adrian@jclouds.org", new ReferenceTypeImpl("adrian@jclouds.org",
               "application/vnd.vmware.vcloud.org+xml", URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48"))));
   }
View Full Code Here

               ResourceAllocationSettingData.builder().instanceID("9").elementName("Hard Disk 1").resourceType(
                        ResourceType.DISK_DRIVE).hostResource("10485760").addressOnParent("0").parent("3")
                        .virtualQuantity(10485760l).build());

      VApp expects = new VAppImpl("m1", URI.create("http://localhost:8000/api/v0.8/vApp/80"),
               Status.ON, Long.valueOf(10485760), new ReferenceTypeImpl(null, "application/vnd.vmware.vcloud.vdc+xml", URI
                        .create("http://localhost:8000/api/v0.8/vdc/28")), networkToAddresses, null,
               "Microsoft Windows XP Professional (32-bit)", system, resourceAllocations);
      assertEquals(result.getHref(), expects.getHref());
      assertEquals(result.getName(), expects.getName());
      assertEquals(result.getNetworkToAddresses(), expects.getNetworkToAddresses());
View Full Code Here

      InputStream is = getClass().getResourceAsStream("/org.xml");

      Org result =  factory.create(injector.getInstance(OrgHandler.class)).parse(is);
      assertEquals(result.getName(), "adrian@jclouds.org");
      assertEquals(result.getHref(), URI.create("https://services.vcloudexpress.terremark.com/api/v0.8a-ext1.6/org/48"));
      assertEquals(result.getCatalogs(), ImmutableMap.of("Miami Environment 1 Catalog", new ReferenceTypeImpl(
               "Miami Environment 1 Catalog", CATALOG_XML, URI
                        .create("https://services.vcloudexpress.terremark.com/api/v0.8a-ext1.6/vdc/32/catalog"))));
      assertEquals(result.getVDCs(), ImmutableMap.of("Miami Environment 1", new ReferenceTypeImpl(
               "Miami Environment 1", TerremarkVCloudMediaType.VDC_XML, URI
                        .create("https://services.vcloudexpress.terremark.com/api/v0.8a-ext1.6/vdc/32"))));
      assertEquals(result.getTasksLists(), ImmutableMap.of(
            "Miami Environment 1 Tasks List",
            new ReferenceTypeImpl("Miami Environment 1 Tasks List", TASKSLIST_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8a-ext1.6/vdc/32/tasksList"))));
      assertEquals(result.getKeys(), new ReferenceTypeImpl("Keys", "application/vnd.tmrk.vcloudExpress.keysList+xml",
               URI.create("https://services.vcloudexpress.terremark.com/api/v0.8a-ext1.6/extensions/org/48/keys")));

   }
View Full Code Here

                  .getName(), ImmutableMap.<String, org.jclouds.trmk.vcloud_0_8.domain.Catalog> of(
                  CATALOG_REF.getName(),
                  new CatalogImpl(CATALOG_REF.getName(), CATALOG_REF.getType(), CATALOG_REF.getHref(), null,
                        ImmutableMap.<String, ReferenceType> of(
                              "item",
                              new ReferenceTypeImpl("item", "application/vnd.vmware.vcloud.catalogItem+xml", URI
                                    .create("https://vcloud.safesecureweb.com/api/v0.8/catalogItem/1")),
                              "template",
                              new ReferenceTypeImpl("template", "application/vnd.vmware.vcloud.vAppTemplate+xml", URI
                                    .create("https://vcloud.safesecureweb.com/api/v0.8/catalogItem/2"))))));
         }
View Full Code Here

                                          "template",
                                          new CatalogItemImpl(
                                                "template",
                                                URI.create("https://vcloud.safesecureweb.com/api/v0.8/catalogItem/2"),
                                                "description",
                                                new ReferenceTypeImpl(
                                                      "template",
                                                      "application/vnd.vmware.vcloud.vAppTemplate+xml",
                                                      URI.create("https://vcloud.safesecureweb.com/api/v0.8/vAppTemplate/2")),
                                                null, null, ImmutableMap.<String, String> of()))));
View Full Code Here

      assertEquals(result.getStatus(), Status.UNRESOLVED);

      assertEquals(result.getSize().longValue(), 4l);

      assertEquals(result.getHref(), URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/vapp/13775"));
      assertEquals(result.getVDC(), new ReferenceTypeImpl(null, "application/vnd.vmware.vcloud.vdc+xml", URI
               .create("https://services.vcloudexpress.terremark.com/api/v0.8/vdc/32")));

   }
View Full Code Here

      assertEquals(result.getSize().longValue(), 10485760);
      assertEquals(result.getOperatingSystemDescription(), "Red Hat Enterprise Linux 5 (64-bit)");

      assertEquals(result.getHref(), URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/vapp/16238"));
      assertEquals(result.getVDC(), new ReferenceTypeImpl(null, TerremarkVCloudMediaType.VDC_XML, URI
               .create("https://services.vcloudexpress.terremark.com/api/v0.8/vdc/32")));

      VirtualSystemSettingData system = VirtualSystemSettingData.builder().instanceID("0").elementName(
               "Virtual Hardware Family").virtualSystemIdentifier("centos-53").virtualSystemType("vmx-07").build();
      assertEquals(result.getSystem().toString(), system.toString());
View Full Code Here

TOP

Related Classes of org.jclouds.trmk.vcloud_0_8.domain.InternetService

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.