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

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


        
      }

      ImmutableList.Builder<Link> links = ImmutableList.builder();
      for(Map<String, String> linkMap : (List<Map<String, String>>) scalingPolicyMap.get("links")) {
         Link link = Link.builder().href(URI.create(linkMap.get("href"))).relation(Relation.fromValue(linkMap.get("rel"))).build();
         links.add(link);
      }

      Double d = (Double)scalingPolicyMap.get(targetType.toString()); // GSON only knows double now
      ScalingPolicyResponse scalingPolicyResponse =
View Full Code Here


           
         }

         ImmutableList.Builder<Link> links = ImmutableList.builder();
         for(Map<String, String> linkMap : (List<Map<String, String>>) scalingPolicyMap.get("links")) {
            Link link = Link.builder().href(URI.create(linkMap.get("href"))).relation(Relation.fromValue(linkMap.get("rel"))).build();
            links.add(link);
         }

         Double d = (Double)scalingPolicyMap.get(targetType.toString()); // GSON only knows double now
         ScalingPolicyResponse scalingPolicyResponse =
View Full Code Here

           
         }

         ImmutableList.Builder<Link> links = ImmutableList.builder();
         for(Map<String, String> linkMap : (List<Map<String, String>>) scalingPolicyMap.get("links")) {
            Link link = Link.builder().href(URI.create(linkMap.get("href"))).relation(Relation.fromValue(linkMap.get("rel"))).build();
            links.add(link);
         }

         Double d = (Double)scalingPolicyMap.get(targetType.toString()); // GSON only knows double now

         ScalingPolicyResponse scalingPolicyResponse =
               new ScalingPolicyResponse(
                     (String)scalingPolicyMap.get("name"),
                     ScalingPolicyType.getByValue((String)scalingPolicyMap.get("type")).get(),
                     ((Double)scalingPolicyMap.get("cooldown")).intValue(),
                     DoubleMath.isMathematicalInteger(d) ? Integer.toString(d.intValue()) : Double.toString(d),
                           targetType,
                           ImmutableList.copyOf(links.build()),
                           (String) scalingPolicyMap.get("id")
                     );
         scalingPoliciesList.add(scalingPolicyResponse);
      }

      ImmutableList.Builder<Link> links = ImmutableList.builder();
      for(Map<String, String> linkMap : (List<Map<String, String>>) group.get("links")) {
         Link link = Link.builder().href(URI.create(linkMap.get("href"))).relation(Relation.fromValue(linkMap.get("rel"))).build();
         links.add(link);
      }

      String groupId = (String) group.get("id");
      return Group.builder()
View Full Code Here

        
      }

      ImmutableList.Builder<Link> links = ImmutableList.builder();
      for(Map<String, String> linkMap : (List<Map<String, String>>) scalingPolicyMap.get("links")) {
         Link link = Link.builder().href(URI.create(linkMap.get("href"))).relation(Relation.fromValue(linkMap.get("rel"))).build();
         links.add(link);
      }

      Double d = (Double)scalingPolicyMap.get(targetType.toString()); // GSON only knows double now
      ScalingPolicy scalingPolicyResponse =
View Full Code Here

           
         }

         ImmutableList.Builder<Link> links = ImmutableList.builder();
         for(Map<String, String> linkMap : (List<Map<String, String>>) scalingPolicyMap.get("links")) {
            Link link = Link.builder().href(URI.create(linkMap.get("href"))).relation(Relation.fromValue(linkMap.get("rel"))).build();
            links.add(link);
         }

         Double d = (Double)scalingPolicyMap.get(targetType.toString()); // GSON only knows double now
         ScalingPolicy scalingPolicyResponse =
View Full Code Here

           
         }

         ImmutableList.Builder<Link> links = ImmutableList.builder();
         for(Map<String, String> linkMap : (List<Map<String, String>>) scalingPolicyMap.get("links")) {
            Link link = Link.builder().href(URI.create(linkMap.get("href"))).relation(Relation.fromValue(linkMap.get("rel"))).build();
            links.add(link);
         }

         Double d = (Double)scalingPolicyMap.get(targetType.toString()); // GSON only knows double now

         ScalingPolicy scalingPolicyResponse =
               new ScalingPolicy(
                     (String)scalingPolicyMap.get("name"),
                     ScalingPolicyType.getByValue((String)scalingPolicyMap.get("type")).get(),
                     ((Double)scalingPolicyMap.get("cooldown")).intValue(),
                     DoubleMath.isMathematicalInteger(d) ? Integer.toString(d.intValue()) : Double.toString(d),
                           targetType,
                           (Map<String, String>) scalingPolicyMap.get("args"),
                           ImmutableList.copyOf(links.build()),
                           (String) scalingPolicyMap.get("id")
                     );
         scalingPoliciesList.add(scalingPolicyResponse);
      }

      ImmutableList.Builder<Link> links = ImmutableList.builder();
      for(Map<String, String> linkMap : (List<Map<String, String>>) group.get("links")) {
         Link link = Link.builder().href(URI.create(linkMap.get("href"))).relation(Relation.fromValue(linkMap.get("rel"))).build();
         links.add(link);
      }

      String groupId = (String) group.get("id");
      return Group.builder()
