Package org.jclouds.vcloud.domain.internal

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


      assertEquals(result.getHref(), URI.create("https://vcenterprise.bluelock.com/api/v1.0/vApp/vapp-607806320"));
      assertEquals(result.getType(), "application/vnd.vmware.vcloud.vApp+xml");
      assertEquals(result.getStatus(), Status.OFF);
      assertEquals(
            result.getVDC(),
            new ReferenceTypeImpl(null, VCloudMediaType.VDC_XML, URI
                  .create("https://vcenterprise.bluelock.com/api/v1.0/vdc/1014839439")));
      assertEquals(result.getTasks(), ImmutableList.of());
      assert result.isOvfDescriptorUploaded();
      assert result.getNetworkSection() != null;
      Vm vm = Iterables.getOnlyElement(result.getChildren());
View Full Code Here


         @Network
         @Provides
         @Singleton
         Supplier<ReferenceType> provideNetwork() {
            return Suppliers.<ReferenceType>ofInstance(new ReferenceTypeImpl(null, null, URI
                     .create("https://vcenterprise.bluelock.com/api/v1.0/network/1990")));
         }
      }));
   }
View Full Code Here

   public void testMatchWhenIdIsHref() {
      Location location = new LocationBuilder().id("http://foo").description("description")
            .scope(LocationScope.PROVIDER).build();
      FindLocationForResource converter = new FindLocationForResource(
            Suppliers.<Set<? extends Location>> ofInstance(ImmutableSet.<Location> of(location)));
      assertEquals(converter.apply(new ReferenceTypeImpl("name", "type", URI.create("http://foo"))), location);
   }
View Full Code Here

      response.getPayload().getContentMetadata().setContentType("Content-Type: application/xml; charset=utf-8");
      response.getPayload().getContentMetadata().setContentLength(307l);

      VCloudSession reply = parser.apply(response);
      assertEquals(reply.getVCloudToken(), "9er4d061-4bff-48fa-84b1-5da7166764d2");
      assertEquals(reply.getOrgs(), ImmutableMap.of("adrian@jclouds.org", new ReferenceTypeImpl("adrian@jclouds.org",
               VCloudMediaType.ORG_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48"))));

   }
View Full Code Here

   @Test(expectedExceptions = NoSuchElementException.class)
   public void testGracefulWhenHrefIsntLocationId() {
      FindLocationForResource converter = new FindLocationForResource(
            Suppliers.<Set<? extends Location>> ofInstance(ImmutableSet.<Location> of(new LocationBuilder()
                  .id("http://bar").description("description").scope(LocationScope.PROVIDER).build())));
      converter.apply(new ReferenceTypeImpl("name", "type", URI.create("http://foo")));
   }
View Full Code Here

      response.getPayload().getContentMetadata().setContentType("Content-Type: application/xml; charset=utf-8");
      response.getPayload().getContentMetadata().setContentLength(307l);

      VCloudSession reply = parser.apply(response);
      assertEquals(reply.getVCloudToken(), "MUKOJ2HoAfoMmLnHRp4esNb2MtWscCLLhVysnsIsCG0=");
      assertEquals(reply.getOrgs(), ImmutableMap.of("adrian@jclouds.org", new ReferenceTypeImpl("adrian@jclouds.org",
               VCloudMediaType.ORG_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48"))));

   }
View Full Code Here

      response.getPayload().getContentMetadata().setContentType("Content-Type: application/xml; charset=utf-8");
      response.getPayload().getContentMetadata().setContentLength(307l);

      VCloudSession reply = parser.apply(response);
      assertEquals(reply.getVCloudToken(), "37ce2715-9aba-4f48-8e45-2db8a8da702d");
      assertEquals(reply.getOrgs(), ImmutableMap.of("adrian@jclouds.org", new ReferenceTypeImpl("adrian@jclouds.org",
               VCloudMediaType.ORG_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48"))));

   }
View Full Code Here

      response.getPayload().getContentMetadata().setContentType("Content-Type: application/xml; charset=utf-8");
      response.getPayload().getContentMetadata().setContentLength(307l);

      VCloudSession reply = parser.apply(response);
      assertEquals(reply.getVCloudToken(), "37ce2715-9aba-4f48-8e45-2db8a8da702d");
      assertEquals(reply.getOrgs(), ImmutableMap.of("adrian@jclouds.org", new ReferenceTypeImpl("adrian@jclouds.org",
               VCloudMediaType.ORG_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48"))));

   }
View Full Code Here

      response.getPayload().getContentMetadata().setContentType("Content-Type: application/xml; charset=utf-8");
      response.getPayload().getContentMetadata().setContentLength(307l);

      VCloudSession reply = parser.apply(response);
      assertEquals(reply.getVCloudToken(), "IPy0w7UGD4lwtdWAK/ZVzfuLK+dztxGRqsOhWqV0i48=");
      assertEquals(reply.getOrgs(), ImmutableMap.of("adrian@jclouds.org", new ReferenceTypeImpl("adrian@jclouds.org",
               VCloudMediaType.ORG_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48"))));

   }
View Full Code Here

   @Test(expectedExceptions = NoSuchElementException.class)
   public void testGracefulWhenLocationIdIsntURI() {
      FindLocationForResource converter = new FindLocationForResource(
            Suppliers.<Set<? extends Location>> ofInstance(ImmutableSet.<Location> of(new LocationBuilder().id("1")
                  .description("description").scope(LocationScope.PROVIDER).build())));
      converter.apply(new ReferenceTypeImpl("name", "type", URI.create("http://foo")));
   }
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.