Package org.jclouds.trmk.vcloud_0_8.domain.internal

Examples of org.jclouds.trmk.vcloud_0_8.domain.internal.CatalogItemImpl


      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


                  .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

   public void testTerremark() {
      InputStream is = getClass().getResourceAsStream("/task.xml");

      Task result = factory.create(injector.getInstance(TaskHandler.class)).parse(is);
      Task expects = new TaskImpl(URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/task/3299"), null,
            TaskStatus.SUCCESS, dateService.iso8601DateParse("2009-08-24T21:29:32.983Z"),
            dateService.iso8601DateParse("2009-08-24T21:29:44.65Z"), null, new ReferenceTypeImpl("Server1",
                  TerremarkVCloudMediaType.VAPP_XML,
                  URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/vapp/4012")), null
View Full Code Here

   public void testSelf() {
      InputStream is = getClass().getResourceAsStream("/task-self.xml");

      Task result = factory.create(injector.getInstance(TaskHandler.class)).parse(is);

      Task expects = new TaskImpl(URI.create("https://vcloud.safesecureweb.com/api/v0.8/task/d188849-78"), null,
            TaskStatus.QUEUED, null, null, null, null, null);
      assertEquals(result, expects);

   }
View Full Code Here

   public void testError() {
      InputStream is = getClass().getResourceAsStream("/task-error.xml");

      Task result = factory.create(injector.getInstance(TaskHandler.class)).parse(is);

      Task expects = new TaskImpl(URI.create("http://10.150.4.49/api/v0.8/task/23"), null, TaskStatus.ERROR,
            dateService.iso8601SecondsDateParse("2009-12-07T19:05:02Z"),
            dateService.iso8601SecondsDateParse("2009-12-10T14:40:32Z"), null, new ReferenceTypeImpl("testapp1",
                  TerremarkVCloudMediaType.VAPP_XML, URI.create("http://10.150.4.49/api/v0.8/vapp/1")), new ErrorImpl(
                  "Error processing job", 500, MinorCode.UNRECOGNIZED,
                  " Error in runDailySummaries date used:2009-12-09 19:40:30.577326+00:00", null));
View Full Code Here

   public TasksListHandler(TaskHandler taskHandler) {
      this.taskHandler = taskHandler;
   }

   public TasksList getResult() {
      return new TasksListImpl(resource.getHref(), tasks);
   }
View Full Code Here

   public void testInstantiated() throws UnknownHostException {
      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());
      assertEquals(result.getOperatingSystemDescription(), expects.getOperatingSystemDescription());
      assertEquals(result.getResourceAllocations().toString(), expects.getResourceAllocations().toString());
      assertEquals(result.getSize(), expects.getSize());
      assertEquals(result.getStatus(), expects.getStatus());
      assertEquals(result.getSystem().toString(), expects.getSystem().toString());
      assertEquals(result.getType(), expects.getType());
      assertEquals(result.getVDC(), expects.getVDC());
   }
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());
      assertEquals(result.getOperatingSystemDescription(), expects.getOperatingSystemDescription());
      assertEquals(result.getResourceAllocations().toString(), expects.getResourceAllocations().toString());
      assertEquals(result.getSize(), expects.getSize());
      assertEquals(result.getStatus(), expects.getStatus());
      assertEquals(result.getSystem().toString(), expects.getSystem().toString());
      assertEquals(result.getType(), expects.getType());
      assertEquals(result.getVDC(), expects.getVDC());
   }
View Full Code Here

TOP

Related Classes of org.jclouds.trmk.vcloud_0_8.domain.internal.CatalogItemImpl

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.