View Full Code Here

        
      }

      ImmutableList.Builder<Link> links = ImmutableList.builder();
      for (Map<String, String> linkMap : (List<Map<String, String>>) scalingPolicyMap.get("links")) {
         Link link = Link.builder().href(URI.create(linkMap.get("href"))).relation(Relation.fromValue(linkMap.get("rel"))).build();
         links.add(link);
      }

      Double d = (Double)scalingPolicyMap.get(targetType.toString()); // GSON only knows double now
      ScalingPolicy scalingPolicyResponse =
View Full Code Here

           
         }

         ImmutableList.Builder<Link> links = ImmutableList.builder();
         for (Map<String, String> linkMap : (List<Map<String, String>>) scalingPolicyMap.get("links")) {
            Link link = Link.builder().href(URI.create(linkMap.get("href"))).relation(Relation.fromValue(linkMap.get("rel"))).build();
            links.add(link);
         }

         Double d = (Double)scalingPolicyMap.get(targetType.toString()); // GSON only knows double now
         ScalingPolicy scalingPolicyResponse =
View Full Code Here

           
         }

         ImmutableList.Builder<Link> links = ImmutableList.builder();
         for (Map<String, String> linkMap : (List<Map<String, String>>) scalingPolicyMap.get("links")) {
            Link link = Link.builder().href(URI.create(linkMap.get("href"))).relation(Relation.fromValue(linkMap.get("rel"))).build();
            links.add(link);
         }

         Double d = (Double)scalingPolicyMap.get(targetType.toString()); // GSON only knows double now

         ScalingPolicy scalingPolicyResponse =
               new ScalingPolicy(
                     (String)scalingPolicyMap.get("name"),
                     ScalingPolicyType.getByValue((String)scalingPolicyMap.get("type")).get(),
                     ((Double)scalingPolicyMap.get("cooldown")).intValue(),
                     DoubleMath.isMathematicalInteger(d) ? Integer.toString(d.intValue()) : Double.toString(d),
                           targetType,
                           (Map<String, String>) scalingPolicyMap.get("args"),
                           ImmutableList.copyOf(links.build()),
                           (String) scalingPolicyMap.get("id")
                     );
         scalingPoliciesList.add(scalingPolicyResponse);
      }

      ImmutableList.Builder<Link> links = ImmutableList.builder();
      for (Map<String, String> linkMap : (List<Map<String, String>>) group.get("links")) {
         Link link = Link.builder().href(URI.create(linkMap.get("href"))).relation(Relation.fromValue(linkMap.get("rel"))).build();
         links.add(link);
      }

      String groupId = (String) group.get("id");
      return Group.builder()
View Full Code Here

                        .build()).deleteOnStorageLeaseExpiration(false).storageLeaseSeconds(0).build();
   }

   @Test(enabled = false)
   public void testEditOrgVAppTemplateLeaseSettings() {
      VCloudDirectorAdminApi api = requestsSendResponses(
               loginRequest,
               sessionResponse,
               new VcloudHttpRequestPrimer()
                        .apiCommand("PUT",
                                 "/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/settings/vAppTemplateLeaseSettings")
                        .xmlFilePayload("/org/admin/editVAppLeaseSettingsSource.xml",
                                 VCloudDirectorMediaType.ORG_VAPP_TEMPLATE_LEASE_SETTINGS)
                        .acceptMedia(VCloudDirectorMediaType.ORG_VAPP_TEMPLATE_LEASE_SETTINGS).httpRequestBuilder()
                        .build(),
               new VcloudHttpResponsePrimer()
                        .xmlFilePayload("/org/admin/editVAppLeaseSettings.xml",
                                 VCloudDirectorMediaType.ORG_VAPP_TEMPLATE_LEASE_SETTINGS).httpResponseBuilder()
                        .build());

      OrgVAppTemplateLeaseSettings expected = editVAppTemplateLeaseSettings();

      assertEquals(api.getOrgApi().editVAppTemplateLeaseSettings(orgRef.getHref(), expected), expected);
   }
View Full Code Here

TOP

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

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.