Package org.jclouds.cloudstack.domain

Examples of org.jclouds.cloudstack.domain.Cluster


         .payload(payloadFromResource("/listclustersresponse.json"))
         .statusCode(200).build();

      Set<Cluster> actual = requestSendsResponse(request, response).listClusters();

      Cluster cluster1 = Cluster.builder().id("1").name("Xen Clust 1").podId("1").podName("Dev Pod 1").zoneId("1").zoneName("Dev Zone 1").hypervisor("XenServer").clusterType(Host.ClusterType.CLOUD_MANAGED).allocationState(AllocationState.ENABLED).managedState(Cluster.ManagedState.MANAGED).build();
      Cluster cluster2 = Cluster.builder().id("2").name("Xen Clust 1").podId("2").podName("Dev Pod 2").zoneId("2").zoneName("Dev Zone 2").hypervisor("XenServer").clusterType(Host.ClusterType.CLOUD_MANAGED).allocationState(AllocationState.ENABLED).managedState(Cluster.ManagedState.MANAGED).build();
      ImmutableSet<Cluster> expected = ImmutableSet.of(cluster1, cluster2);

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


   public void testAddClusterWhenResponseIs2xx() {
      HttpResponse response = HttpResponse.builder()
         .payload(payloadFromResource("/addclusterresponse.json"))
         .statusCode(200).build();

      Cluster expected = Cluster.builder().id("1").name("Xen Clust 1").podId("1").podName("Dev Pod 1").zoneId("1").zoneName("Dev Zone 1").hypervisor("XenServer").clusterType(Host.ClusterType.CLOUD_MANAGED).allocationState(AllocationState.ENABLED).managedState(Cluster.ManagedState.MANAGED).build();

      Cluster actual = requestSendsResponse(addCluster, response).addCluster("1", "Xen Clust 1", Host.ClusterType.CLOUD_MANAGED, "XenServer", AddClusterOptions.Builder.allocationState(AllocationState.ENABLED).podId("1").url("http://example.com/cluster").username("fred").password("sekrit"));

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

   public void testUpdateClusterWhenResponseIs2xx() {
      HttpResponse response = HttpResponse.builder()
         .payload(payloadFromResource("/updateclusterresponse.json"))
         .statusCode(200).build();

      Cluster expected = Cluster.builder().id("1").name("Xen Clust 1").podId("1").podName("Dev Pod 1").zoneId("1").zoneName("Dev Zone 1").hypervisor("XenServer").clusterType(Host.ClusterType.CLOUD_MANAGED).allocationState(AllocationState.ENABLED).managedState(Cluster.ManagedState.MANAGED).build();

      Cluster actual = requestSendsResponse(updateCluster, response).updateCluster("1", UpdateClusterOptions.Builder.allocationState(AllocationState.ENABLED).clusterName("Xen Clust 1").clusterType(Host.ClusterType.CLOUD_MANAGED).hypervisor("XenServer").managedState(Cluster.ManagedState.MANAGED));

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

   }

   @Override
   @SelectJson("cluster")
   public Set<Cluster> expected() {
      Cluster cluster1 = Cluster.builder()
         .id("1")
         .name("Xen Clust 1")
         .podId("1").podName("Dev Pod 1")
         .zoneId("1").zoneName("Dev Zone 1")
         .hypervisor("XenServer")
         .clusterType(Host.ClusterType.CLOUD_MANAGED)
         .allocationState(AllocationState.ENABLED)
         .managedState(Cluster.ManagedState.MANAGED)
         .build();
      Cluster cluster2 = Cluster.builder()
         .id("2")
         .name("Xen Clust 1")
         .podId("2").podName("Dev Pod 2")
         .zoneId("2").zoneName("Dev Zone 2")
         .hypervisor("XenServer")
View Full Code Here

         .payload(payloadFromResource("/listclustersresponse.json"))
         .statusCode(200).build();

      Set<Cluster> actual = requestSendsResponse(request, response).listClusters();

      Cluster cluster1 = Cluster.builder().id("1").name("Xen Clust 1").podId("1").podName("Dev Pod 1").zoneId("1").zoneName("Dev Zone 1").hypervisor("XenServer").clusterType(Host.ClusterType.CLOUD_MANAGED).allocationState(AllocationState.ENABLED).managedState(Cluster.ManagedState.MANAGED).build();
      Cluster cluster2 = Cluster.builder().id("2").name("Xen Clust 1").podId("2").podName("Dev Pod 2").zoneId("2").zoneName("Dev Zone 2").hypervisor("XenServer").clusterType(Host.ClusterType.CLOUD_MANAGED).allocationState(AllocationState.ENABLED).managedState(Cluster.ManagedState.MANAGED).build();
      ImmutableSet<Cluster> expected = ImmutableSet.of(cluster1, cluster2);

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

   public void testAddClusterWhenResponseIs2xx() {
      HttpResponse response = HttpResponse.builder()
         .payload(payloadFromResource("/addclusterresponse.json"))
         .statusCode(200).build();

      Cluster expected = Cluster.builder().id("1").name("Xen Clust 1").podId("1").podName("Dev Pod 1").zoneId("1").zoneName("Dev Zone 1").hypervisor("XenServer").clusterType(Host.ClusterType.CLOUD_MANAGED).allocationState(AllocationState.ENABLED).managedState(Cluster.ManagedState.MANAGED).build();

      Cluster actual = requestSendsResponse(addCluster, response).addCluster("1", "Xen Clust 1", Host.ClusterType.CLOUD_MANAGED, "XenServer", AddClusterOptions.Builder.allocationState(AllocationState.ENABLED).podId("1").url("http://example.com/cluster").username("fred").password("sekrit"));

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

   public void testUpdateClusterWhenResponseIs2xx() {
      HttpResponse response = HttpResponse.builder()
         .payload(payloadFromResource("/updateclusterresponse.json"))
         .statusCode(200).build();

      Cluster expected = Cluster.builder().id("1").name("Xen Clust 1").podId("1").podName("Dev Pod 1").zoneId("1").zoneName("Dev Zone 1").hypervisor("XenServer").clusterType(Host.ClusterType.CLOUD_MANAGED).allocationState(AllocationState.ENABLED).managedState(Cluster.ManagedState.MANAGED).build();

      Cluster actual = requestSendsResponse(updateCluster, response).updateCluster("1", UpdateClusterOptions.Builder.allocationState(AllocationState.ENABLED).clusterName("Xen Clust 1").clusterType(Host.ClusterType.CLOUD_MANAGED).hypervisor("XenServer").managedState(Cluster.ManagedState.MANAGED));

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

   }

   @Override
   @SelectJson("cluster")
   public Set<Cluster> expected() {
      Cluster cluster1 = Cluster.builder()
         .id("1")
         .name("Xen Clust 1")
         .podId("1").podName("Dev Pod 1")
         .zoneId("1").zoneName("Dev Zone 1")
         .hypervisor("XenServer")
         .clusterType(Host.ClusterType.CLOUD_MANAGED)
         .allocationState(AllocationState.ENABLED)
         .managedState(Cluster.ManagedState.MANAGED)
         .build();
      Cluster cluster2 = Cluster.builder()
         .id("2")
         .name("Xen Clust 1")
         .podId("2").podName("Dev Pod 2")
         .zoneId("2").zoneName("Dev Zone 2")
         .hypervisor("XenServer")
View Full Code Here

         .payload(payloadFromResource("/listclustersresponse.json"))
         .statusCode(200).build();

      Set<Cluster> actual = requestSendsResponse(request, response).listClusters();

      Cluster cluster1 = Cluster.builder().id("1").name("Xen Clust 1").podId("1").podName("Dev Pod 1").zoneId("1").zoneName("Dev Zone 1").hypervisor("XenServer").clusterType(Host.ClusterType.CLOUD_MANAGED).allocationState(AllocationState.ENABLED).managedState(Cluster.ManagedState.MANAGED).build();
      Cluster cluster2 = Cluster.builder().id("2").name("Xen Clust 1").podId("2").podName("Dev Pod 2").zoneId("2").zoneName("Dev Zone 2").hypervisor("XenServer").clusterType(Host.ClusterType.CLOUD_MANAGED).allocationState(AllocationState.ENABLED).managedState(Cluster.ManagedState.MANAGED).build();
      ImmutableSet<Cluster> expected = ImmutableSet.of(cluster1, cluster2);

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

   public void testAddClusterWhenResponseIs2xx() {
      HttpResponse response = HttpResponse.builder()
         .payload(payloadFromResource("/addclusterresponse.json"))
         .statusCode(200).build();

      Cluster expected = Cluster.builder().id("1").name("Xen Clust 1").podId("1").podName("Dev Pod 1").zoneId("1").zoneName("Dev Zone 1").hypervisor("XenServer").clusterType(Host.ClusterType.CLOUD_MANAGED).allocationState(AllocationState.ENABLED).managedState(Cluster.ManagedState.MANAGED).build();

      Cluster actual = requestSendsResponse(addCluster, response).addCluster("1", "Xen Clust 1", Host.ClusterType.CLOUD_MANAGED, "XenServer", AddClusterOptions.Builder.allocationState(AllocationState.ENABLED).podId("1").url("http://example.com/cluster").username("fred").password("sekrit"));

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

TOP

Related Classes of org.jclouds.cloudstack.domain.Cluster

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.