Package org.jclouds.cloudstack.domain

Examples of org.jclouds.cloudstack.domain.Pod$Builder


         HttpResponse.builder()
            .statusCode(200)
            .payload(payloadFromResource("/listpodsresponse.json"))
            .build());

      Pod pod1 = Pod.builder()
         .id("1")
         .name("Dev Pod 1")
         .zoneId("1")
         .zoneName("Dev Zone 1")
         .gateway("10.26.26.254")
         .netmask("255.255.255.0")
         .startIp("10.26.26.50")
         .endIp("10.26.26.100")
         .allocationState(AllocationState.ENABLED)
         .build();
      Pod pod2 = Pod.builder()
         .id("2")
         .name("Dev Pod 2")
         .zoneId("2")
         .zoneName("Dev Zone 2")
         .gateway("10.22.22.254")
View Full Code Here


         HttpResponse.builder()
            .statusCode(200)
            .payload(payloadFromResource("/createpodresponse.json"))
            .build());

      Pod expected = Pod.builder()
         .id("6")
         .name("richard-pod")
         .zoneId("10")
         .zoneName("richard-zone")
         .gateway("172.20.0.254")
         .netmask("255.255.255.0")
         .startIp("172.20.0.1")
         .endIp("172.20.0.250")
         .allocationState(AllocationState.ENABLED)
         .build();

      Pod actual = client.createPod("richard-pod", "10", "172.20.0.1", "172.20.0.250", "172.20.0.254", "255.255.255.0",
         CreatePodOptions.Builder.allocationState(AllocationState.ENABLED));

      assertEquals(actual, expected);
   }
