Package org.jclouds.trmk.vcloud_0_8.domain

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


   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

      assertEquals(vApp.getSize().longValue(), 30408704);
      assertEquals(vApp.getOperatingSystemDescription(), "Ubuntu Linux (32-bit)");

      assertEquals(vApp.getHref(), URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/vapp/15639"));
      assertEquals(vApp.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("eduardo").virtualSystemType("vmx-07").build();
      assertEquals(vApp.getSystem().toString(), system.toString());
View Full Code Here

      assert result.getDescription() == null;

      assertEquals(result.getHref(), URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/vdc/32/catalog"));
      assertEquals(
            result.get("CentOS 5.3 (32-bit)"),
            new ReferenceTypeImpl("CentOS 5.3 (32-bit)", CATALOGITEM_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/5")));
      assertEquals(
            result.get("CentOS 5.3 (64-bit)"),
            new ReferenceTypeImpl("CentOS 5.3 (64-bit)", CATALOGITEM_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/6")));
      assertEquals(
            result.get("RHEL 5.3 (32-bit)"),
            new ReferenceTypeImpl("RHEL 5.3 (32-bit)", CATALOGITEM_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/7")));
      assertEquals(
            result.get("RHEL 5.3 (64-bit)"),
            new ReferenceTypeImpl("RHEL 5.3 (64-bit)", CATALOGITEM_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/8")));
      assertEquals(result.get("Ubuntu JeOS 9.04 (32-bit)"), new ReferenceTypeImpl("Ubuntu JeOS 9.04 (32-bit)",
            CATALOGITEM_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/11")));
      assertEquals(result.get("Ubuntu JeOS 9.04 (64-bit)"), new ReferenceTypeImpl("Ubuntu JeOS 9.04 (64-bit)",
            CATALOGITEM_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/12")));
      assertEquals(result.get("Ubuntu Server 9.04 (32-bit)"), new ReferenceTypeImpl("Ubuntu Server 9.04 (32-bit)",
            CATALOGITEM_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/9")));
      assertEquals(result.get("Ubuntu Server 9.04 (64-bit)"), new ReferenceTypeImpl("Ubuntu Server 9.04 (64-bit)",
            CATALOGITEM_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/10")));
      assertEquals(
            result.get("Windows 2003 Enterprise R2 (32-bit)"),
            new ReferenceTypeImpl("Windows 2003 Enterprise R2 (32-bit)", CATALOGITEM_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/1")));
      assertEquals(
            result.get("Windows 2003 Enterprise R2 (64-bit)"),
            new ReferenceTypeImpl("Windows 2003 Enterprise R2 (64-bit)", CATALOGITEM_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/2")));
      assertEquals(
            result.get("Windows 2003 Standard R2 (32-bit)"),
            new ReferenceTypeImpl("Windows 2003 Standard R2 (32-bit)", CATALOGITEM_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/3")));
      assertEquals(
            result.get("Windows 2003 Standard R2 (64-bit)"),
            new ReferenceTypeImpl("Windows 2003 Standard R2 (64-bit)", CATALOGITEM_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/4")));
      assertEquals(
            result.get("Windows 2003 Standard R2 w.SQL 2008 Web (64-bit)"),
            new ReferenceTypeImpl("Windows 2003 Standard R2 w.SQL 2008 Web (64-bit)", CATALOGITEM_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/23")));
      assertEquals(
            result.get("Windows Server 2008 Enterprise (32-bit)"),
            new ReferenceTypeImpl("Windows Server 2008 Enterprise (32-bit)", CATALOGITEM_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/13")));
      assertEquals(
            result.get("Windows Server 2008 Enterprise (64-bit)"),
            new ReferenceTypeImpl("Windows Server 2008 Enterprise (64-bit)", CATALOGITEM_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/15")));
      assertEquals(
            result.get("Windows Server 2008 Enterprise R2 (64-bit)"),
            new ReferenceTypeImpl("Windows Server 2008 Enterprise R2 (64-bit)", CATALOGITEM_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/16")));
      assertEquals(
            result.get("Windows Server 2008 Standard (32-bit)"),
            new ReferenceTypeImpl("Windows Server 2008 Standard (32-bit)", CATALOGITEM_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/17")));
      assertEquals(
            result.get("Windows Server 2008 Standard (64-bit)"),
            new ReferenceTypeImpl("Windows Server 2008 Standard (64-bit)", CATALOGITEM_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/18")));
      assertEquals(
            result.get("Windows Server 2008 Standard R2 (64-bit)"),
            new ReferenceTypeImpl("Windows Server 2008 Standard R2 (64-bit)", CATALOGITEM_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/19")));
      assertEquals(
            result.get("Windows Server 2008 Standard w.SQL 2008 Web (64-bit)"),
            new ReferenceTypeImpl("Windows Server 2008 Standard w.SQL 2008 Web (64-bit)", CATALOGITEM_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/14")));
      assertEquals(
            result.get("Windows Web Server 2008 (32-bit)"),
            new ReferenceTypeImpl("Windows Web Server 2008 (32-bit)", CATALOGITEM_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/20")));
      assertEquals(
            result.get("Windows Web Server 2008 (64-bit)"),
            new ReferenceTypeImpl("Windows Web Server 2008 (64-bit)", CATALOGITEM_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/21")));
      assertEquals(
            result.get("Windows Web Server 2008 R2 (64-bit)"),
            new ReferenceTypeImpl("Windows Web Server 2008 R2 (64-bit)", CATALOGITEM_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8/catalogItem/22")));
   }
View Full Code Here

      assertEquals(result.getHref(),
            URI.create("https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8/org/1910324"));

      assertEquals(result.getVDCs(), ImmutableMap.of(
            "Cloud Conscious LLC - MIA",
            new ReferenceTypeImpl("Cloud Conscious LLC - MIA", TerremarkECloudMediaType.VDC_XML, URI
                  .create("https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8/vdc/1155")),
            "Cloud Conscious LLC - AMA",
            new ReferenceTypeImpl("Cloud Conscious LLC - AMA", TerremarkECloudMediaType.VDC_XML, URI
                  .create("https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8/vdc/1169"))));

      assertEquals(result.getCatalogs(), ImmutableMap.of(
            "Cloud Conscious LLC - MIA Catalog",
            new ReferenceTypeImpl("Cloud Conscious LLC - MIA Catalog", TerremarkECloudMediaType.CATALOG_XML, URI
                  .create("https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8/vdc/1155/catalog")),
            "Cloud Conscious LLC - AMA Catalog",
            new ReferenceTypeImpl("Cloud Conscious LLC - AMA Catalog", TerremarkECloudMediaType.CATALOG_XML, URI
                  .create("https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8/vdc/1169/catalog"))));

      assertEquals(result.getTasksLists(), ImmutableMap.of(
            "Cloud Conscious LLC - MIA Tasks List",
            new ReferenceTypeImpl("Cloud Conscious LLC - MIA Tasks List", TerremarkECloudMediaType.TASKSLIST_XML, URI
                  .create("https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8/vdc/1155/tasksList")),
            "Cloud Conscious LLC - AMA Tasks List",
            new ReferenceTypeImpl("Cloud Conscious LLC - AMA Tasks List", TerremarkECloudMediaType.TASKSLIST_XML, URI
                  .create("https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8/vdc/1169/tasksList"))));

      assertEquals(
            result.getKeys(),
            new ReferenceTypeImpl(
                  "Keys",
                  "application/vnd.tmrk.ecloud.keysList+xml",
                  URI.create("https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8/extensions/org/1910324/keys")));

      assertEquals(
            result.getTags(),
            new ReferenceTypeImpl(
                  "Device Tags",
                  "application/vnd.tmrk.ecloud.tagsList+xml",
                  URI.create("https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8/extensions/org/1910324/deviceTags")));

      assertEquals(
            result.getVAppCatalog(),
            new ReferenceTypeImpl(
                  "VApp Catalog",
                  "application/vnd.tmrk.ecloud.VAppCatalogList+xml",
                  URI.create("https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8/extensions/org/1910324/vappCatalog")));
     
      assertEquals(
            result.getDataCenters(),
            new ReferenceTypeImpl(
                  "DataCenters",
                  "application/vnd.tmrk.ecloud.dataCentersList+xml",
                  URI.create("https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8/extensions/org/1910324/dataCenters")));

   }
View Full Code Here

TOP

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

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.