You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by na...@apache.org on 2015/06/26 14:44:58 UTC
[23/50] [abbrv] jclouds git commit: Fixed InstanceApiLiveTest,
made Instance.status @Nullable
Fixed InstanceApiLiveTest, made Instance.status @Nullable
Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/da9bd0c1
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/da9bd0c1
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/da9bd0c1
Branch: refs/heads/master
Commit: da9bd0c19dd969b30c002626a3e4c3ec825abb14
Parents: aa3a8df
Author: Daniel Broudy <br...@google.com>
Authored: Tue Jan 6 15:25:41 2015 -0800
Committer: Ignasi Barrera <na...@apache.org>
Committed: Fri Jan 9 23:19:33 2015 +0100
----------------------------------------------------------------------
.../java/org/jclouds/googlecomputeengine/domain/Instance.java | 2 +-
.../googlecomputeengine/features/InstanceApiLiveTest.java | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jclouds/blob/da9bd0c1/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Instance.java
----------------------------------------------------------------------
diff --git a/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Instance.java b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Instance.java
index cdc2ee4..dcbc344 100644
--- a/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Instance.java
+++ b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Instance.java
@@ -225,7 +225,7 @@ public abstract class Instance {
public abstract URI machineType();
- public abstract Status status();
+ @Nullable public abstract Status status();
/** Human-readable explanation of the status. */
@Nullable public abstract String statusMessage();
http://git-wip-us.apache.org/repos/asf/jclouds/blob/da9bd0c1/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/InstanceApiLiveTest.java
----------------------------------------------------------------------
diff --git a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/InstanceApiLiveTest.java b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/InstanceApiLiveTest.java
index 9add978..1910282 100644
--- a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/InstanceApiLiveTest.java
+++ b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/InstanceApiLiveTest.java
@@ -126,9 +126,14 @@ public class InstanceApiLiveTest extends BaseGoogleComputeEngineApiLiveTest {
@Test(groups = "live", dependsOnMethods = "testInsertInstance")
public void testAddAccessConfig() {
+ Instance instance = api().get(INSTANCE_NAME);
+ assertNotNull(instance);
+ assertOperationDoneSuccessfully(api().deleteAccessConfigFromNic(INSTANCE_NAME,
+ instance.networkInterfaces().get(0).accessConfigs().get(0).name(), "nic0"));
+
AccessConfig config = AccessConfig.create("test-config", Type.ONE_TO_ONE_NAT, null);
assertOperationDoneSuccessfully(api().addAccessConfigToNic(INSTANCE_NAME, config, "nic0"));
- Instance instance = api().get(INSTANCE_NAME);
+ instance = api().get(INSTANCE_NAME);
assertNotNull(instance);
assertEquals(instance.networkInterfaces().get(0).accessConfigs().get(0).name(), "test-config");
}