View Full Code Here

         HttpResponse.builder()
            .statusCode(200)
            .payload(payloadFromResource("/updatepodresponse.json"))
            .build());

      Pod expected = Pod.builder()
         .id("7")
         .name("richard-updatedpod")
         .zoneId("11")
         .zoneName("richard-zone")
         .gateway("172.21.0.254")
         .netmask("255.255.255.128")
         .startIp("172.21.0.129")
         .endIp("172.21.0.250")
         .allocationState(AllocationState.DISABLED)
         .build();

      Pod actual = client.updatePod("7", UpdatePodOptions.Builder
         .netmask("255.255.255.128")
         .name("richard-updatepod")
         .startIp("172.21.0.129")
         .endIp("172.21.0.250")
         .gateway("172.21.0.254")
View Full Code Here

      assert null != response;
      long podCount = response.size();
      assertTrue(podCount >= 0);

      for (Pod pod : response) {
         Pod newDetails = Iterables.getOnlyElement(globalAdminClient.getPodClient().listPods(
            ListPodsOptions.Builder.id(pod.getId())));
         assertEquals(pod, newDetails);
         assertEquals(pod, globalAdminClient.getPodClient().getPod(pod.getId()));
         assertNotNull(pod.getId());
         assertFalse(Strings.isNullOrEmpty(pod.getName()));
View Full Code Here

      assertEquals(pod.getAllocationState(), AllocationState.ENABLED);
   }

   @Test(dependsOnMethods = "testCreatePod")
   public void testUpdatePod() {
      Pod updated = globalAdminClient.getPodClient().updatePod(pod.getId(), UpdatePodOptions.Builder
         .name(prefix + "-updatedpod")
         .startIp("172.21.0.129")
         .endIp("172.21.0.250")
         .gateway("172.21.0.254")
         .netmask("255.255.255.128")
         .allocationState(AllocationState.DISABLED)
      );

      assertNotNull(updated);
      assertEquals(updated.getName(), prefix + "-updatedpod");
      assertEquals(updated.getZoneId(), zone.getId());
      assertEquals(updated.getZoneName(), prefix + "-zone-for-pod");
      assertEquals(updated.getStartIp(), "172.21.0.129");
      assertEquals(updated.getEndIp(), "172.21.0.250");
      assertEquals(updated.getGateway(), "172.21.0.254");
      assertEquals(updated.getNetmask(), "255.255.255.128");
      assertEquals(updated.getAllocationState(), AllocationState.DISABLED);
   }
View Full Code Here

      assert null != response;
      long podCount = response.size();
      assertTrue(podCount >= 0);

      for (Pod pod : response) {
         Pod newDetails = Iterables.getOnlyElement(globalAdminClient.getPodClient().listPods(
            ListPodsOptions.Builder.id(pod.getId())));
         assertEquals(pod, newDetails);
         assertEquals(pod, globalAdminClient.getPodClient().getPod(pod.getId()));
         assertNotNull(pod.getId());
         assertFalse(Strings.isNullOrEmpty(pod.getName()));
View Full Code Here

      assertEquals(pod.getAllocationState(), AllocationState.ENABLED);
   }

   @Test(dependsOnMethods = "testCreatePod")
   public void testUpdatePod() {
      Pod updated = globalAdminClient.getPodClient().updatePod(pod.getId(), UpdatePodOptions.Builder
         .name(prefix + "-updatedpod")
         .startIp("172.21.0.129")
         .endIp("172.21.0.250")
         .gateway("172.21.0.254")
         .netmask("255.255.255.128")
         .allocationState(AllocationState.DISABLED)
      );

      assertNotNull(updated);
      assertEquals(updated.getName(), prefix + "-updatedpod");
      assertEquals(updated.getZoneId(), zone.getId());
      assertEquals(updated.getZoneName(), prefix + "-zone");
      assertEquals(updated.getStartIp(), "172.21.0.129");
      assertEquals(updated.getEndIp(), "172.21.0.250");
      assertEquals(updated.getGateway(), "172.21.0.254");
      assertEquals(updated.getNetmask(), "255.255.255.128");
      assertEquals(updated.getAllocationState(), AllocationState.DISABLED);
   }
View Full Code Here

   }

   @Override
   @SelectJson("pod")
   public Set<Pod> expected() {
      Pod pod1 = Pod.builder()
         .id("1")
         .name("Dev Pod 1")
         .zoneId("1")
         .zoneName("Dev Zone 1")
         .gateway("10.26.26.254")
         .netmask("255.255.255.0")
         .startIp("10.26.26.50")
         .endIp("10.26.26.100")
         .allocationState(AllocationState.ENABLED)
         .build();
      Pod pod2 = Pod.builder()
         .id("2")
         .name("Dev Pod 2")
         .zoneId("2")
         .zoneName("Dev Zone 2")
         .gateway("10.22.22.254")
View Full Code Here

         HttpResponse.builder()
            .statusCode(200)
            .payload(payloadFromResource("/updatepodresponse.json"))
            .build());

      Pod expected = Pod.builder()
         .id("7")
         .name("richard-updatedpod")
         .zoneId("11")
         .zoneName("richard-zone")
         .gateway("172.21.0.254")
         .netmask("255.255.255.128")
         .startIp("172.21.0.129")
         .endIp("172.21.0.250")
         .allocationState(AllocationState.DISABLED)
         .build();

      Pod actual = client.updatePod("7", UpdatePodOptions.Builder
         .netmask("255.255.255.128")
         .name("richard-updatepod")
         .startIp("172.21.0.129")
         .endIp("172.21.0.250")
         .gateway("172.21.0.254")
View Full Code Here

         HttpResponse.builder()
            .statusCode(200)
            .payload(payloadFromResource("/listpodsresponse.json"))
            .build());

      Pod pod1 = Pod.builder()
         .id("1")
         .name("Dev Pod 1")
         .zoneId("1")
         .zoneName("Dev Zone 1")
         .gateway("10.26.26.254")
         .netmask("255.255.255.0")
         .startIp("10.26.26.50")
         .endIp("10.26.26.100")
         .allocationState(AllocationState.ENABLED)
         .build();
      Pod pod2 = Pod.builder()
         .id("2")
         .name("Dev Pod 2")
         .zoneId("2")
         .zoneName("Dev Zone 2")
         .gateway("10.22.22.254")
View Full Code Here

TOP

Related Classes of org.jclouds.cloudstack.domain.Pod$Builder

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.