From 3b2f02b7237187295032a9c0029a4a8cea088a5d Mon Sep 17 00:00:00 2001 From: Ignasi Barrera Date: Mon, 14 Jul 2014 10:53:08 +0200 Subject: [PATCH] Removed unnecessary whitespaces and fixed formatting --- .../AllocateAndAddFloatingIpToNode.java | 24 ++++++------ .../options/NodeAndNovaTemplateOptions.java | 14 +++---- .../compute/options/NovaTemplateOptions.java | 39 +++++++++---------- ...sWithGroupEncodedIntoNameThenAddToSet.java | 6 +-- .../v2_0/options/CreateServerOptions.java | 13 +++---- .../v2_0/predicates/ServerPredicates.java | 12 +++--- ...ocateAndAddFloatingIpToNodeExpectTest.java | 4 +- .../v2_0/internal/BaseNovaApiLiveTest.java | 5 ++- .../predicates/ServerPredicatesMockTest.java | 23 ++++++----- .../rest/InsufficientResourcesException.java | 4 +- 10 files changed, 74 insertions(+), 70 deletions(-) diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/functions/AllocateAndAddFloatingIpToNode.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/functions/AllocateAndAddFloatingIpToNode.java index e1801b9ad6..acec9bc986 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/functions/AllocateAndAddFloatingIpToNode.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/functions/AllocateAndAddFloatingIpToNode.java @@ -80,7 +80,7 @@ public class AllocateAndAddFloatingIpToNode implements String zoneId = node.getLocation().getParent().getId(); FloatingIPApi floatingIpApi = novaApi.getFloatingIPExtensionForZone(zoneId).get(); Optional> poolNames = input.get().getNovaTemplateOptions().get().getFloatingIpPoolNames(); - + Optional ip = allocateFloatingIPForNode(floatingIpApi, poolNames, node.getId()); if (!ip.isPresent()) { throw new InsufficientResourcesException("Failed to allocate a FloatingIP for node(" + node.getId() + ")"); @@ -95,40 +95,40 @@ public class AllocateAndAddFloatingIpToNode implements /** * Allocates a FloatingIP for a given Node - * + * * @param floatingIpApi FloatingIPApi to create or query for a valid FloatingIP * @param poolNames optional set of pool names from which we will attempt to allocate an IP from. Most cases this is null * @param nodeID optional id of the Node we are trying to allocate a FloatingIP for. Used here only for logging purposes - * @return Optional + * @return Optional */ private Optional allocateFloatingIPForNode(FloatingIPApi floatingIpApi, Optional> poolNames, String nodeID) { - + FloatingIP ip = null; - + // 1.) Attempt to allocate from optionally passed poolNames if (poolNames.isPresent()) { - for (String poolName : poolNames.get()){ + for (String poolName : poolNames.get()) { try { logger.debug(">> allocating floating IP from pool %s for node(%s)", poolName, nodeID); ip = floatingIpApi.allocateFromPool(poolName); if (ip != null) return Optional.of(ip); - } catch (InsufficientResourcesException ire){ + } catch (InsufficientResourcesException ire) { logger.trace("<< [%s] failed to allocate floating IP from pool %s for node(%s)", ire.getMessage(), poolName, nodeID); } } } - + // 2.) Attempt to allocate, if necessary, via 'create()' call try { logger.debug(">> creating floating IP for node(%s)", nodeID); ip = floatingIpApi.create(); - if(ip != null) + if (ip != null) return Optional.of(ip); - } catch (InsufficientResourcesException ire){ + } catch (InsufficientResourcesException ire) { logger.trace("<< [%s] failed to create floating IP for node(%s)", ire.getMessage(), nodeID); } - + // 3.) If no IP was found make final attempt by searching through list of available IP's logger.trace(">> searching for existing, unassigned floating IP for node(%s)", nodeID); List unassignedIps = Lists.newArrayList(Iterables.filter(floatingIpApi.list(), @@ -145,7 +145,7 @@ public class AllocateAndAddFloatingIpToNode implements ip = Iterables.getLast(unassignedIps); return Optional.fromNullable(ip); } - + @Override public String toString() { return Objects.toStringHelper("AllocateAndAddFloatingIpToNode").toString(); diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/options/NodeAndNovaTemplateOptions.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/options/NodeAndNovaTemplateOptions.java index d95e8175eb..b971cfc616 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/options/NodeAndNovaTemplateOptions.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/options/NodeAndNovaTemplateOptions.java @@ -23,15 +23,15 @@ import org.jclouds.compute.domain.NodeMetadata; import com.google.common.util.concurrent.Atomics; /** - * Simple data-structure for holding a NodeMetadata object along with a + * Simple data-structure for holding a NodeMetadata object along with a * corresponding NovaTemplateOptions object. */ public class NodeAndNovaTemplateOptions { private final AtomicReference nodeMetadata; private final AtomicReference novaTemplateOptions; - - protected NodeAndNovaTemplateOptions(AtomicReference nodeMetadata, AtomicReference novaTemplateOptions){ + + protected NodeAndNovaTemplateOptions(AtomicReference nodeMetadata, AtomicReference novaTemplateOptions) { this.nodeMetadata = nodeMetadata; this.novaTemplateOptions = novaTemplateOptions; } @@ -43,12 +43,12 @@ public class NodeAndNovaTemplateOptions { public AtomicReference getNovaTemplateOptions() { return novaTemplateOptions; } - - public static NodeAndNovaTemplateOptions newReference(AtomicReference node, AtomicReference options){ + + public static NodeAndNovaTemplateOptions newReference(AtomicReference node, AtomicReference options) { return new NodeAndNovaTemplateOptions(node, options); } - - public static AtomicReference newAtomicReference(AtomicReference node, AtomicReference options){ + + public static AtomicReference newAtomicReference(AtomicReference node, AtomicReference options) { return Atomics.newReference(NodeAndNovaTemplateOptions.newReference(node, options)); } } diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/options/NovaTemplateOptions.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/options/NovaTemplateOptions.java index 4e6ce2e3df..2f15f66639 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/options/NovaTemplateOptions.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/options/NovaTemplateOptions.java @@ -28,7 +28,6 @@ import java.util.Set; import org.jclouds.compute.options.TemplateOptions; import org.jclouds.domain.LoginCredentials; import org.jclouds.openstack.nova.v2_0.domain.Network; -import org.jclouds.openstack.nova.v2_0.options.CreateServerOptions; import org.jclouds.scriptbuilder.domain.Statement; import com.google.common.base.Objects; @@ -145,7 +144,7 @@ public class NovaTemplateOptions extends TemplateOptions implements Cloneable { this.autoAssignFloatingIp = enable; return this; } - + /** * @see #getFloatingIpPoolNames() */ @@ -200,7 +199,7 @@ public class NovaTemplateOptions extends TemplateOptions implements Cloneable { /** *

Note

* - * This requires that {@link NovaApi#getExtensionForZone(String)} to return + * This requires that {@link org.jclouds.openstack.nova.v2_0.NovaApi#getExtensionForZone(String)} to return * {@link Optional#isPresent present} * * @return true if auto assignment of a floating ip to each vm is enabled @@ -211,16 +210,16 @@ public class NovaTemplateOptions extends TemplateOptions implements Cloneable { /** * The floating IP pool name(s) to use when allocating a FloatingIP. Applicable - * only if #shouldAutoAssignFloatingIp() returns true. If not set will attempt to - * use whatever FloatingIP(s) can be found regardless of which pool they originated + * only if #shouldAutoAssignFloatingIp() returns true. If not set will attempt to + * use whatever FloatingIP(s) can be found regardless of which pool they originated * from - * + * * @return floating-ip-pool names to use */ public Optional> getFloatingIpPoolNames() { return floatingIpPoolNames; - } - + } + /** * Specifies the keypair used to run instances with * @return the keypair to be used @@ -228,11 +227,11 @@ public class NovaTemplateOptions extends TemplateOptions implements Cloneable { public String getKeyPairName() { return keyPairName; } - + /** *

Note

* - * This requires that {@link NovaApi#getKeyPairExtensionForZone(String)} to return + * This requires that {@link org.jclouds.openstack.nova.v2_0.NovaApi#getKeyPairExtensionForZone(String)} to return * {@link Optional#isPresent present} * * @return true if auto generation of keypairs is enabled @@ -256,21 +255,21 @@ public class NovaTemplateOptions extends TemplateOptions implements Cloneable { } /** - * @see CreateServerOptions#getDiskConfig() + * @see org.jclouds.openstack.nova.v2_0.options.CreateServerOptions#getDiskConfig() */ public String getDiskConfig() { return diskConfig; } /** - * @see CreateServerOptions#getConfigDrive() + * @see org.jclouds.openstack.nova.v2_0.options.CreateServerOptions#getConfigDrive() */ public boolean getConfigDrive() { return configDrive; } /** - * @see CreateServerOptions#getNetworks() + * @see org.jclouds.openstack.nova.v2_0.options.CreateServerOptions#getNetworks() */ public Set getNovaNetworks() { return novaNetworks; @@ -298,11 +297,11 @@ public class NovaTemplateOptions extends TemplateOptions implements Cloneable { */ public NovaTemplateOptions floatingIpPoolNames(Iterable floatingIpPoolNames) { NovaTemplateOptions options = new NovaTemplateOptions(); - return NovaTemplateOptions.class.cast(options.floatingIpPoolNames(floatingIpPoolNames)); - } - + return NovaTemplateOptions.class.cast(options.floatingIpPoolNames(floatingIpPoolNames)); + } + /** - * @see NovaTemplateOptions#shouldGenerateKeyPair() + * @see NovaTemplateOptions#shouldGenerateKeyPair() */ public static NovaTemplateOptions generateKeyPair(boolean enable) { return new NovaTemplateOptions().generateKeyPair(enable); @@ -638,7 +637,7 @@ public class NovaTemplateOptions extends TemplateOptions implements Cloneable { } /** - * @see CreateServerOptions#getDiskConfig() + * @see org.jclouds.openstack.nova.v2_0.options.CreateServerOptions#getDiskConfig() */ public NovaTemplateOptions diskConfig(String diskConfig) { this.diskConfig = diskConfig; @@ -651,7 +650,7 @@ public class NovaTemplateOptions extends TemplateOptions implements Cloneable { * normally be available through the metadata service by mounting this disk and reading files from it. * To enable the config drive, set this parameter to "true". * This has to be enabled for user data cases. - * @see CreateServerOptions#getConfigDrive() + * @see org.jclouds.openstack.nova.v2_0.options.CreateServerOptions#getConfigDrive() */ public NovaTemplateOptions configDrive(boolean configDrive) { this.configDrive = configDrive; @@ -662,7 +661,7 @@ public class NovaTemplateOptions extends TemplateOptions implements Cloneable { * @param novaNetworks The list of network declarations. * Nova-specific network declarations allow for specifying network UUIDs, port UUIDs, and fixed IPs. * Unline {@link #networks(Iterable)} this supports setting additional network parameters and not just network UUIDs. - * @see CreateServerOptions#getNetworks() + * @see org.jclouds.openstack.nova.v2_0.options.CreateServerOptions#getNetworks() */ public NovaTemplateOptions novaNetworks(Set novaNetworks) { this.novaNetworks = novaNetworks; diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/strategy/ApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddToSet.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/strategy/ApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddToSet.java index 2ba160c7ed..616119d07d 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/strategy/ApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddToSet.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/strategy/ApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddToSet.java @@ -158,9 +158,9 @@ public class ApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddT ListenableFuture> future = super.createNodeInGroupWithNameAndTemplate(group, name, template); final NovaTemplateOptions templateOptions = NovaTemplateOptions.class.cast(template.getOptions()); if (templateOptions.shouldAutoAssignFloatingIp()) { - - ListenableFuture> nodeAndNovaTemplateOptions = Futures.transform(future, - new Function, AtomicReference>(){ + + ListenableFuture> nodeAndNovaTemplateOptions = Futures.transform(future, + new Function, AtomicReference>() { @Override public AtomicReference apply(AtomicReference input) { diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/options/CreateServerOptions.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/options/CreateServerOptions.java index 05cbd8a870..2fe33fac65 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/options/CreateServerOptions.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/options/CreateServerOptions.java @@ -33,15 +33,12 @@ import javax.inject.Inject; import javax.inject.Named; import org.jclouds.http.HttpRequest; -import org.jclouds.openstack.nova.v2_0.NovaApi; import org.jclouds.openstack.nova.v2_0.domain.Network; -import org.jclouds.openstack.nova.v2_0.domain.Server; import org.jclouds.rest.MapBinder; import org.jclouds.rest.binders.BindToJsonPayload; import com.google.common.base.Objects; import com.google.common.base.Objects.ToStringHelper; -import com.google.common.base.Optional; import com.google.common.collect.ForwardingObject; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -208,7 +205,7 @@ public class CreateServerOptions implements MapBinder { server.availabilityZone = availabilityZone; if (userData != null) server.user_data = base64().encode(userData); - if (configDrive == true) + if (configDrive) server.configDrive = "true"; if (securityGroupNames.size() > 0) { server.securityGroupNames = Sets.newLinkedHashSet(); @@ -367,8 +364,8 @@ public class CreateServerOptions implements MapBinder { *

*

Note

*

- * This requires that {@link NovaApi#getSecurityGroupExtensionForZone(String)} to return - * {@link Optional#isPresent present} + * This requires that {@link org.jclouds.openstack.nova.v2_0.NovaApi#getSecurityGroupExtensionForZone(String)} to return + * {@link com.google.common.base.Optional#isPresent present} */ public Set getSecurityGroupNames() { return securityGroupNames; @@ -413,9 +410,9 @@ public class CreateServerOptions implements MapBinder { /** * When you create a server from an image with the diskConfig value set to - * {@link Server#DISK_CONFIG_AUTO}, the server is built with a single partition that is expanded to + * {@link org.jclouds.openstack.nova.v2_0.domain.Server#DISK_CONFIG_AUTO}, the server is built with a single partition that is expanded to * the disk size of the flavor selected. When you set the diskConfig attribute to - * {@link Server#DISK_CONFIG_MANUAL}, the server is built by using the partition scheme and file + * {@link org.jclouds.openstack.nova.v2_0.domain.Server#DISK_CONFIG_MANUAL}, the server is built by using the partition scheme and file * system that is in the source image. *

* If the target flavor disk is larger, remaining disk space is left unpartitioned. A server inherits the diskConfig diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/predicates/ServerPredicates.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/predicates/ServerPredicates.java index 47812eb136..e955368b34 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/predicates/ServerPredicates.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/predicates/ServerPredicates.java @@ -16,18 +16,18 @@ */ package org.jclouds.openstack.nova.v2_0.predicates; -import com.google.common.base.Predicate; -import org.jclouds.openstack.nova.v2_0.domain.Server; -import org.jclouds.openstack.nova.v2_0.domain.ServerCreated; -import org.jclouds.openstack.nova.v2_0.features.ServerApi; - import static com.google.common.base.Preconditions.checkNotNull; import static java.util.concurrent.TimeUnit.SECONDS; -import static org.jclouds.openstack.nova.v2_0.domain.Server.Status; import static org.jclouds.openstack.nova.v2_0.domain.Server.Status.ACTIVE; import static org.jclouds.openstack.nova.v2_0.domain.Server.Status.SHUTOFF; import static org.jclouds.util.Predicates2.retry; +import org.jclouds.openstack.nova.v2_0.domain.Server; +import org.jclouds.openstack.nova.v2_0.domain.Server.Status; +import org.jclouds.openstack.nova.v2_0.features.ServerApi; + +import com.google.common.base.Predicate; + /** * This class tests to see if a Server or ServerCreated has reached a desired status. This class is most useful when * paired with a RetryablePredicate as in the code below. Together these classes can be used to block execution until diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/compute/functions/AllocateAndAddFloatingIpToNodeExpectTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/compute/functions/AllocateAndAddFloatingIpToNodeExpectTest.java index 8edf4a57bd..8c7dae9b61 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/compute/functions/AllocateAndAddFloatingIpToNodeExpectTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/compute/functions/AllocateAndAddFloatingIpToNodeExpectTest.java @@ -58,7 +58,7 @@ public class AllocateAndAddFloatingIpToNodeExpectTest extends BaseNovaComputeSer host).name("Server 71592").status(Status.RUNNING).privateAddresses(ImmutableSet.of("10.4.27.237")) .credentials(LoginCredentials.builder().password("foo").build()).build(); final NovaTemplateOptions options = NovaTemplateOptions.Builder.autoAssignFloatingIp(false); - + HttpRequest createFloatingIP = HttpRequest.builder().method("POST").endpoint( URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-floating-ips")).headers( ImmutableMultimap. builder().put("Accept", "application/json").put("X-Auth-Token", @@ -140,7 +140,7 @@ public class AllocateAndAddFloatingIpToNodeExpectTest extends BaseNovaComputeSer assertNotNull(optionsRef.get()); assertEquals(node1.getPublicAddresses(), ImmutableSet.of("10.0.0.5")); } - + public void testAllocateWhenAllocationFailsOn404LookupUnusedIpAddToServerAndUpdatesNodeMetadata() throws Exception { HttpResponse createFloatingIPResponse = HttpResponse .builder() diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/internal/BaseNovaApiLiveTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/internal/BaseNovaApiLiveTest.java index 78f5ff3ccd..631b5f2e84 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/internal/BaseNovaApiLiveTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/internal/BaseNovaApiLiveTest.java @@ -19,7 +19,6 @@ package org.jclouds.openstack.nova.v2_0.internal; import java.util.Properties; import java.util.Set; -import com.google.common.collect.*; import org.jclouds.apis.BaseApiLiveTest; import org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties; import org.jclouds.openstack.nova.v2_0.NovaApi; @@ -37,6 +36,10 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import com.google.common.base.Throwables; +import com.google.common.collect.ComparisonChain; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Iterables; +import com.google.common.collect.Ordering; /** * Tests behavior of {@code NovaApi} diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/predicates/ServerPredicatesMockTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/predicates/ServerPredicatesMockTest.java index a8479ab508..4203c750b7 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/predicates/ServerPredicatesMockTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/predicates/ServerPredicatesMockTest.java @@ -16,17 +16,22 @@ */ package org.jclouds.openstack.nova.v2_0.predicates; -import com.squareup.okhttp.mockwebserver.MockResponse; -import com.squareup.okhttp.mockwebserver.MockWebServer; +import static org.jclouds.openstack.nova.v2_0.domain.Server.Status.ACTIVE; +import static org.jclouds.openstack.nova.v2_0.domain.Server.Status.SHUTOFF; +import static org.jclouds.openstack.nova.v2_0.predicates.ServerPredicates.awaitActive; +import static org.jclouds.openstack.nova.v2_0.predicates.ServerPredicates.awaitShutoff; +import static org.jclouds.openstack.nova.v2_0.predicates.ServerPredicates.awaitStatus; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertTrue; + import org.jclouds.openstack.nova.v2_0.NovaApi; import org.jclouds.openstack.nova.v2_0.features.ServerApi; import org.jclouds.openstack.v2_0.internal.BaseOpenStackMockTest; import org.testng.annotations.Test; -import static org.jclouds.openstack.nova.v2_0.domain.Server.Status.ACTIVE; -import static org.jclouds.openstack.nova.v2_0.domain.Server.Status.SHUTOFF; -import static org.jclouds.openstack.nova.v2_0.predicates.ServerPredicates.*; -import static org.testng.Assert.*; +import com.squareup.okhttp.mockwebserver.MockResponse; +import com.squareup.okhttp.mockwebserver.MockWebServer; @Test(groups = "unit", testName = "ServerPredicatesMockTest") public class ServerPredicatesMockTest extends BaseOpenStackMockTest { @@ -41,7 +46,7 @@ public class ServerPredicatesMockTest extends BaseOpenStackMockTest { try { NovaApi novaApi = api(server.getUrl("/").toString(), "openstack-nova"); - ServerApi serverApi = novaApi.getServerApiForZone(("RegionOne")); + ServerApi serverApi = novaApi.getServerApiForZone("RegionOne"); boolean result = awaitActive(serverApi).apply("71752"); @@ -66,7 +71,7 @@ public class ServerPredicatesMockTest extends BaseOpenStackMockTest { try { NovaApi novaApi = api(server.getUrl("/").toString(), "openstack-nova"); - ServerApi serverApi = novaApi.getServerApiForZone(("RegionOne")); + ServerApi serverApi = novaApi.getServerApiForZone("RegionOne"); boolean result = awaitShutoff(serverApi).apply("71752"); @@ -88,7 +93,7 @@ public class ServerPredicatesMockTest extends BaseOpenStackMockTest { try { NovaApi novaApi = api(server.getUrl("/").toString(), "openstack-nova"); - ServerApi serverApi = novaApi.getServerApiForZone(("RegionOne")); + ServerApi serverApi = novaApi.getServerApiForZone("RegionOne"); boolean result = awaitStatus(serverApi, ACTIVE, 3, 1).apply("71752"); diff --git a/core/src/main/java/org/jclouds/rest/InsufficientResourcesException.java b/core/src/main/java/org/jclouds/rest/InsufficientResourcesException.java index 15db2b486f..19b0b81965 100644 --- a/core/src/main/java/org/jclouds/rest/InsufficientResourcesException.java +++ b/core/src/main/java/org/jclouds/rest/InsufficientResourcesException.java @@ -28,11 +28,11 @@ public class InsufficientResourcesException extends RuntimeException { public InsufficientResourcesException() { super(); } - + public InsufficientResourcesException(String arg0) { super(arg0); } - + public InsufficientResourcesException(String arg0, Throwable arg1) { super(arg0, arg1); }