mirror of https://github.com/apache/jclouds.git
Add whitespace around keywords and braces
This commit is contained in:
parent
0aa19a0cee
commit
f1fc63ab76
|
@ -77,7 +77,7 @@ public class AtmosUtils {
|
||||||
try {
|
try {
|
||||||
sync.createFile(container, object, options);
|
sync.createFile(container, object, options);
|
||||||
|
|
||||||
} catch(KeyAlreadyExistsException e) {
|
} catch (KeyAlreadyExistsException e) {
|
||||||
deletePathAndEnsureGone(sync, path);
|
deletePathAndEnsureGone(sync, path);
|
||||||
sync.createFile(container, object, options);
|
sync.createFile(container, object, options);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ import com.google.inject.Module;
|
||||||
@Test(groups = "unit", testName = "AtmosBlobRequestSignerTest")
|
@Test(groups = "unit", testName = "AtmosBlobRequestSignerTest")
|
||||||
public class AtmosBlobRequestSignerTest extends BaseAsyncClientTest<AtmosAsyncClient> {
|
public class AtmosBlobRequestSignerTest extends BaseAsyncClientTest<AtmosAsyncClient> {
|
||||||
|
|
||||||
public AtmosBlobRequestSignerTest(){
|
public AtmosBlobRequestSignerTest() {
|
||||||
// this is base64 decoded in the signer;
|
// this is base64 decoded in the signer;
|
||||||
credential = "aaaabbbb";
|
credential = "aaaabbbb";
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ public class NodeToNodeMetadata implements Function<Node, NodeMetadata> {
|
||||||
} else if (from.getCredential() != null) {
|
} else if (from.getCredential() != null) {
|
||||||
credBuilder.credential(from.getCredential());
|
credBuilder.credential(from.getCredential());
|
||||||
}
|
}
|
||||||
if (from.getSudoPassword() != null){
|
if (from.getSudoPassword() != null) {
|
||||||
credBuilder.password(from.getSudoPassword());
|
credBuilder.password(from.getSudoPassword());
|
||||||
credBuilder.authenticateSudo(true);
|
credBuilder.authenticateSudo(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class CloudFilesApiMetadata extends SwiftApiMetadata {
|
||||||
|
|
||||||
public static class Builder extends SwiftApiMetadata.Builder<Builder> {
|
public static class Builder extends SwiftApiMetadata.Builder<Builder> {
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
protected Builder(){
|
protected Builder() {
|
||||||
super(CloudFilesClient.class, CloudFilesAsyncClient.class);
|
super(CloudFilesClient.class, CloudFilesAsyncClient.class);
|
||||||
id("cloudfiles")
|
id("cloudfiles")
|
||||||
.name("Rackspace Cloud Files API")
|
.name("Rackspace Cloud Files API")
|
||||||
|
|
|
@ -41,7 +41,7 @@ import com.google.common.collect.Iterables;
|
||||||
@Test(groups = "live")
|
@Test(groups = "live")
|
||||||
public class CloudFilesClientLiveTest extends CommonSwiftClientLiveTest<CloudFilesClient> {
|
public class CloudFilesClientLiveTest extends CommonSwiftClientLiveTest<CloudFilesClient> {
|
||||||
|
|
||||||
public CloudFilesClientLiveTest(){
|
public CloudFilesClientLiveTest() {
|
||||||
provider = "cloudfiles";
|
provider = "cloudfiles";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ import static org.testng.Assert.assertEquals;
|
||||||
*/
|
*/
|
||||||
@Test(groups = "live")
|
@Test(groups = "live")
|
||||||
public class CloudFilesBlobIntegrationLiveTest extends SwiftBlobIntegrationLiveTest {
|
public class CloudFilesBlobIntegrationLiveTest extends SwiftBlobIntegrationLiveTest {
|
||||||
public CloudFilesBlobIntegrationLiveTest(){
|
public CloudFilesBlobIntegrationLiveTest() {
|
||||||
provider = "cloudfiles";
|
provider = "cloudfiles";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ import org.testng.annotations.Test;
|
||||||
*/
|
*/
|
||||||
@Test(groups = "live")
|
@Test(groups = "live")
|
||||||
public class CloudFilesContainerIntegrationLiveTest extends SwiftContainerIntegrationLiveTest {
|
public class CloudFilesContainerIntegrationLiveTest extends SwiftContainerIntegrationLiveTest {
|
||||||
public CloudFilesContainerIntegrationLiveTest(){
|
public CloudFilesContainerIntegrationLiveTest() {
|
||||||
provider = "cloudfiles";
|
provider = "cloudfiles";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ import org.testng.annotations.Test;
|
||||||
*/
|
*/
|
||||||
@Test(groups = { "live" })
|
@Test(groups = { "live" })
|
||||||
public class CloudFilesContainerLiveTest extends BaseContainerLiveTest {
|
public class CloudFilesContainerLiveTest extends BaseContainerLiveTest {
|
||||||
public CloudFilesContainerLiveTest(){
|
public CloudFilesContainerLiveTest() {
|
||||||
provider = "cloudfiles";
|
provider = "cloudfiles";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ import org.testng.annotations.Test;
|
||||||
*/
|
*/
|
||||||
@Test(groups = "live")
|
@Test(groups = "live")
|
||||||
public class CloudFilesServiceIntegrationLiveTest extends SwiftServiceIntegrationLiveTest {
|
public class CloudFilesServiceIntegrationLiveTest extends SwiftServiceIntegrationLiveTest {
|
||||||
public CloudFilesServiceIntegrationLiveTest(){
|
public CloudFilesServiceIntegrationLiveTest() {
|
||||||
provider = "cloudfiles";
|
provider = "cloudfiles";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class CloudServersImageToImage implements Function<org.jclouds.cloudserve
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
CloudServersImageToImage(Map<ImageStatus, Image.Status> toPortableImageStatus, Function<org.jclouds.cloudservers.domain.Image, OperatingSystem> imageToOs) {
|
CloudServersImageToImage(Map<ImageStatus, Image.Status> toPortableImageStatus, Function<org.jclouds.cloudservers.domain.Image, OperatingSystem> imageToOs) {
|
||||||
this.toPortableImageStatus=toPortableImageStatus;
|
this.toPortableImageStatus = toPortableImageStatus;
|
||||||
this.imageToOs = imageToOs;
|
this.imageToOs = imageToOs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -261,7 +261,7 @@ public class CloudStackComputeServiceContextModule extends
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
public Map<NetworkType, ? extends OptionsConverter> optionsConverters(){
|
public Map<NetworkType, ? extends OptionsConverter> optionsConverters() {
|
||||||
return ImmutableMap.of(
|
return ImmutableMap.of(
|
||||||
NetworkType.ADVANCED, new AdvancedNetworkOptionsConverter(),
|
NetworkType.ADVANCED, new AdvancedNetworkOptionsConverter(),
|
||||||
NetworkType.BASIC, new BasicNetworkOptionsConverter());
|
NetworkType.BASIC, new BasicNetworkOptionsConverter());
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class AdvancedNetworkOptionsConverter implements OptionsConverter {
|
||||||
} else if (templateOptions.getIpsToNetworks().isEmpty()) {
|
} else if (templateOptions.getIpsToNetworks().isEmpty()) {
|
||||||
checkArgument(!networks.isEmpty(), "please setup a network for zone: " + zoneId);
|
checkArgument(!networks.isEmpty(), "please setup a network for zone: " + zoneId);
|
||||||
Network defaultNetworkInZone = Iterables.getFirst(filter(networks.values(), and(defaultNetworkInZone(zoneId), supportsStaticNAT())), null);
|
Network defaultNetworkInZone = Iterables.getFirst(filter(networks.values(), and(defaultNetworkInZone(zoneId), supportsStaticNAT())), null);
|
||||||
if(defaultNetworkInZone == null) {
|
if (defaultNetworkInZone == null) {
|
||||||
defaultNetworkInZone = Iterables.getFirst(filter(networks.values(), isIsolatedNetwork()), null);
|
defaultNetworkInZone = Iterables.getFirst(filter(networks.values(), isIsolatedNetwork()), null);
|
||||||
}
|
}
|
||||||
if (defaultNetworkInZone == null) {
|
if (defaultNetworkInZone == null) {
|
||||||
|
|
|
@ -33,7 +33,7 @@ import com.google.common.collect.Iterables;
|
||||||
*/
|
*/
|
||||||
public class ZoneAndName {
|
public class ZoneAndName {
|
||||||
|
|
||||||
public static final Function<ZoneAndName, String> NAME_FUNCTION = new Function<ZoneAndName, String>(){
|
public static final Function<ZoneAndName, String> NAME_FUNCTION = new Function<ZoneAndName, String>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String apply(ZoneAndName input) {
|
public String apply(ZoneAndName input) {
|
||||||
|
@ -42,7 +42,7 @@ public class ZoneAndName {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final Function<ZoneAndName, String> ZONE_FUNCTION = new Function<ZoneAndName, String>(){
|
public static final Function<ZoneAndName, String> ZONE_FUNCTION = new Function<ZoneAndName, String>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String apply(ZoneAndName input) {
|
public String apply(ZoneAndName input) {
|
||||||
|
|
|
@ -171,7 +171,7 @@ public interface GlobalOfferingApi extends OfferingApi {
|
||||||
*/
|
*/
|
||||||
@Named("updateNetworkOffering")
|
@Named("updateNetworkOffering")
|
||||||
@GET
|
@GET
|
||||||
@QueryParams(keys = "command", values ="updateNetworkOffering")
|
@QueryParams(keys = "command", values = "updateNetworkOffering")
|
||||||
@SelectJson("networkoffering")
|
@SelectJson("networkoffering")
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
@Fallback(NullOnNotFoundOr404.class)
|
@Fallback(NullOnNotFoundOr404.class)
|
||||||
|
|
|
@ -124,7 +124,7 @@ public interface LoadBalancerApi {
|
||||||
*/
|
*/
|
||||||
@Named("updateLoadBalancerRule")
|
@Named("updateLoadBalancerRule")
|
||||||
@GET
|
@GET
|
||||||
@QueryParams(keys = "command", values ="updateLoadBalancerRule")
|
@QueryParams(keys = "command", values = "updateLoadBalancerRule")
|
||||||
@SelectJson("loadbalancerrule")
|
@SelectJson("loadbalancerrule")
|
||||||
@OnlyElement
|
@OnlyElement
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
|
|
|
@ -84,17 +84,17 @@ public class CreateVlanIPRangeOptions extends AccountInDomainOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
public CreateVlanIPRangeOptions forVirtualNetwork(boolean forVirtualNetwork) {
|
public CreateVlanIPRangeOptions forVirtualNetwork(boolean forVirtualNetwork) {
|
||||||
this.queryParameters.replaceValues("forvirtualnetwork", ImmutableSet.of(forVirtualNetwork+""));
|
this.queryParameters.replaceValues("forvirtualnetwork", ImmutableSet.of(forVirtualNetwork + ""));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CreateVlanIPRangeOptions zoneId(String zoneId) {
|
public CreateVlanIPRangeOptions zoneId(String zoneId) {
|
||||||
this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId+""));
|
this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId + ""));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CreateVlanIPRangeOptions vlan(long vlan) {
|
public CreateVlanIPRangeOptions vlan(long vlan) {
|
||||||
this.queryParameters.replaceValues("vlan", ImmutableSet.of(vlan+""));
|
this.queryParameters.replaceValues("vlan", ImmutableSet.of(vlan + ""));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ public class CreateVlanIPRangeOptions extends AccountInDomainOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
public CreateVlanIPRangeOptions podId(String podId) {
|
public CreateVlanIPRangeOptions podId(String podId) {
|
||||||
this.queryParameters.replaceValues("podid", ImmutableSet.of(podId+""));
|
this.queryParameters.replaceValues("podid", ImmutableSet.of(podId + ""));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,12 +119,12 @@ public class CreateVlanIPRangeOptions extends AccountInDomainOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
public CreateVlanIPRangeOptions networkId(String networkId) {
|
public CreateVlanIPRangeOptions networkId(String networkId) {
|
||||||
this.queryParameters.replaceValues("networkid", ImmutableSet.of(networkId+""));
|
this.queryParameters.replaceValues("networkid", ImmutableSet.of(networkId + ""));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CreateVlanIPRangeOptions projectId(String projectId) {
|
public CreateVlanIPRangeOptions projectId(String projectId) {
|
||||||
this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId+""));
|
this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + ""));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class ListVlanIPRangesOptions extends AccountInDomainOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ListVlanIPRangesOptions vlan(String vlan) {
|
public static ListVlanIPRangesOptions vlan(String vlan) {
|
||||||
return new ListVlanIPRangesOptions().vlan(vlan+"");
|
return new ListVlanIPRangesOptions().vlan(vlan + "");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ListVlanIPRangesOptions zoneId(String zoneId) {
|
public static ListVlanIPRangesOptions zoneId(String zoneId) {
|
||||||
|
@ -83,12 +83,12 @@ public class ListVlanIPRangesOptions extends AccountInDomainOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ListVlanIPRangesOptions forVirtualNetwork(boolean forVirtualNetwork) {
|
public ListVlanIPRangesOptions forVirtualNetwork(boolean forVirtualNetwork) {
|
||||||
this.queryParameters.replaceValues("forvirtualnetwork", ImmutableSet.of(forVirtualNetwork+""));
|
this.queryParameters.replaceValues("forvirtualnetwork", ImmutableSet.of(forVirtualNetwork + ""));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ListVlanIPRangesOptions id(String id) {
|
public ListVlanIPRangesOptions id(String id) {
|
||||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id+""));
|
this.queryParameters.replaceValues("id", ImmutableSet.of(id + ""));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,17 +98,17 @@ public class ListVlanIPRangesOptions extends AccountInDomainOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ListVlanIPRangesOptions networkId(String networkId) {
|
public ListVlanIPRangesOptions networkId(String networkId) {
|
||||||
this.queryParameters.replaceValues("networkid", ImmutableSet.of(networkId+""));
|
this.queryParameters.replaceValues("networkid", ImmutableSet.of(networkId + ""));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ListVlanIPRangesOptions podId(String podId) {
|
public ListVlanIPRangesOptions podId(String podId) {
|
||||||
this.queryParameters.replaceValues("podid", ImmutableSet.of(podId+""));
|
this.queryParameters.replaceValues("podid", ImmutableSet.of(podId + ""));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ListVlanIPRangesOptions projectId(String projectId) {
|
public ListVlanIPRangesOptions projectId(String projectId) {
|
||||||
this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId+""));
|
this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + ""));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,12 +118,12 @@ public class ListVlanIPRangesOptions extends AccountInDomainOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ListVlanIPRangesOptions vlan(long vlan) {
|
public ListVlanIPRangesOptions vlan(long vlan) {
|
||||||
this.queryParameters.replaceValues("vlan", ImmutableSet.of(vlan+""));
|
this.queryParameters.replaceValues("vlan", ImmutableSet.of(vlan + ""));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ListVlanIPRangesOptions zoneId(String zoneId) {
|
public ListVlanIPRangesOptions zoneId(String zoneId) {
|
||||||
this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId+""));
|
this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId + ""));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class OptionsConverterTest {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
converter.apply(optionsIn, EMPTY_NETWORKS_MAP, ZONE_ID, DeployVirtualMachineOptions.NONE);
|
converter.apply(optionsIn, EMPTY_NETWORKS_MAP, ZONE_ID, DeployVirtualMachineOptions.NONE);
|
||||||
} catch(IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
exceptionThrown = true;
|
exceptionThrown = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ public class OptionsConverterTest {
|
||||||
boolean exceptionThrown = false;
|
boolean exceptionThrown = false;
|
||||||
try {
|
try {
|
||||||
converter.apply(CloudStackTemplateOptions.NONE, EMPTY_NETWORKS_MAP, ZONE_ID, DeployVirtualMachineOptions.NONE);
|
converter.apply(CloudStackTemplateOptions.NONE, EMPTY_NETWORKS_MAP, ZONE_ID, DeployVirtualMachineOptions.NONE);
|
||||||
} catch(IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
exceptionThrown = true;
|
exceptionThrown = true;
|
||||||
}
|
}
|
||||||
assertTrue(exceptionThrown);
|
assertTrue(exceptionThrown);
|
||||||
|
@ -111,7 +111,7 @@ public class OptionsConverterTest {
|
||||||
boolean exceptionThrown = false;
|
boolean exceptionThrown = false;
|
||||||
try {
|
try {
|
||||||
converter.apply(CloudStackTemplateOptions.NONE, ImmutableMap.of(unsuitableNetwork.getId(), unsuitableNetwork), ZONE_ID, DeployVirtualMachineOptions.NONE);
|
converter.apply(CloudStackTemplateOptions.NONE, ImmutableMap.of(unsuitableNetwork.getId(), unsuitableNetwork), ZONE_ID, DeployVirtualMachineOptions.NONE);
|
||||||
} catch(IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
exceptionThrown = true;
|
exceptionThrown = true;
|
||||||
}
|
}
|
||||||
assertTrue(exceptionThrown);
|
assertTrue(exceptionThrown);
|
||||||
|
|
|
@ -147,7 +147,7 @@ public class FirewallApiLiveTest extends BaseCloudStackApiLiveTest {
|
||||||
assert rules != null;
|
assert rules != null;
|
||||||
assertTrue(rules.size() > 0);
|
assertTrue(rules.size() > 0);
|
||||||
|
|
||||||
for(FirewallRule rule : rules) {
|
for (FirewallRule rule : rules) {
|
||||||
checkFirewallRule(rule);
|
checkFirewallRule(rule);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -176,7 +176,7 @@ public class FirewallApiLiveTest extends BaseCloudStackApiLiveTest {
|
||||||
assert rules != null;
|
assert rules != null;
|
||||||
assertTrue(rules.size() > 0);
|
assertTrue(rules.size() > 0);
|
||||||
|
|
||||||
for(FirewallRule rule : rules) {
|
for (FirewallRule rule : rules) {
|
||||||
checkEgressFirewallRule(rule);
|
checkEgressFirewallRule(rule);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class GlobalHostApiLiveTest extends BaseCloudStackApiLiveTest {
|
||||||
Set<Host> hosts = globalAdminClient.getHostClient().listHosts();
|
Set<Host> hosts = globalAdminClient.getHostClient().listHosts();
|
||||||
assert hosts.size() > 0 : hosts;
|
assert hosts.size() > 0 : hosts;
|
||||||
|
|
||||||
for(Host host : hosts) {
|
for (Host host : hosts) {
|
||||||
checkHost(host);
|
checkHost(host);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ public class GlobalHostApiLiveTest extends BaseCloudStackApiLiveTest {
|
||||||
Set<Cluster> clusters = globalAdminClient.getHostClient().listClusters();
|
Set<Cluster> clusters = globalAdminClient.getHostClient().listClusters();
|
||||||
assert clusters.size() > 0 : clusters;
|
assert clusters.size() > 0 : clusters;
|
||||||
|
|
||||||
for(Cluster cluster : clusters) {
|
for (Cluster cluster : clusters) {
|
||||||
checkCluster(cluster);
|
checkCluster(cluster);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class GlobalStoragePoolApiLiveTest extends BaseCloudStackApiLiveTest {
|
||||||
Set<StoragePool> result = globalAdminClient.getStoragePoolClient().listStoragePools();
|
Set<StoragePool> result = globalAdminClient.getStoragePoolClient().listStoragePools();
|
||||||
assertNotNull(result);
|
assertNotNull(result);
|
||||||
assertTrue(result.size() > 0);
|
assertTrue(result.size() > 0);
|
||||||
for(StoragePool pool : result) {
|
for (StoragePool pool : result) {
|
||||||
assertNotNull(pool.getId());
|
assertNotNull(pool.getId());
|
||||||
assertFalse(Strings.isNullOrEmpty(pool.getName()));
|
assertFalse(Strings.isNullOrEmpty(pool.getName()));
|
||||||
assertFalse(Strings.isNullOrEmpty(pool.getPath()));
|
assertFalse(Strings.isNullOrEmpty(pool.getPath()));
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class ISOApiLiveTest extends BaseCloudStackApiLiveTest {
|
||||||
public void testRegisterISO() throws Exception {
|
public void testRegisterISO() throws Exception {
|
||||||
Optional<OSType> guestOSTypeOptional = Iterables.tryFind(client.getGuestOSApi().listOSTypes(), Predicates.notNull());
|
Optional<OSType> guestOSTypeOptional = Iterables.tryFind(client.getGuestOSApi().listOSTypes(), Predicates.notNull());
|
||||||
Optional<Zone> zoneOptional = Iterables.tryFind(client.getZoneApi().listZones(available(true)), Predicates.notNull());
|
Optional<Zone> zoneOptional = Iterables.tryFind(client.getZoneApi().listZones(available(true)), Predicates.notNull());
|
||||||
if(guestOSTypeOptional.isPresent() && zoneOptional.isPresent()) {
|
if (guestOSTypeOptional.isPresent() && zoneOptional.isPresent()) {
|
||||||
String osTypeId = guestOSTypeOptional.get().getId();
|
String osTypeId = guestOSTypeOptional.get().getId();
|
||||||
String zoneId = zoneOptional.get().getId();
|
String zoneId = zoneOptional.get().getId();
|
||||||
ISO iso = client.getISOApi().registerISO(isoName, "", url, zoneId, RegisterISOOptions.Builder.isPublic(true).osTypeId(osTypeId));
|
ISO iso = client.getISOApi().registerISO(isoName, "", url, zoneId, RegisterISOOptions.Builder.isPublic(true).osTypeId(osTypeId));
|
||||||
|
@ -89,7 +89,7 @@ public class ISOApiLiveTest extends BaseCloudStackApiLiveTest {
|
||||||
assertEquals(iso.getName(), isoName);
|
assertEquals(iso.getName(), isoName);
|
||||||
} else {
|
} else {
|
||||||
String skipMessage = String.format("Cannot register the iso with url: %s", url);
|
String skipMessage = String.format("Cannot register the iso with url: %s", url);
|
||||||
if(zoneOptional.isPresent())
|
if (zoneOptional.isPresent())
|
||||||
skipMessage += " without a valid zone";
|
skipMessage += " without a valid zone";
|
||||||
else
|
else
|
||||||
skipMessage += " without a valid guest OS type";
|
skipMessage += " without a valid guest OS type";
|
||||||
|
|
|
@ -200,14 +200,14 @@ public class VirtualMachineApiLiveTest extends BaseCloudStackApiLiveTest {
|
||||||
|
|
||||||
Set<Network> allSafeNetworksInZone = adminClient.getNetworkApi().listNetworks(
|
Set<Network> allSafeNetworksInZone = adminClient.getNetworkApi().listNetworks(
|
||||||
ListNetworksOptions.Builder.zoneId(template.getZoneId()).isSystem(false));
|
ListNetworksOptions.Builder.zoneId(template.getZoneId()).isSystem(false));
|
||||||
for(Network net : allSafeNetworksInZone) {
|
for (Network net : allSafeNetworksInZone) {
|
||||||
if(net.getName().equals(prefix + "-ip-network")) {
|
if (net.getName().equals(prefix + "-ip-network")) {
|
||||||
logger.info("Deleting VMs in network: " + net);
|
logger.info("Deleting VMs in network: " + net);
|
||||||
|
|
||||||
Set<VirtualMachine> machinesInNetwork = adminClient.getVirtualMachineApi().listVirtualMachines(
|
Set<VirtualMachine> machinesInNetwork = adminClient.getVirtualMachineApi().listVirtualMachines(
|
||||||
ListVirtualMachinesOptions.Builder.networkId(net.getId()));
|
ListVirtualMachinesOptions.Builder.networkId(net.getId()));
|
||||||
|
|
||||||
for(VirtualMachine machine : machinesInNetwork) {
|
for (VirtualMachine machine : machinesInNetwork) {
|
||||||
if (machine.getState().equals(VirtualMachine.State.RUNNING)) {
|
if (machine.getState().equals(VirtualMachine.State.RUNNING)) {
|
||||||
logger.info("Deleting VM: " + machine);
|
logger.info("Deleting VM: " + machine);
|
||||||
destroyMachine(machine);
|
destroyMachine(machine);
|
||||||
|
@ -252,7 +252,7 @@ public class VirtualMachineApiLiveTest extends BaseCloudStackApiLiveTest {
|
||||||
logger.info("Created VM: " + vm);
|
logger.info("Created VM: " + vm);
|
||||||
|
|
||||||
boolean hasStaticIpNic = false;
|
boolean hasStaticIpNic = false;
|
||||||
for(NIC nic : vm.getNICs()) {
|
for (NIC nic : vm.getNICs()) {
|
||||||
if (nic.getNetworkId() == network.getId()) {
|
if (nic.getNetworkId() == network.getId()) {
|
||||||
hasStaticIpNic = true;
|
hasStaticIpNic = true;
|
||||||
assertEquals(nic.getIPAddress(), ipAddress);
|
assertEquals(nic.getIPAddress(), ipAddress);
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class VirtualMachineRunningTest {
|
||||||
|
|
||||||
@DataProvider(name = "virtualMachineStates")
|
@DataProvider(name = "virtualMachineStates")
|
||||||
public Object[][] virtualMachineStates() {
|
public Object[][] virtualMachineStates() {
|
||||||
return new Object[][]{
|
return new Object[][] {
|
||||||
{State.RUNNING, true},
|
{State.RUNNING, true},
|
||||||
{State.STARTING, false},
|
{State.STARTING, false},
|
||||||
{State.STOPPING, false},
|
{State.STOPPING, false},
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class GetMetricStatisticsBinder implements org.jclouds.rest.Binder {
|
||||||
private final DateService dateService;
|
private final DateService dateService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
protected GetMetricStatisticsBinder(DateService dateService){
|
protected GetMetricStatisticsBinder(DateService dateService) {
|
||||||
this.dateService = dateService;
|
this.dateService = dateService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ public final class EC2ApiMetadata extends BaseHttpApiMetadata<EC2Api> {
|
||||||
return properties;
|
return properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final static class Builder extends BaseHttpApiMetadata.Builder<EC2Api, Builder> {
|
public static final class Builder extends BaseHttpApiMetadata.Builder<EC2Api, Builder> {
|
||||||
public Builder() {
|
public Builder() {
|
||||||
id("ec2")
|
id("ec2")
|
||||||
.name("Amazon Elastic Compute Cloud (EC2) API")
|
.name("Amazon Elastic Compute Cloud (EC2) API")
|
||||||
|
|
|
@ -287,7 +287,7 @@ public class EC2ComputeService extends BaseComputeService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void cleanUpIncidentalResources(final String region, final String group){
|
protected void cleanUpIncidentalResources(final String region, final String group) {
|
||||||
// For issue #445, tries to delete security groups first: ec2 throws exception if in use, but
|
// For issue #445, tries to delete security groups first: ec2 throws exception if in use, but
|
||||||
// deleting a key pair does not.
|
// deleting a key pair does not.
|
||||||
// This is "belt-and-braces" because deleteKeyPair also does extractIdsFromInstances & usingKeyPairAndNotDead
|
// This is "belt-and-braces" because deleteKeyPair also does extractIdsFromInstances & usingKeyPairAndNotDead
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class EC2ComputeServiceContextModule extends BaseComputeServiceContextMod
|
||||||
super.configure();
|
super.configure();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void installDependencies(){
|
protected void installDependencies() {
|
||||||
install(new EC2ComputeServiceDependenciesModule());
|
install(new EC2ComputeServiceDependenciesModule());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class PresentInstances implements Function<Set<RegionAndName>, Set<Runnin
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString(){
|
public String toString() {
|
||||||
return "presentInstances()";
|
return "presentInstances()";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,7 +189,7 @@ public class RunningInstanceToNodeMetadata implements Function<RunningInstance,
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
String getGroupForInstance(final RunningInstance instance) {
|
String getGroupForInstance(final RunningInstance instance) {
|
||||||
String group = parseGroupFrom(instance, instance.getGroupNames());
|
String group = parseGroupFrom(instance, instance.getGroupNames());
|
||||||
if(group == null && instance.getKeyName() != null) {
|
if (group == null && instance.getKeyName() != null) {
|
||||||
// when not using a generated security group, e.g. in VPC, try from key:
|
// when not using a generated security group, e.g. in VPC, try from key:
|
||||||
group = parseGroupFrom(instance, Sets.newHashSet(instance.getKeyName()));
|
group = parseGroupFrom(instance, Sets.newHashSet(instance.getKeyName()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class WindowsLoginCredentialsFromEncryptedData implements Function<Passwo
|
||||||
.password(password)
|
.password(password)
|
||||||
.noPrivateKey()
|
.noPrivateKey()
|
||||||
.build();
|
.build();
|
||||||
} catch(Exception e) {
|
} catch (Exception e) {
|
||||||
throw Throwables.propagate(e);
|
throw Throwables.propagate(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class RegionAndIdToImage extends CacheLoader<RegionAndName, Image> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Image load(RegionAndName key) throws ExecutionException{
|
public Image load(RegionAndName key) throws ExecutionException {
|
||||||
try {
|
try {
|
||||||
org.jclouds.ec2.domain.Image image = Iterables.getOnlyElement(sync.getAMIApi().get()
|
org.jclouds.ec2.domain.Image image = Iterables.getOnlyElement(sync.getAMIApi().get()
|
||||||
.describeImagesInRegion(key.getRegion(), imageIds(key.getName())));
|
.describeImagesInRegion(key.getRegion(), imageIds(key.getName())));
|
||||||
|
|
|
@ -29,7 +29,7 @@ import com.google.common.collect.Sets;
|
||||||
* />
|
* />
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
public class AvailabilityZoneInfo implements Comparable<AvailabilityZoneInfo>{
|
public class AvailabilityZoneInfo implements Comparable<AvailabilityZoneInfo> {
|
||||||
|
|
||||||
private final String zone;
|
private final String zone;
|
||||||
private final String state;
|
private final String state;
|
||||||
|
|
|
@ -26,7 +26,7 @@ import org.jclouds.javax.annotation.Nullable;
|
||||||
*
|
*
|
||||||
* @author Lili Nadar
|
* @author Lili Nadar
|
||||||
*/
|
*/
|
||||||
public class BlockDeviceMapping implements Comparable<BlockDeviceMapping>{
|
public class BlockDeviceMapping implements Comparable<BlockDeviceMapping> {
|
||||||
public static Builder builder() {
|
public static Builder builder() {
|
||||||
return new Builder();
|
return new Builder();
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ import com.google.common.collect.Ordering;
|
||||||
* />
|
* />
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
public class Reservation<T extends RunningInstance> extends ForwardingSet<T> implements Comparable<Reservation<T>>{
|
public class Reservation<T extends RunningInstance> extends ForwardingSet<T> implements Comparable<Reservation<T>> {
|
||||||
|
|
||||||
public static <T extends RunningInstance> Builder<T> builder() {
|
public static <T extends RunningInstance> Builder<T> builder() {
|
||||||
return new Builder<T>();
|
return new Builder<T>();
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class ReservedInstancesOffering implements Comparable<ReservedInstancesOf
|
||||||
|
|
||||||
public ReservedInstancesOffering(String region, String availabilityZone, long duration, float fixedPrice, String instanceType,
|
public ReservedInstancesOffering(String region, String availabilityZone, long duration, float fixedPrice, String instanceType,
|
||||||
String productDescription, String reservedInstancesOfferingId, float usagePrice) {
|
String productDescription, String reservedInstancesOfferingId, float usagePrice) {
|
||||||
this.region=region;
|
this.region = region;
|
||||||
this.availabilityZone = availabilityZone;
|
this.availabilityZone = availabilityZone;
|
||||||
this.duration = duration;
|
this.duration = duration;
|
||||||
this.fixedPrice = fixedPrice;
|
this.fixedPrice = fixedPrice;
|
||||||
|
|
|
@ -313,7 +313,7 @@ public class EC2CreateNodesInGroupThenAddToSetTest {
|
||||||
RunningInstanceToNodeMetadata runningInstanceToNodeMetadata = createMock(RunningInstanceToNodeMetadata.class);
|
RunningInstanceToNodeMetadata runningInstanceToNodeMetadata = createMock(RunningInstanceToNodeMetadata.class);
|
||||||
LoadingCache<RunningInstance, Optional<LoginCredentials>> instanceToCredentials = createMock(LoadingCache.class);
|
LoadingCache<RunningInstance, Optional<LoginCredentials>> instanceToCredentials = createMock(LoadingCache.class);
|
||||||
LoadingCache<RegionAndName, String> elasticIpCache = createMock(LoadingCache.class);
|
LoadingCache<RegionAndName, String> elasticIpCache = createMock(LoadingCache.class);
|
||||||
GetNodeMetadataStrategy nodeRunning = new GetNodeMetadataStrategy(){
|
GetNodeMetadataStrategy nodeRunning = new GetNodeMetadataStrategy() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public NodeMetadata getNode(String input) {
|
public NodeMetadata getNode(String input) {
|
||||||
|
|
|
@ -68,7 +68,7 @@ public abstract class BaseEC2ApiTest<T> extends BaseAsyncApiTest<T> {
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
LoadingCache<RegionAndName, Image> provide(){
|
LoadingCache<RegionAndName, Image> provide() {
|
||||||
return CacheBuilder.newBuilder().build(new CacheLoader<RegionAndName, Image>() {
|
return CacheBuilder.newBuilder().build(new CacheLoader<RegionAndName, Image>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -65,7 +65,7 @@ public abstract class BaseEC2ExpectTest<T> extends BaseRestClientExpectTest<T> {
|
||||||
.addFormParam("Action", "DescribeRegions").build());
|
.addFormParam("Action", "DescribeRegions").build());
|
||||||
|
|
||||||
Builder<HttpRequest, HttpResponse> builder = ImmutableMap.<HttpRequest, HttpResponse> builder();
|
Builder<HttpRequest, HttpResponse> builder = ImmutableMap.<HttpRequest, HttpResponse> builder();
|
||||||
for (String region : ImmutableSet.of("ap-northeast-1", "ap-southeast-1", "eu-west-1", "sa-east-1", "us-east-1", "us-west-1", "us-west-2")){
|
for (String region : ImmutableSet.of("ap-northeast-1", "ap-southeast-1", "eu-west-1", "sa-east-1", "us-east-1", "us-west-1", "us-west-2")) {
|
||||||
builder.put(
|
builder.put(
|
||||||
formSigner.filter(HttpRequest.builder()
|
formSigner.filter(HttpRequest.builder()
|
||||||
.method("POST")
|
.method("POST")
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class VolumeDetachedTest {
|
||||||
|
|
||||||
@DataProvider(name = "notDetachedStatuses")
|
@DataProvider(name = "notDetachedStatuses")
|
||||||
public Object[][] provideNotDetachedStatuses() {
|
public Object[][] provideNotDetachedStatuses() {
|
||||||
return new Object[][]{
|
return new Object[][] {
|
||||||
{Status.ATTACHED},
|
{Status.ATTACHED},
|
||||||
{Status.ATTACHING},
|
{Status.ATTACHING},
|
||||||
{Status.BUSY},
|
{Status.BUSY},
|
||||||
|
|
|
@ -47,17 +47,17 @@ public class FilesystemBlobKeyValidatorTest {
|
||||||
try {
|
try {
|
||||||
validator.validate("");
|
validator.validate("");
|
||||||
fail("Blob key value incorrect, but was not recognized");
|
fail("Blob key value incorrect, but was not recognized");
|
||||||
} catch(IllegalArgumentException e) {}
|
} catch (IllegalArgumentException e) {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
validator.validate(File.separator + "is" + File.separator + "" + "ok");
|
validator.validate(File.separator + "is" + File.separator + "" + "ok");
|
||||||
fail("Blob key value incorrect, but was not recognized");
|
fail("Blob key value incorrect, but was not recognized");
|
||||||
} catch(IllegalArgumentException e) {}
|
} catch (IllegalArgumentException e) {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
validator.validate("all" + File.separator + "is" + File.separator);
|
validator.validate("all" + File.separator + "is" + File.separator);
|
||||||
fail("Blob key value incorrect, but was not recognized");
|
fail("Blob key value incorrect, but was not recognized");
|
||||||
} catch(IllegalArgumentException e) {}
|
} catch (IllegalArgumentException e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -47,22 +47,22 @@ public class FilesystemContainerNameValidatorTest {
|
||||||
try {
|
try {
|
||||||
validator.validate("");
|
validator.validate("");
|
||||||
fail("Container name value incorrect, but was not recognized");
|
fail("Container name value incorrect, but was not recognized");
|
||||||
} catch(IllegalArgumentException e) {}
|
} catch (IllegalArgumentException e) {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
validator.validate(null);
|
validator.validate(null);
|
||||||
fail("Container name value incorrect, but was not recognized");
|
fail("Container name value incorrect, but was not recognized");
|
||||||
} catch(IllegalArgumentException e) {}
|
} catch (IllegalArgumentException e) {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
validator.validate(File.separator + "is" + File.separator + "" + "ok");
|
validator.validate(File.separator + "is" + File.separator + "" + "ok");
|
||||||
fail("Container name value incorrect, but was not recognized");
|
fail("Container name value incorrect, but was not recognized");
|
||||||
} catch(IllegalArgumentException e) {}
|
} catch (IllegalArgumentException e) {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
validator.validate("all" + File.separator + "is" + File.separator);
|
validator.validate("all" + File.separator + "is" + File.separator);
|
||||||
fail("Container name value incorrect, but was not recognized");
|
fail("Container name value incorrect, but was not recognized");
|
||||||
} catch(IllegalArgumentException e) {}
|
} catch (IllegalArgumentException e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ import com.google.common.collect.ImmutableSet;
|
||||||
@Test(testName = "TenantApiExpectTest")
|
@Test(testName = "TenantApiExpectTest")
|
||||||
public class TenantApiExpectTest extends BaseKeystoneRestApiExpectTest<KeystoneApi> {
|
public class TenantApiExpectTest extends BaseKeystoneRestApiExpectTest<KeystoneApi> {
|
||||||
|
|
||||||
public TenantApiExpectTest(){
|
public TenantApiExpectTest() {
|
||||||
endpoint = "https://csnode.jclouds.org:35357";
|
endpoint = "https://csnode.jclouds.org:35357";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ import com.google.common.collect.ImmutableSet;
|
||||||
@Test(testName = "TokenApiExpectTest")
|
@Test(testName = "TokenApiExpectTest")
|
||||||
public class TokenApiExpectTest extends BaseKeystoneRestApiExpectTest<KeystoneApi> {
|
public class TokenApiExpectTest extends BaseKeystoneRestApiExpectTest<KeystoneApi> {
|
||||||
|
|
||||||
public TokenApiExpectTest(){
|
public TokenApiExpectTest() {
|
||||||
endpoint = "https://csnode.jclouds.org:35357";
|
endpoint = "https://csnode.jclouds.org:35357";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ import com.google.common.collect.ImmutableSet;
|
||||||
@Test(singleThreaded = true, testName = "UserApiExpectTest")
|
@Test(singleThreaded = true, testName = "UserApiExpectTest")
|
||||||
public class UserApiExpectTest extends BaseKeystoneRestApiExpectTest<KeystoneApi> {
|
public class UserApiExpectTest extends BaseKeystoneRestApiExpectTest<KeystoneApi> {
|
||||||
|
|
||||||
public UserApiExpectTest(){
|
public UserApiExpectTest() {
|
||||||
endpoint = "https://csnode.jclouds.org:35357";
|
endpoint = "https://csnode.jclouds.org:35357";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,15 +36,15 @@ import com.google.common.net.HttpHeaders;
|
||||||
public enum KeystoneFixture {
|
public enum KeystoneFixture {
|
||||||
INSTANCE;
|
INSTANCE;
|
||||||
|
|
||||||
public String getTenantId(){
|
public String getTenantId() {
|
||||||
return "12346637803162";
|
return "12346637803162";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTenantName(){
|
public String getTenantName() {
|
||||||
return "adrian@jclouds.org";
|
return "adrian@jclouds.org";
|
||||||
}
|
}
|
||||||
|
|
||||||
public HttpRequest initialAuthWithUsernameAndPassword(String username, String password){
|
public HttpRequest initialAuthWithUsernameAndPassword(String username, String password) {
|
||||||
return HttpRequest.builder().method("POST")
|
return HttpRequest.builder().method("POST")
|
||||||
.endpoint("http://localhost:5000/v2.0/tokens")
|
.endpoint("http://localhost:5000/v2.0/tokens")
|
||||||
.addHeader(HttpHeaders.ACCEPT, "application/json")
|
.addHeader(HttpHeaders.ACCEPT, "application/json")
|
||||||
|
@ -55,7 +55,7 @@ public enum KeystoneFixture {
|
||||||
username, password), "application/json")).build();
|
username, password), "application/json")).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public HttpRequest initialAuthWithUsernameAndPasswordAndTenantName(String username, String password){
|
public HttpRequest initialAuthWithUsernameAndPasswordAndTenantName(String username, String password) {
|
||||||
return HttpRequest.builder().method("POST")
|
return HttpRequest.builder().method("POST")
|
||||||
.endpoint("http://localhost:5000/v2.0/tokens")
|
.endpoint("http://localhost:5000/v2.0/tokens")
|
||||||
.addHeader(HttpHeaders.ACCEPT, "application/json")
|
.addHeader(HttpHeaders.ACCEPT, "application/json")
|
||||||
|
@ -66,7 +66,7 @@ public enum KeystoneFixture {
|
||||||
username, password, getTenantName()), "application/json")).build();
|
username, password, getTenantName()), "application/json")).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public HttpRequest initialAuthWithAccessKeyAndSecretKeyAndTenantName(String accessKey, String secretKey){
|
public HttpRequest initialAuthWithAccessKeyAndSecretKeyAndTenantName(String accessKey, String secretKey) {
|
||||||
return HttpRequest.builder().method("POST")
|
return HttpRequest.builder().method("POST")
|
||||||
.endpoint("http://localhost:5000/v2.0/tokens")
|
.endpoint("http://localhost:5000/v2.0/tokens")
|
||||||
.addHeader(HttpHeaders.ACCEPT, "application/json")
|
.addHeader(HttpHeaders.ACCEPT, "application/json")
|
||||||
|
@ -77,7 +77,7 @@ public enum KeystoneFixture {
|
||||||
accessKey, secretKey, getTenantName()), "application/json")).build();
|
accessKey, secretKey, getTenantName()), "application/json")).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public HttpRequest initialAuthWithAccessKeyAndSecretKeyAndTenantId(String accessKey, String secretKey){
|
public HttpRequest initialAuthWithAccessKeyAndSecretKeyAndTenantId(String accessKey, String secretKey) {
|
||||||
return HttpRequest.builder().method("POST")
|
return HttpRequest.builder().method("POST")
|
||||||
|
|
||||||
.endpoint("http://localhost:5000/v2.0/tokens")
|
.endpoint("http://localhost:5000/v2.0/tokens")
|
||||||
|
@ -89,11 +89,11 @@ public enum KeystoneFixture {
|
||||||
accessKey, secretKey, getTenantId()), "application/json")).build();
|
accessKey, secretKey, getTenantId()), "application/json")).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAuthToken(){
|
public String getAuthToken() {
|
||||||
return "Auth_4f173437e4b013bee56d1007";
|
return "Auth_4f173437e4b013bee56d1007";
|
||||||
}
|
}
|
||||||
|
|
||||||
public HttpResponse responseWithAccess(){
|
public HttpResponse responseWithAccess() {
|
||||||
return HttpResponse.builder().statusCode(200).message("HTTP/1.1 200").payload(
|
return HttpResponse.builder().statusCode(200).message("HTTP/1.1 200").payload(
|
||||||
payloadFromResourceWithContentType("/keystoneAuthResponse.json", "application/json")).build();
|
payloadFromResourceWithContentType("/keystoneAuthResponse.json", "application/json")).build();
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class LocationIdToURIFromAccessForTypeAndVersionTest {
|
||||||
@Override
|
@Override
|
||||||
protected void configure() {
|
protected void configure() {
|
||||||
bindConstant().annotatedWith(Provider.class).to("openstack-keystone");
|
bindConstant().annotatedWith(Provider.class).to("openstack-keystone");
|
||||||
bind(new TypeLiteral<Supplier<URI>>(){
|
bind(new TypeLiteral<Supplier<URI>>() {
|
||||||
}).annotatedWith(Provider.class).toInstance(Suppliers.ofInstance(URI.create("https://identity")));
|
}).annotatedWith(Provider.class).toInstance(Suppliers.ofInstance(URI.create("https://identity")));
|
||||||
bind(new TypeLiteral<Function<Endpoint, String>>(){}).to(EndpointToRegion.class);
|
bind(new TypeLiteral<Function<Endpoint, String>>(){}).to(EndpointToRegion.class);
|
||||||
install(new FactoryModuleBuilder().implement(LocationIdToURIFromAccessForTypeAndVersion.class,
|
install(new FactoryModuleBuilder().implement(LocationIdToURIFromAccessForTypeAndVersion.class,
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class RegionIdToURIFromAccessForTypeAndVersionTest {
|
||||||
@Override
|
@Override
|
||||||
protected void configure() {
|
protected void configure() {
|
||||||
bindConstant().annotatedWith(Provider.class).to("openstack-keystone");
|
bindConstant().annotatedWith(Provider.class).to("openstack-keystone");
|
||||||
bind(new TypeLiteral<Supplier<URI>>(){
|
bind(new TypeLiteral<Supplier<URI>>() {
|
||||||
}).annotatedWith(Provider.class).toInstance(Suppliers.ofInstance(URI.create("https://identity")));
|
}).annotatedWith(Provider.class).toInstance(Suppliers.ofInstance(URI.create("https://identity")));
|
||||||
install(new FactoryModuleBuilder().implement(RegionIdToURISupplier.class,
|
install(new FactoryModuleBuilder().implement(RegionIdToURISupplier.class,
|
||||||
RegionIdToURIFromAccessForTypeAndVersion.class).build(
|
RegionIdToURIFromAccessForTypeAndVersion.class).build(
|
||||||
|
|
|
@ -69,7 +69,7 @@ public final class NovaEC2ApiMetadata extends BaseHttpApiMetadata<NovaEC2Api> {
|
||||||
return properties;
|
return properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final static class Builder extends BaseHttpApiMetadata.Builder<NovaEC2Api, Builder> {
|
public static final class Builder extends BaseHttpApiMetadata.Builder<NovaEC2Api, Builder> {
|
||||||
public Builder() {
|
public Builder() {
|
||||||
id("openstack-nova-ec2")
|
id("openstack-nova-ec2")
|
||||||
.name("OpenStack Nova's EC2-clone API")
|
.name("OpenStack Nova's EC2-clone API")
|
||||||
|
|
|
@ -33,7 +33,7 @@ import com.google.common.collect.Iterables;
|
||||||
*/
|
*/
|
||||||
public class ZoneAndName {
|
public class ZoneAndName {
|
||||||
|
|
||||||
public static final Function<ZoneAndName, String> NAME_FUNCTION = new Function<ZoneAndName, String>(){
|
public static final Function<ZoneAndName, String> NAME_FUNCTION = new Function<ZoneAndName, String>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String apply(ZoneAndName input) {
|
public String apply(ZoneAndName input) {
|
||||||
|
@ -42,7 +42,7 @@ public class ZoneAndName {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final Function<ZoneAndName, String> ZONE_FUNCTION = new Function<ZoneAndName, String>(){
|
public static final Function<ZoneAndName, String> ZONE_FUNCTION = new Function<ZoneAndName, String>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String apply(ZoneAndName input) {
|
public String apply(ZoneAndName input) {
|
||||||
|
|
|
@ -89,7 +89,7 @@ public class ImageInZoneToImageTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
private static Function<Image, OperatingSystem> constant(OperatingSystem operatingSystem){
|
private static Function<Image, OperatingSystem> constant(OperatingSystem operatingSystem) {
|
||||||
return Function.class.cast(Functions.constant(operatingSystem));
|
return Function.class.cast(Functions.constant(operatingSystem));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class FindSecurityGroupOrCreateTest {
|
||||||
public void testWhenFoundReturnsSecurityGroupFromAtomicReferenceValueUpdatedDuringPredicateCheck() throws Exception {
|
public void testWhenFoundReturnsSecurityGroupFromAtomicReferenceValueUpdatedDuringPredicateCheck() throws Exception {
|
||||||
final SecurityGroupInZone securityGroupInZone = createMock(SecurityGroupInZone.class);
|
final SecurityGroupInZone securityGroupInZone = createMock(SecurityGroupInZone.class);
|
||||||
|
|
||||||
Predicate<AtomicReference<ZoneAndName>> returnSecurityGroupExistsInZone = new Predicate<AtomicReference<ZoneAndName>>(){
|
Predicate<AtomicReference<ZoneAndName>> returnSecurityGroupExistsInZone = new Predicate<AtomicReference<ZoneAndName>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(AtomicReference<ZoneAndName> input) {
|
public boolean apply(AtomicReference<ZoneAndName> input) {
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class FlavorExtraSpecsApiLiveTest extends BaseNovaApiLiveTest {
|
||||||
@Override
|
@Override
|
||||||
protected void tearDown() {
|
protected void tearDown() {
|
||||||
if (apiOption.isPresent() && testFlavor != null) {
|
if (apiOption.isPresent() && testFlavor != null) {
|
||||||
for(String key : testSpecs.keySet()) {
|
for (String key : testSpecs.keySet()) {
|
||||||
assertTrue(apiOption.get().deleteMetadataKey(testFlavor.getId(), key));
|
assertTrue(apiOption.get().deleteMetadataKey(testFlavor.getId(), key));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class CreateSecurityGroupIfNeededTest extends BaseNovaApiExpectTest {
|
||||||
|
|
||||||
int ruleId = 10331;
|
int ruleId = 10331;
|
||||||
|
|
||||||
for (int port : ImmutableList.of(22,8080)){
|
for (int port : ImmutableList.of(22,8080)) {
|
||||||
|
|
||||||
HttpRequest createCidrRule = HttpRequest.builder().method("POST").endpoint(
|
HttpRequest createCidrRule = HttpRequest.builder().method("POST").endpoint(
|
||||||
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-security-group-rules")).headers(
|
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-security-group-rules")).headers(
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class NovaErrorHandlerTest {
|
||||||
private HttpCommand command;
|
private HttpCommand command;
|
||||||
|
|
||||||
@BeforeTest
|
@BeforeTest
|
||||||
void setupCommand(){
|
void setupCommand() {
|
||||||
command = command();
|
command = command();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ public class NovaErrorHandlerTest {
|
||||||
|
|
||||||
DateCodec iso8601Seconds = new DateServiceIso8601SecondsCodec(new SimpleDateFormatDateService());
|
DateCodec iso8601Seconds = new DateServiceIso8601SecondsCodec(new SimpleDateFormatDateService());
|
||||||
|
|
||||||
Ticker y2k = new Ticker(){
|
Ticker y2k = new Ticker() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long read() {
|
public long read() {
|
||||||
|
|
|
@ -59,9 +59,9 @@ public class BaseNovaApiLiveTest extends BaseApiLiveTest<NovaApi> {
|
||||||
public void setup() {
|
public void setup() {
|
||||||
super.setup();
|
super.setup();
|
||||||
zones = api.getConfiguredZones();
|
zones = api.getConfiguredZones();
|
||||||
for (String zone : zones){
|
for (String zone : zones) {
|
||||||
ServerApi serverApi = api.getServerApiForZone(zone);
|
ServerApi serverApi = api.getServerApiForZone(zone);
|
||||||
for (Resource server : serverApi.list().concat()){
|
for (Resource server : serverApi.list().concat()) {
|
||||||
if (server.getName().equals(hostName))
|
if (server.getName().equals(hostName))
|
||||||
serverApi.delete(server.getId());
|
serverApi.delete(server.getId());
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class CloudIdentityApiMetadata extends KeystoneApiMetadata {
|
||||||
|
|
||||||
public static class Builder extends KeystoneApiMetadata.Builder<Builder> {
|
public static class Builder extends KeystoneApiMetadata.Builder<Builder> {
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
protected Builder(){
|
protected Builder() {
|
||||||
super(KeystoneApi.class, KeystoneAsyncApi.class);
|
super(KeystoneApi.class, KeystoneAsyncApi.class);
|
||||||
id("rackspace-cloudidentity")
|
id("rackspace-cloudidentity")
|
||||||
.name("Rackspace Cloud Identity Service")
|
.name("Rackspace Cloud Identity Service")
|
||||||
|
|
|
@ -77,9 +77,9 @@ public class ParseNodes extends ParseJson<Nodes> {
|
||||||
public ToPagedIterable setContext(HttpRequest request) {
|
public ToPagedIterable setContext(HttpRequest request) {
|
||||||
String path = request.getEndpoint().getPath();
|
String path = request.getEndpoint().getPath();
|
||||||
int lastSlash = path.lastIndexOf('/');
|
int lastSlash = path.lastIndexOf('/');
|
||||||
int secondLastSlash = path.lastIndexOf('/', lastSlash-1);
|
int secondLastSlash = path.lastIndexOf('/', lastSlash - 1);
|
||||||
|
|
||||||
lbId = Integer.valueOf(path.substring(secondLastSlash+1, lastSlash));
|
lbId = Integer.valueOf(path.substring(secondLastSlash + 1, lastSlash));
|
||||||
|
|
||||||
return super.setContext(request);
|
return super.setContext(request);
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ public class S3ApiMetadata extends BaseRestApiMetadata {
|
||||||
this(S3Client.class, S3AsyncClient.class);
|
this(S3Client.class, S3AsyncClient.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Builder(Class<?> syncClient, Class<?> asyncClient){
|
protected Builder(Class<?> syncClient, Class<?> asyncClient) {
|
||||||
super(syncClient, asyncClient);
|
super(syncClient, asyncClient);
|
||||||
id("s3")
|
id("s3")
|
||||||
.name("Amazon Simple Storage Service (S3) API")
|
.name("Amazon Simple Storage Service (S3) API")
|
||||||
|
|
|
@ -233,7 +233,7 @@ public class RequestAuthorizeSignature implements HttpRequestFilter, RequestSign
|
||||||
// the only S3 implementation configured to allow uppercase payload/bucket/container names.
|
// the only S3 implementation configured to allow uppercase payload/bucket/container names.
|
||||||
//
|
//
|
||||||
// http://code.google.com/p/jclouds/issues/detail?id=992
|
// http://code.google.com/p/jclouds/issues/detail?id=992
|
||||||
if (isVhostStyle && bucketName!= null && bucketName.equals(bucketName.toLowerCase()))
|
if (isVhostStyle && bucketName != null && bucketName.equals(bucketName.toLowerCase()))
|
||||||
toSign.append(servicePath).append(bucketName);
|
toSign.append(servicePath).append(bucketName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,14 +53,14 @@ public abstract class AWSHttpApiModule<A> extends HttpApiModule<A> {
|
||||||
@Provides
|
@Provides
|
||||||
@ClientError
|
@ClientError
|
||||||
@Singleton
|
@Singleton
|
||||||
protected Set<String> provideRetryableCodes(){
|
protected Set<String> provideRetryableCodes() {
|
||||||
return ImmutableSet.of("RequestTimeout", "OperationAborted", "SignatureDoesNotMatch");
|
return ImmutableSet.of("RequestTimeout", "OperationAborted", "SignatureDoesNotMatch");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@ServerError
|
@ServerError
|
||||||
@Singleton
|
@Singleton
|
||||||
protected Set<String> provideRetryableServerCodes(){
|
protected Set<String> provideRetryableServerCodes() {
|
||||||
return ImmutableSet.of("RequestLimitExceeded");
|
return ImmutableSet.of("RequestLimitExceeded");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,14 +68,14 @@ public abstract class AWSRestClientModule<S, A> extends RestClientModule<S, A> {
|
||||||
@Provides
|
@Provides
|
||||||
@ClientError
|
@ClientError
|
||||||
@Singleton
|
@Singleton
|
||||||
protected Set<String> provideRetryableCodes(){
|
protected Set<String> provideRetryableCodes() {
|
||||||
return ImmutableSet.of("RequestTimeout", "OperationAborted", "SignatureDoesNotMatch");
|
return ImmutableSet.of("RequestTimeout", "OperationAborted", "SignatureDoesNotMatch");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@ServerError
|
@ServerError
|
||||||
@Singleton
|
@Singleton
|
||||||
protected Set<String> provideRetryableServerCodes(){
|
protected Set<String> provideRetryableServerCodes() {
|
||||||
return ImmutableSet.of("RequestLimitExceeded");
|
return ImmutableSet.of("RequestLimitExceeded");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -267,7 +267,7 @@ public interface CommonSwiftAsyncClient extends Closeable {
|
||||||
@PUT
|
@PUT
|
||||||
@Path("/{container}/{name}")
|
@Path("/{container}/{name}")
|
||||||
@ResponseParser(ParseETagHeader.class)
|
@ResponseParser(ParseETagHeader.class)
|
||||||
@Headers(keys = "X-Object-Manifest", values="{container}/{name}/")
|
@Headers(keys = "X-Object-Manifest", values = "{container}/{name}/")
|
||||||
ListenableFuture<String> putObjectManifest(@PathParam("container") String container,
|
ListenableFuture<String> putObjectManifest(@PathParam("container") String container,
|
||||||
@PathParam("name") String name);
|
@PathParam("name") String name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class SwiftApiMetadata extends BaseRestApiMetadata {
|
||||||
this(SwiftClient.class, SwiftAsyncClient.class);
|
this(SwiftClient.class, SwiftAsyncClient.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Builder(Class<?> syncClient, Class<?> asyncClient){
|
protected Builder(Class<?> syncClient, Class<?> asyncClient) {
|
||||||
super(syncClient, asyncClient);
|
super(syncClient, asyncClient);
|
||||||
id("swift")
|
id("swift")
|
||||||
.name("OpenStack Swift with SwiftAuth")
|
.name("OpenStack Swift with SwiftAuth")
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class ParseSwiftErrorFromHttpResponse implements HttpErrorHandler {
|
||||||
|
|
||||||
if (sourcePath != null) {
|
if (sourcePath != null) {
|
||||||
String path = command.getCurrentRequest().getEndpoint().getPath();
|
String path = command.getCurrentRequest().getEndpoint().getPath();
|
||||||
int startOfDestinationPath = path.lastIndexOf("/", path.lastIndexOf("/")-1);
|
int startOfDestinationPath = path.lastIndexOf("/", path.lastIndexOf("/") - 1);
|
||||||
String destinationPath = path.substring(startOfDestinationPath);
|
String destinationPath = path.substring(startOfDestinationPath);
|
||||||
|
|
||||||
exception = new CopyObjectException(sourcePath, destinationPath, message);
|
exception = new CopyObjectException(sourcePath, destinationPath, message);
|
||||||
|
|
|
@ -25,7 +25,7 @@ import org.testng.annotations.Test;
|
||||||
@Test(groups = "live", testName = "SwiftClientLiveTest")
|
@Test(groups = "live", testName = "SwiftClientLiveTest")
|
||||||
public class SwiftClientLiveTest extends CommonSwiftClientLiveTest<CommonSwiftClient> {
|
public class SwiftClientLiveTest extends CommonSwiftClientLiveTest<CommonSwiftClient> {
|
||||||
|
|
||||||
public SwiftClientLiveTest(){
|
public SwiftClientLiveTest() {
|
||||||
provider = System.getProperty("test.swift.provider", "swift");
|
provider = System.getProperty("test.swift.provider", "swift");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ import org.testng.annotations.Test;
|
||||||
@Test(groups = "live", testName = "SwiftKeystoneClientLiveTest")
|
@Test(groups = "live", testName = "SwiftKeystoneClientLiveTest")
|
||||||
public class SwiftKeystoneClientLiveTest extends CommonSwiftClientLiveTest<CommonSwiftClient> {
|
public class SwiftKeystoneClientLiveTest extends CommonSwiftClientLiveTest<CommonSwiftClient> {
|
||||||
|
|
||||||
public SwiftKeystoneClientLiveTest(){
|
public SwiftKeystoneClientLiveTest() {
|
||||||
provider = System.getProperty("test.swift.provider", "swift-keystone");
|
provider = System.getProperty("test.swift.provider", "swift-keystone");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ public class InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployA
|
||||||
|
|
||||||
private DnsNameValidator validator;
|
private DnsNameValidator validator;
|
||||||
|
|
||||||
ComputerNameValidator(){
|
ComputerNameValidator() {
|
||||||
this.validator = new DnsNameValidator(3, 15);
|
this.validator = new DnsNameValidator(3, 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,13 +105,13 @@ public class VCloudComputeServiceAdapter implements ComputeServiceAdapter<VApp,
|
||||||
public boolean apply(VAppTemplate from) {
|
public boolean apply(VAppTemplate from) {
|
||||||
try {
|
try {
|
||||||
templateToEnvelope.apply(from);
|
templateToEnvelope.apply(from);
|
||||||
} catch (IllegalArgumentException e){
|
} catch (IllegalArgumentException e) {
|
||||||
logger.warn("Unsupported: "+ e.getMessage());
|
logger.warn("Unsupported: " + e.getMessage());
|
||||||
return false;
|
return false;
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
IllegalArgumentException e2 = Throwables2.getFirstThrowableOfType(e, IllegalArgumentException.class);
|
IllegalArgumentException e2 = Throwables2.getFirstThrowableOfType(e, IllegalArgumentException.class);
|
||||||
if (e2 != null) {
|
if (e2 != null) {
|
||||||
logger.warn("Unsupported: "+ e2.getMessage());
|
logger.warn("Unsupported: " + e2.getMessage());
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
throw e;
|
throw e;
|
||||||
|
|
|
@ -159,9 +159,9 @@ public class IpScope {
|
||||||
public String toString() {
|
public String toString() {
|
||||||
ToStringHelper helper = Objects.toStringHelper("").omitNullValues().add("inherited", inherited).add("gateway", gateway)
|
ToStringHelper helper = Objects.toStringHelper("").omitNullValues().add("inherited", inherited).add("gateway", gateway)
|
||||||
.add("netmask", netmask).add("dns1", dns1).add("dns2", dns2).add("dnsSuffix", dnsSuffix);
|
.add("netmask", netmask).add("dns1", dns1).add("dns2", dns2).add("dnsSuffix", dnsSuffix);
|
||||||
if (ipRanges.size() >0)
|
if (ipRanges.size() > 0)
|
||||||
helper.add("ipRanges", ipRanges);
|
helper.add("ipRanges", ipRanges);
|
||||||
if (allocatedIpAddresses.size() >0)
|
if (allocatedIpAddresses.size() > 0)
|
||||||
helper.add("allocatedIpAddresses", allocatedIpAddresses);
|
helper.add("allocatedIpAddresses", allocatedIpAddresses);
|
||||||
return helper.toString();
|
return helper.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ public class NatService {
|
||||||
public String toString() {
|
public String toString() {
|
||||||
ToStringHelper helper = Objects.toStringHelper("").omitNullValues().add("enabled", enabled)
|
ToStringHelper helper = Objects.toStringHelper("").omitNullValues().add("enabled", enabled)
|
||||||
.add("type", type).add("policy", policy);
|
.add("type", type).add("policy", policy);
|
||||||
if (natRules.size() >0)
|
if (natRules.size() > 0)
|
||||||
helper.add("natRules", natRules);
|
helper.add("natRules", natRules);
|
||||||
return helper.toString();
|
return helper.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class VAppTemplatesInOrg implements Function<Org, Iterable<VAppTemplate>>
|
||||||
public Iterable<VAppTemplate> apply(Org from) {
|
public Iterable<VAppTemplate> apply(Org from) {
|
||||||
Iterable<CatalogItem> catalogs = allCatalogItemsInOrg.apply(from);
|
Iterable<CatalogItem> catalogs = allCatalogItemsInOrg.apply(from);
|
||||||
Iterable<VAppTemplate> vAppTemplates = vAppTemplatesForCatalogItems.apply(catalogs);
|
Iterable<VAppTemplate> vAppTemplates = vAppTemplatesForCatalogItems.apply(catalogs);
|
||||||
return filter(vAppTemplates, and(notNull(), new Predicate<VAppTemplate>(){
|
return filter(vAppTemplates, and(notNull(), new Predicate<VAppTemplate>() {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(VAppTemplate input) {
|
public boolean apply(VAppTemplate input) {
|
||||||
if (input == null)
|
if (input == null)
|
||||||
|
|
|
@ -159,7 +159,7 @@ public class InstantiateVAppTemplateOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString(){
|
public String toString() {
|
||||||
return string().toString();
|
return string().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployA
|
||||||
|
|
||||||
String ns = "http://www.vmware.com/vcloud/v1";
|
String ns = "http://www.vmware.com/vcloud/v1";
|
||||||
Properties outputProperties;
|
Properties outputProperties;
|
||||||
public InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOnExpectTest(){
|
public InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOnExpectTest() {
|
||||||
outputProperties = new Properties();
|
outputProperties = new Properties();
|
||||||
outputProperties.put(javax.xml.transform.OutputKeys.OMIT_XML_DECLARATION, "yes");
|
outputProperties.put(javax.xml.transform.OutputKeys.OMIT_XML_DECLARATION, "yes");
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ public class BlobToHttpGetOptionsTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testRanges(){
|
public void testRanges() {
|
||||||
org.jclouds.blobstore.options.GetOptions in = new org.jclouds.blobstore.options.GetOptions();
|
org.jclouds.blobstore.options.GetOptions in = new org.jclouds.blobstore.options.GetOptions();
|
||||||
in.range(0,1024);
|
in.range(0,1024);
|
||||||
in.startAt(2048);
|
in.startAt(2048);
|
||||||
|
@ -103,7 +103,7 @@ public class BlobToHttpGetOptionsTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testRangesTail(){
|
public void testRangesTail() {
|
||||||
org.jclouds.blobstore.options.GetOptions in = new org.jclouds.blobstore.options.GetOptions();
|
org.jclouds.blobstore.options.GetOptions in = new org.jclouds.blobstore.options.GetOptions();
|
||||||
in.tail(1024);
|
in.tail(1024);
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ public class BlobToHttpGetOptionsTest {
|
||||||
|
|
||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void testRangesStart(){
|
public void testRangesStart() {
|
||||||
org.jclouds.blobstore.options.GetOptions in = new org.jclouds.blobstore.options.GetOptions();
|
org.jclouds.blobstore.options.GetOptions in = new org.jclouds.blobstore.options.GetOptions();
|
||||||
in.startAt(1024);
|
in.startAt(1024);
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ public class Link {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Link build(){
|
public Link build() {
|
||||||
return new Link(relation, type, href);
|
return new Link(relation, type, href);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,7 @@ public class BlockUntilInitScriptStatusIsZeroThenReturnOutput extends AbstractFu
|
||||||
*/
|
*/
|
||||||
static Predicate<String> loopUntilTrueOrThrowCancellationException(Predicate<String> predicate, long period, long maxPeriod,
|
static Predicate<String> loopUntilTrueOrThrowCancellationException(Predicate<String> predicate, long period, long maxPeriod,
|
||||||
final AbstractFuture<ExecResponse> futureWhichMightBeCancelled) {
|
final AbstractFuture<ExecResponse> futureWhichMightBeCancelled) {
|
||||||
return retry(Predicates.<String> and(predicate, new Predicate<String>(){
|
return retry(Predicates.<String> and(predicate, new Predicate<String>() {
|
||||||
public boolean apply(String in) {
|
public boolean apply(String in) {
|
||||||
if (futureWhichMightBeCancelled.isCancelled())
|
if (futureWhichMightBeCancelled.isCancelled())
|
||||||
throw new CancellationException(futureWhichMightBeCancelled + " is cancelled");
|
throw new CancellationException(futureWhichMightBeCancelled + " is cancelled");
|
||||||
|
|
|
@ -117,7 +117,7 @@ public abstract class BaseComputeServiceContextModule extends AbstractModule {
|
||||||
install(new FactoryModuleBuilder().build(BlockUntilInitScriptStatusIsZeroThenReturnOutput.Factory.class));
|
install(new FactoryModuleBuilder().build(BlockUntilInitScriptStatusIsZeroThenReturnOutput.Factory.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void bindCredentialsOverriderFunction(){
|
protected void bindCredentialsOverriderFunction() {
|
||||||
bind(new TypeLiteral<Function<Template, LoginCredentials>>() {
|
bind(new TypeLiteral<Function<Template, LoginCredentials>>() {
|
||||||
}).to(DefaultCredentialsFromImageOrOverridingCredentials.class);
|
}).to(DefaultCredentialsFromImageOrOverridingCredentials.class);
|
||||||
}
|
}
|
||||||
|
@ -303,13 +303,13 @@ public abstract class BaseComputeServiceContextModule extends AbstractModule {
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
protected Optional<ImageExtension> provideImageExtension(Injector i){
|
protected Optional<ImageExtension> provideImageExtension(Injector i) {
|
||||||
return Optional.absent();
|
return Optional.absent();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
protected Optional<SecurityGroupExtension> provideSecurityGroupExtension(Injector i){
|
protected Optional<SecurityGroupExtension> provideSecurityGroupExtension(Injector i) {
|
||||||
return Optional.absent();
|
return Optional.absent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@ public class TemplateBuilderImpl implements TemplateBuilder {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
final Predicate<ComputeMetadata> locationPredicate = new NullEqualToIsParentOrIsGrandparentOfCurrentLocation(new Supplier<Location>(){
|
final Predicate<ComputeMetadata> locationPredicate = new NullEqualToIsParentOrIsGrandparentOfCurrentLocation(new Supplier<Location>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Location get() {
|
public Location get() {
|
||||||
|
@ -1079,13 +1079,13 @@ public class TemplateBuilderImpl implements TemplateBuilder {
|
||||||
toString.add("imageVersion", imageVersion);
|
toString.add("imageVersion", imageVersion);
|
||||||
if (location != null)
|
if (location != null)
|
||||||
toString.add("locationId", location.getId());
|
toString.add("locationId", location.getId());
|
||||||
if (minCores >0) //TODO: make non-primitive
|
if (minCores > 0) //TODO: make non-primitive
|
||||||
toString.add("minCores", minCores);
|
toString.add("minCores", minCores);
|
||||||
if (minRam >0) //TODO: make non-primitive
|
if (minRam > 0) //TODO: make non-primitive
|
||||||
toString.add("minRam", minRam);
|
toString.add("minRam", minRam);
|
||||||
if (minRam >0) //TODO: make non-primitive
|
if (minRam > 0) //TODO: make non-primitive
|
||||||
toString.add("minRam", minRam);
|
toString.add("minRam", minRam);
|
||||||
if (minDisk >0) //TODO: make non-primitive
|
if (minDisk > 0) //TODO: make non-primitive
|
||||||
toString.add("minDisk", minDisk);
|
toString.add("minDisk", minDisk);
|
||||||
toString.add("osFamily", osFamily);
|
toString.add("osFamily", osFamily);
|
||||||
toString.add("osName", osName);
|
toString.add("osName", osName);
|
||||||
|
|
|
@ -97,7 +97,7 @@ public class ImagePredicates {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "metadataContains(" + key +", "+value + ")";
|
return "metadataContains(" + key + ", " + value + ")";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class StubApiMetadata extends BaseApiMetadata {
|
||||||
|
|
||||||
public static class Builder extends BaseApiMetadata.Builder<Builder> {
|
public static class Builder extends BaseApiMetadata.Builder<Builder> {
|
||||||
|
|
||||||
protected Builder(){
|
protected Builder() {
|
||||||
id("stub")
|
id("stub")
|
||||||
.name("in-memory (Stub) API")
|
.name("in-memory (Stub) API")
|
||||||
.identityName("Unused")
|
.identityName("Unused")
|
||||||
|
|
|
@ -22,7 +22,7 @@ import java.net.URI;
|
||||||
*
|
*
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
public class Disk implements Comparable<Disk>{
|
public class Disk implements Comparable<Disk> {
|
||||||
public static Builder builder() {
|
public static Builder builder() {
|
||||||
return new Builder();
|
return new Builder();
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class StubComputeServiceIntegrationTest extends BaseComputeServiceLiveTes
|
||||||
|
|
||||||
socketTester = retry(socketOpen, 1, 1, MILLISECONDS);
|
socketTester = retry(socketOpen, 1, 1, MILLISECONDS);
|
||||||
|
|
||||||
openSocketFinder = new OpenSocketFinder(){
|
openSocketFinder = new OpenSocketFinder() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HostAndPort findOpenSocketOnNode(NodeMetadata node, int port, long timeoutValue, TimeUnit timeUnits) {
|
public HostAndPort findOpenSocketOnNode(NodeMetadata node, int port, long timeoutValue, TimeUnit timeUnits) {
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class RsaSshKeyPairGeneratorTest {
|
||||||
|
|
||||||
replay(crypto, rsaKeyPairGenerator, secureRandom);
|
replay(crypto, rsaKeyPairGenerator, secureRandom);
|
||||||
|
|
||||||
RsaSshKeyPairGenerator supplier = Guice.createInjector(new AbstractModule(){
|
RsaSshKeyPairGenerator supplier = Guice.createInjector(new AbstractModule() {
|
||||||
protected void configure() {
|
protected void configure() {
|
||||||
bind(Crypto.class).toInstance(crypto);
|
bind(Crypto.class).toInstance(crypto);
|
||||||
bind(SecureRandom.class).toInstance(secureRandom);
|
bind(SecureRandom.class).toInstance(secureRandom);
|
||||||
|
|
|
@ -408,11 +408,11 @@ public class ContextBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
static Properties resolveProperties(Properties mutable, String providerId, Set<String> keys, Set<String> optionalKeys) throws NoSuchElementException {
|
static Properties resolveProperties(Properties mutable, String providerId, Set<String> keys, Set<String> optionalKeys) throws NoSuchElementException {
|
||||||
for (String key : keys){
|
for (String key : keys) {
|
||||||
try {
|
try {
|
||||||
String scopedProperty = ImmutableList.copyOf(Splitter.on('.').split(key)).get(1);
|
String scopedProperty = ImmutableList.copyOf(Splitter.on('.').split(key)).get(1);
|
||||||
mutable.setProperty(key, searchPropertiesForProviderScopedProperty(mutable, providerId,scopedProperty));
|
mutable.setProperty(key, searchPropertiesForProviderScopedProperty(mutable, providerId,scopedProperty));
|
||||||
} catch (NoSuchElementException e){
|
} catch (NoSuchElementException e) {
|
||||||
if (!optionalKeys.contains(key))
|
if (!optionalKeys.contains(key))
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ import com.google.inject.Module;
|
||||||
@Beta
|
@Beta
|
||||||
public interface ApiMetadata {
|
public interface ApiMetadata {
|
||||||
|
|
||||||
public static interface Builder<B extends Builder<B>>{
|
public static interface Builder<B extends Builder<B>> {
|
||||||
/**
|
/**
|
||||||
* @see ApiMetadata#getId()
|
* @see ApiMetadata#getId()
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -36,7 +36,7 @@ import com.google.common.collect.UnmodifiableIterator;
|
||||||
@Beta
|
@Beta
|
||||||
public class AdvanceUntilEmptyIterable<E> extends FluentIterable<FluentIterable<E>> {
|
public class AdvanceUntilEmptyIterable<E> extends FluentIterable<FluentIterable<E>> {
|
||||||
|
|
||||||
public static <E> AdvanceUntilEmptyIterable<E> create(Supplier<FluentIterable<E>> nextIterable){
|
public static <E> AdvanceUntilEmptyIterable<E> create(Supplier<FluentIterable<E>> nextIterable) {
|
||||||
return new AdvanceUntilEmptyIterable<E>(nextIterable);
|
return new AdvanceUntilEmptyIterable<E>(nextIterable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ public class ExecutorServiceModule extends AbstractModule {
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
TimeLimiter timeLimiter(@Named(PROPERTY_USER_THREADS) ListeningExecutorService userExecutor){
|
TimeLimiter timeLimiter(@Named(PROPERTY_USER_THREADS) ListeningExecutorService userExecutor) {
|
||||||
return new SimpleTimeLimiter(userExecutor);
|
return new SimpleTimeLimiter(userExecutor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,15 +63,15 @@ public class JCECrypto implements Crypto {
|
||||||
@Override
|
@Override
|
||||||
public Mac hmac(String algorithm, byte[] key) throws NoSuchAlgorithmException, InvalidKeyException {
|
public Mac hmac(String algorithm, byte[] key) throws NoSuchAlgorithmException, InvalidKeyException {
|
||||||
Mac mac = null;
|
Mac mac = null;
|
||||||
if(provider != null) {
|
if (provider != null) {
|
||||||
try {
|
try {
|
||||||
mac = Mac.getInstance(algorithm, provider);
|
mac = Mac.getInstance(algorithm, provider);
|
||||||
} catch(Exception e) {
|
} catch (Exception e) {
|
||||||
//Provider does not function.
|
//Provider does not function.
|
||||||
//Do nothing and let it fallback to the default way.
|
//Do nothing and let it fallback to the default way.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(mac == null) {
|
if (mac == null) {
|
||||||
mac = Mac.getInstance(algorithm);
|
mac = Mac.getInstance(algorithm);
|
||||||
}
|
}
|
||||||
SecretKeySpec signingKey = new SecretKeySpec(key, algorithm);
|
SecretKeySpec signingKey = new SecretKeySpec(key, algorithm);
|
||||||
|
|
|
@ -191,7 +191,7 @@ public class JavaUrlHttpCommandExecutorService extends BaseHttpCommandExecutorSe
|
||||||
}
|
}
|
||||||
|
|
||||||
String host = request.getEndpoint().getHost();
|
String host = request.getEndpoint().getHost();
|
||||||
if(request.getEndpoint().getPort() != -1) {
|
if (request.getEndpoint().getPort() != -1) {
|
||||||
host += ":" + request.getEndpoint().getPort();
|
host += ":" + request.getEndpoint().getPort();
|
||||||
}
|
}
|
||||||
connection.setRequestProperty(HOST, host);
|
connection.setRequestProperty(HOST, host);
|
||||||
|
|
|
@ -131,7 +131,7 @@ public class LocationModule extends AbstractModule {
|
||||||
Suppliers.compose(new FilterStrings(filter), uncached), seconds, TimeUnit.SECONDS);
|
Suppliers.compose(new FilterStrings(filter), uncached), seconds, TimeUnit.SECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static class FilterStrings implements Function<Set<String>, Set<String>>{
|
static class FilterStrings implements Function<Set<String>, Set<String>> {
|
||||||
public final Predicate<String> filter;
|
public final Predicate<String> filter;
|
||||||
|
|
||||||
public FilterStrings(Predicate<String> filter) {
|
public FilterStrings(Predicate<String> filter) {
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class RegionToEndpointOrProviderIfNull implements Function<Object, URI> {
|
||||||
return defaultUri.get();
|
return defaultUri.get();
|
||||||
checkArgument(from instanceof String, "region is a String argument");
|
checkArgument(from instanceof String, "region is a String argument");
|
||||||
Map<String, Supplier<URI>> regionToEndpoint = regionToEndpointSupplier.get();
|
Map<String, Supplier<URI>> regionToEndpoint = regionToEndpointSupplier.get();
|
||||||
if (from.equals(defaultProvider)){
|
if (from.equals(defaultProvider)) {
|
||||||
if (regionToEndpoint.containsKey(from))
|
if (regionToEndpoint.containsKey(from))
|
||||||
return regionToEndpoint.get(from).get();
|
return regionToEndpoint.get(from).get();
|
||||||
return defaultUri.get();
|
return defaultUri.get();
|
||||||
|
|
|
@ -37,7 +37,7 @@ import com.google.common.collect.ImmutableMap.Builder;
|
||||||
import com.google.inject.assistedinject.Assisted;
|
import com.google.inject.assistedinject.Assisted;
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class LocationIdToURIFromConfigurationOrDefaultToProvider implements Supplier<Map<String, Supplier<URI>>>{
|
public class LocationIdToURIFromConfigurationOrDefaultToProvider implements Supplier<Map<String, Supplier<URI>>> {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
protected Logger logger = Logger.NULL;
|
protected Logger logger = Logger.NULL;
|
||||||
|
|
|
@ -116,7 +116,7 @@ public class BindLoggersAnnotatedWithResource implements TypeListener {
|
||||||
Logger logger = loggerFactory.getLogger(type.getName());
|
Logger logger = loggerFactory.getLogger(type.getName());
|
||||||
|
|
||||||
for (Field field : loggerFields) {
|
for (Field field : loggerFields) {
|
||||||
if (field.isAnnotationPresent(Named.class)){
|
if (field.isAnnotationPresent(Named.class)) {
|
||||||
Named name = field.getAnnotation(Named.class);
|
Named name = field.getAnnotation(Named.class);
|
||||||
encounter.register(new AssignLoggerToField<I>(loggerFactory.getLogger(name.value()), field));
|
encounter.register(new AssignLoggerToField<I>(loggerFactory.getLogger(name.value()), field));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -124,7 +124,7 @@ public abstract class BaseApiLiveTest<A extends Closeable> {
|
||||||
if (provider != null)
|
if (provider != null)
|
||||||
try {
|
try {
|
||||||
return ContextBuilder.newBuilder(provider);
|
return ContextBuilder.newBuilder(provider);
|
||||||
} catch (NoSuchElementException e){
|
} catch (NoSuchElementException e) {
|
||||||
Logger.getAnonymousLogger()
|
Logger.getAnonymousLogger()
|
||||||
.warning("provider ["
|
.warning("provider ["
|
||||||
+ provider
|
+ provider
|
||||||
|
|
|
@ -123,7 +123,7 @@ public abstract class BaseContextLiveTest<C extends Context> {
|
||||||
if (provider != null)
|
if (provider != null)
|
||||||
try {
|
try {
|
||||||
return ContextBuilder.newBuilder(provider);
|
return ContextBuilder.newBuilder(provider);
|
||||||
} catch (NoSuchElementException e){
|
} catch (NoSuchElementException e) {
|
||||||
Logger.getAnonymousLogger()
|
Logger.getAnonymousLogger()
|
||||||
.warning("provider ["
|
.warning("provider ["
|
||||||
+ provider
|
+ provider
|
||||||
|
|
|
@ -31,7 +31,7 @@ import com.google.inject.Module;
|
||||||
*
|
*
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
public abstract class BaseViewLiveTest<V extends View> extends BaseContextLiveTest<Context>{
|
public abstract class BaseViewLiveTest<V extends View> extends BaseContextLiveTest<Context> {
|
||||||
|
|
||||||
protected volatile V view;
|
protected volatile V view;
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class JcloudsTestBlobStoreApiMetadata extends BaseRestApiMetadata {
|
||||||
|
|
||||||
public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
|
public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
|
||||||
|
|
||||||
protected Builder(){
|
protected Builder() {
|
||||||
super(IntegrationTestClient.class, IntegrationTestAsyncClient.class);
|
super(IntegrationTestClient.class, IntegrationTestAsyncClient.class);
|
||||||
id("test-blobstore-api")
|
id("test-blobstore-api")
|
||||||
.view(Storage.class)
|
.view(Storage.class)
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class JcloudsTestComputeApiMetadata extends BaseRestApiMetadata {
|
||||||
|
|
||||||
public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
|
public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
|
||||||
|
|
||||||
protected Builder(){
|
protected Builder() {
|
||||||
super(IntegrationTestClient.class, IntegrationTestAsyncClient.class);
|
super(IntegrationTestClient.class, IntegrationTestAsyncClient.class);
|
||||||
id("test-compute-api")
|
id("test-compute-api")
|
||||||
.view(Compute.class)
|
.view(Compute.class)
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class JcloudsTestYetAnotherComputeApiMetadata extends BaseRestApiMetadata
|
||||||
|
|
||||||
public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
|
public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
|
||||||
|
|
||||||
protected Builder(){
|
protected Builder() {
|
||||||
super(IntegrationTestClient.class, IntegrationTestAsyncClient.class);
|
super(IntegrationTestClient.class, IntegrationTestAsyncClient.class);
|
||||||
id("test-yet-another-compute-api")
|
id("test-yet-another-compute-api")
|
||||||
.view(Compute.class)
|
.view(Compute.class)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue