Package org.jclouds.vcloud.domain.internal

Examples of org.jclouds.vcloud.domain.internal.ReferenceTypeImpl


      assertEquals(result.getName(), "Ubuntu10.04_v2");
      assertEquals(result.getHref(), URI
               .create("https://vcenterprise.bluelock.com/api/v1.0/vAppTemplate/vappTemplate-699683881"));
      assertEquals(result.getType(), "application/vnd.vmware.vcloud.vAppTemplate+xml");
      assertEquals(result.getStatus(), Status.UNRESOLVED);
      assertEquals(result.getVDC(), new ReferenceTypeImpl(null, VCloudMediaType.VDC_XML, URI
               .create("https://vcenterprise.bluelock.com/api/v1.0/vdc/105186609")));
      assertEquals(result.getDescription(), null);
      assertEquals(result.getTasks(), ImmutableList.of(new TaskImpl(URI
               .create("https://vcenterprise.bluelock.com/api/v1.0/task/q62gxhi32xgd9yrqvr"),
               "Copying Virtual Application Template Ubuntu10.04_v2(699683881)", TaskStatus.RUNNING, dateService
                        .iso8601DateParse("2010-09-17T23:20:46.039-04:00"), dateService
                        .iso8601DateParse("9999-12-31T23:59:59.999-05:00"), dateService
                        .iso8601DateParse("2010-12-16T23:20:46.039-05:00"), new ReferenceTypeImpl("Ubuntu10.04_v2",
                        "application/vnd.vmware.vcloud.vAppTemplate+xml",
                        URI.create("https://vcenterprise.bluelock.com/api/v1.0/vAppTemplate/vappTemplate-699683881")),
               null)));
      assertEquals(result.getVAppScopedLocalId(), null);
      assert result.isOvfDescriptorUploaded();
View Full Code Here


      Task expects = new TaskImpl(URI.create("https://vcenterprise.bluelock.com/api/v1.0/task/3cc08ir8oczbze3n1a3"),
               "Creating Virtual Application vApp_acole_2(607806320)", TaskStatus.RUNNING, dateService
                        .iso8601DateParse("2010-08-23T02:09:52.443-04:00"), dateService
                        .iso8601DateParse("9999-12-31T23:59:59.999-05:00"), dateService
                        .iso8601DateParse("2010-11-21T02:09:52.443-05:00"), new ReferenceTypeImpl("vApp_acole_2",
                        VCloudMediaType.VAPP_XML, URI
                                 .create("https://vcenterprise.bluelock.com/api/v1.0/vApp/vapp-607806320"))

               , null
View Full Code Here

      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",
                        VCloudMediaType.VAPP_XML, URI
                                 .create("https://services.vcloudexpress.terremark.com/api/v0.8/vapp/4012")), null

      );
      assertEquals(result, expects);
View Full Code Here

      Task expects = new TaskImpl(URI.create("https://vcloud.safesecureweb.com/api/v0.8/task/97806"), null,
               TaskStatus.SUCCESS, dateService.iso8601SecondsDateParse("2010-01-14T20:04:51Z"), dateService
                        .iso8601SecondsDateParse("2010-01-14T20:05:02Z"), dateService
                        .iso8601SecondsDateParse("2010-01-15T20:05:02Z"),

               new ReferenceTypeImpl("188849-96", VCloudMediaType.VAPP_XML, URI
                        .create("https://vcloud.safesecureweb.com/api/v0.8/vapp/188849-96")), null);
      assertEquals(result, expects);
   }
View Full Code Here

      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",
                        VCloudMediaType.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));
      assertEquals(result, expects);
View Full Code Here

      assertEquals(result.getHref(), URI
               .create("https://vcenterprise.bluelock.com/api/v1.0/vApp/vm-2087535248/networkConnectionSection/"));
      assertEquals(result.getType(), VCloudMediaType.NETWORKCONNECTIONSECTION_XML);
      assertEquals(result.getInfo(), "Specifies the available VM network connections");
      assertEquals(result.getPrimaryNetworkConnectionIndex(), Integer.valueOf(0));
      assertEquals(result.getEdit(), new ReferenceTypeImpl(null, VCloudMediaType.NETWORKCONNECTIONSECTION_XML, URI
               .create("https://vcenterprise.bluelock.com/api/v1.0/vApp/vm-2087535248/networkConnectionSection/")));
      NetworkConnectionHandlerTest.checkNetworkConnection(Iterables.getOnlyElement(result.getConnections()));
   }
View Full Code Here

      InputStream is = getClass().getResourceAsStream("/catalog-blank.xml");
      injector = Guice.createInjector(new SaxParserModule());
      factory = injector.getInstance(ParseSax.Factory.class);
      Catalog result = factory.create(injector.getInstance(CatalogHandler.class)).parse(is);
      assertEquals(result, new CatalogImpl("Jclouds-private", "application/vnd.vmware.vcloud.catalog+xml", URI
               .create("https://vcenterprise.bluelock.com/api/v1.0/catalog/921222081"), new ReferenceTypeImpl(null,
               "application/vnd.vmware.vcloud.org+xml", URI
                        .create("https://vcenterprise.bluelock.com/api/v1.0/org/9566014")), null, ImmutableMap
               .<String, ReferenceType> of(), ImmutableList.<Task> of(), false, false));
   }
View Full Code Here

      Catalog result = factory.create(injector.getInstance(CatalogHandler.class)).parse(is);
      assertEquals(result.getName(), "Miami Environment 1");
      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

      Factory factory = injector.getInstance(ParseSax.Factory.class);
      CatalogItem result = factory.create(injector.getInstance(CatalogItemHandler.class)).parse(is);

      assertEquals(result, new CatalogItemImpl("Windows 2008 Datacenter 64 Bit", URI
               .create("https://vcloud.safesecureweb.com/api/v0.8/catalogItem/2"), "Windows 2008 Datacenter 64 Bit",
               new ReferenceTypeImpl("Windows 2008 Datacenter 64 Bit",
                        "application/vnd.vmware.vcloud.vAppTemplate+xml", URI
                                 .create("https://vcloud.safesecureweb.com/api/v0.8/vAppTemplate/2")),
               ImmutableSortedMap.of("Foo", "Bar", "Hello", "World"

               )));
View Full Code Here

      Factory factory = injector.getInstance(ParseSax.Factory.class);
      CatalogItem result = factory.create(injector.getInstance(CatalogItemHandler.class)).parse(is);

      assertEquals(result, new CatalogItemImpl("ubuntu10.10x64",
               URI.create("https://myvdc.carrenza.net/api/v1.0/catalogItem/ecd4d3a0-0d12-4195-a6d2-14cdf9f925a3"),
               null, new ReferenceTypeImpl("ubuntu10.10x64", "application/vnd.vmware.vcloud.vAppTemplate+xml",
                        URI.create("https://myvdc.carrenza.net/api/v1.0/vAppTemplate/vappTemplate-123766ea-2b55-482c-8adf-735ab1952834")),
               ImmutableSortedMap.<String,String>of()));
   }
View Full Code Here

TOP

Related Classes of org.jclouds.vcloud.domain.internal.ReferenceTypeImpl

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.