public void testIdStatic() { ListPodsOptions options = id("6"); assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id")); }
public void testIdStatic() { ListPodsOptions options = id("6"); assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id")); }
public void testListPods() throws Exception { skipIfNotGlobalAdmin(); Set<Pod> response = globalAdminClient.getPodClient().listPods(); 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())); assertNotNull(pod.getZoneId()); assertFalse(Strings.isNullOrEmpty(pod.getZoneName())); assertFalse(Strings.isNullOrEmpty(pod.getGateway())); assertFalse(Strings.isNullOrEmpty(pod.getNetmask())); assertFalse(Strings.isNullOrEmpty(pod.getStartIp())); assertFalse(Strings.isNullOrEmpty(pod.getEndIp())); assertNotEquals(pod.getAllocationState(), AllocationState.UNKNOWN); } }
public void testListPods() throws Exception { skipIfNotGlobalAdmin(); Set<Pod> response = globalAdminClient.getPodClient().listPods(); 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())); assertNotNull(pod.getZoneId()); assertFalse(Strings.isNullOrEmpty(pod.getZoneName())); assertFalse(Strings.isNullOrEmpty(pod.getGateway())); assertFalse(Strings.isNullOrEmpty(pod.getNetmask())); assertFalse(Strings.isNullOrEmpty(pod.getStartIp())); assertFalse(Strings.isNullOrEmpty(pod.getEndIp())); assertNotEquals(pod.getAllocationState(), AllocationState.UNKNOWN); } }