Package org.jclouds.vcloud.director.v1_5.domain

Examples of org.jclouds.vcloud.director.v1_5.domain.Metadata


            responseWithAccess,
            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(OK.getStatusCode()).payload(payloadFromResource("/metadata-list.json")).build()
      ).getNodeApiForZoneAndLoadBalancer("DFW", 2000);

      Metadata metadata = api.getMetadata(410);
      assertEquals(metadata, getExpectedMetadataWithIds());
   }
View Full Code Here


               .endpoint(endpoint)
               .payload(payloadFromResourceWithContentType("/metadata-create.json", APPLICATION_JSON)).build(),
            HttpResponse.builder().statusCode(OK.getStatusCode()).payload(payloadFromResource("/metadata-list.json")).build()
      ).getNodeApiForZoneAndLoadBalancer("DFW", 2000);
        
      Metadata metadata = api.createMetadata(410, getExpectedMetadata());
      assertEquals(metadata, getExpectedMetadataWithIds());
   }
View Full Code Here

     
      assertTrue(api.deleteMetadata(410, ImmutableList.<Integer> of(23, 24)));
   }

   private Metadata getExpectedMetadata() {
      Metadata metadata = new Metadata();
      metadata.put("color", "red");
      metadata.put("label", "web-load-balancer");
      metadata.put("os", "ubuntu");

      return metadata;
   }
View Full Code Here

      return metadata;
   }

   private Metadata getExpectedMetadataWithIds() {
      Metadata metadata = getExpectedMetadata();
      metadata.putId("color", 1);
      metadata.putId("label", 2);
      metadata.putId("os", 3);

      return metadata;
   }
View Full Code Here

            responseWithAccess,
            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(OK.getStatusCode()).payload(payloadFromResource("/metadata-list.json")).build()
      ).getLoadBalancerApiForZone("DFW");

      Metadata metadata = api.getMetadata(2000);
      assertEquals(metadata, getExpectedMetadataWithIds());
   }
View Full Code Here

               .endpoint(endpoint)
               .payload(payloadFromResourceWithContentType("/metadata-create.json", APPLICATION_JSON)).build(),
            HttpResponse.builder().statusCode(OK.getStatusCode()).payload(payloadFromResource("/metadata-list.json")).build()
      ).getLoadBalancerApiForZone("DFW");
        
      Metadata metadata = api.createMetadata(2000, getExpectedMetadata());
      assertEquals(metadata, getExpectedMetadataWithIds());
   }
View Full Code Here

   private Set<LoadBalancer> getExpectedLoadBalancers() {     
      return new ParseLoadBalancersTest().data();
   }  

   private Metadata getExpectedMetadata() {
      Metadata metadata = new Metadata();
      metadata.put("os", "ubuntu");
      metadata.put("color", "red");
      metadata.put("label", "web-load-balancer");

      return metadata;
   }
View Full Code Here

      return metadata;
   }

   private Metadata getExpectedMetadataWithIds() {
      Metadata metadata = getExpectedMetadata();
      metadata.putId("color", 1);
      metadata.putId("label", 2);
      metadata.putId("os", 3);

      return metadata;
   }
View Full Code Here

      }
   }

   @Test(description = "GET /admin/vdc/{id}/metadata")
   public void testGetMetadata() throws Exception {
      Metadata metadata = metadataApi.get();

      Checks.checkMetadata(metadata);
   }
View Full Code Here

      key = name("key-");
      String value = name("value-");
      context.getApi().getMetadataApi(vAppUrn).put(key, value);

      // Call the method being tested
      Metadata metadata = context.getApi().getMetadataApi(vAppUrn).get();

      checkMetadata(metadata);

      // Check requirements for this test
      assertFalse(Iterables.isEmpty(metadata.getMetadataEntries()),
               String.format(NOT_EMPTY_OBJECT_FMT, "MetadataEntry", "vApp"));
   }
View Full Code Here

TOP

Related Classes of org.jclouds.vcloud.director.v1_5.domain.Metadata

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.