本文整理了Java中org.jclouds.openstack.nova.v2_0.domain.zonescoped.ZoneState
类的一些代码示例,展示了ZoneState
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoneState
类的具体详情如下:
包路径:org.jclouds.openstack.nova.v2_0.domain.zonescoped.ZoneState
类名称:ZoneState
暂无
代码示例来源:origin: io.cloudsoft.jclouds.api/openstack-nova
@Override
public String toString() {
return string().toString();
}
代码示例来源:origin: apache/jclouds
@Test
public void testListAvailabilityZones() throws Exception {
Optional<? extends AvailabilityZoneApi> availabilityZoneApi = api.getAvailabilityZoneApi("RegionOne");
if (availabilityZoneApi.isPresent()) {
FluentIterable<? extends AvailabilityZone> zones = availabilityZoneApi.get().list();
for (AvailabilityZone zone : zones) {
assertNotNull(zone.getName());
assertTrue(zone.getState().available(), "zone: " + zone.getName() + " is not available.");
}
}
}
}
代码示例来源:origin: apache/jclouds
public void testAvailabilityZonesList() throws Exception {
HttpRequest list = HttpRequest
.builder()
.method("GET")
.endpoint("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v2/3456/os-availability-zone")
.addHeader("Accept", "application/json")
.addHeader("X-Auth-Token", authToken).build();
HttpResponse listResponse = HttpResponse.builder().statusCode(200)
.payload(payloadFromResource("/listAvailabilityZones.json")).build();
NovaApi availabilityZonesApi = requestsSendResponses(keystoneAuthWithUsernameAndPasswordAndTenantName,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse, list, listResponse);
assertEquals(availabilityZonesApi.getConfiguredRegions(), ImmutableSet.of("az-1.region-a.geo-1", "az-2.region-a.geo-1", "az-3.region-a.geo-1"));
FluentIterable<? extends AvailabilityZone> zones = availabilityZonesApi.getAvailabilityZoneApi("az-1.region-a.geo-1").get().list();
Optional<? extends AvailabilityZone> zone = zones.first();
assertTrue(zone.isPresent(), "Couldn't find zone");
assertEquals(zone.get().getName(), "internal",
"Expected zone name to be internal but it was: " + zone.get().getName());
assertTrue(zone.get().getState().available(), "Zone: " + zone.get().getName() + " is not available.");
}
}
代码示例来源:origin: org.apache.jclouds.api/openstack-nova
@Override
public String toString() {
return string().toString();
}
代码示例来源:origin: com.amysta.jclouds.api/openstack-nova
@Override
public String toString() {
return string().toString();
}
代码示例来源:origin: apache/jclouds
@Override
public String toString() {
return string().toString();
}
内容来源于网络,如有侵权,请联系作者删除!