You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by danbroudy <no...@github.com> on 2014/12/10 02:24:51 UTC

[jclouds-labs-google] added CreationTimestamp to HttpHealthCheck and TargetPool + refactor War... (#111)

...ning

Moves common code for Warning and KeyValuePair our to their own files.
Adds creationTimestamp to HttpHealthCheck and TargetPool
Adds missing live tests for InstanceApi
Improves ParseHttpHealthCheckTest
You can merge this Pull Request by running:

  git pull https://github.com/GoogleCloudPlatform/jclouds-labs-google detailCleanIII

Or you can view, comment on it, or merge it online at:

  https://github.com/jclouds/jclouds-labs-google/pull/111

-- Commit Summary --

  * added CreationTimestamp to HttpHealthCheck and TargetPool + refactor Warning

-- File Changes --

    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/HttpHealthCheck.java (9)
    A google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/KeyValuePair.java (37)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Metadata.java (30)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Operation.java (33)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Route.java (27)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/TargetPool.java (9)
    A google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Warning.java (40)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/InstanceApi.java (2)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/options/HttpHealthCheckCreationOptions.java (10)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/options/RouteOptions.java (16)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/ForwardingRuleApiMockTest.java (10)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/InstanceApiLiveTest.java (23)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/InstanceApiMockTest.java (2)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseHttpHealthCheckListTest.java (2)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseHttpHealthCheckTest.java (15)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseOperationTest.java (8)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRouteListTest.java (3)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRouteTest.java (7)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseTargetPoolTest.java (1)
    M google-compute-engine/src/test/resources/httphealthcheck_get.json (17)
    M google-compute-engine/src/test/resources/httphealthcheck_list.json (67)

-- Patch Links --

https://github.com/jclouds/jclouds-labs-google/pull/111.patch
https://github.com/jclouds/jclouds-labs-google/pull/111.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/111

Re: [jclouds-labs-google] added CreationTimestamp to HttpHealthCheck and TargetPool + refactor War... (#111)

Posted by Ignasi Barrera <no...@github.com>.
Merged to master as [2a72404](https://git-wip-us.apache.org/repos/asf?p=jclouds-labs-google.git;a=commit;h=2a724044b5aa76a66e043067811eb5e05df0f1f7). Thanks @danbroudy!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/111#issuecomment-67071254

Re: [jclouds-labs-google] added CreationTimestamp to HttpHealthCheck and TargetPool + refactor War... (#111)

Posted by Ignasi Barrera <no...@github.com>.
Closed #111.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/111#event-207921454

Re: [jclouds-labs-google] added CreationTimestamp to HttpHealthCheck and TargetPool + refactor War... (#111)

Posted by danbroudy <no...@github.com>.
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +package org.jclouds.googlecomputeengine.domain;
> +
> +import org.jclouds.json.SerializedNames;
> +
> +import com.google.auto.value.AutoValue;
> +
> +@AutoValue
> +public abstract class KeyValuePair {
> +
> +   abstract String key();
> +
> +   abstract String value();

Nice catch, the properties were package-private from when they were declared in the Metadata class which has implemented get functions. They are now used in the Warning class as well so they should be public.  

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/111/files#r21640441

Re: [jclouds-labs-google] added CreationTimestamp to HttpHealthCheck and TargetPool + refactor War... (#111)

Posted by danbroudy <no...@github.com>.
Addressed comments and squashed.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/111#issuecomment-66530436

Re: [jclouds-labs-google] added CreationTimestamp to HttpHealthCheck and TargetPool + refactor War... (#111)

Posted by Ignasi Barrera <no...@github.com>.
> +      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);
> +      assertNotNull(instance);
> +      assertEquals(instance.networkInterfaces().get(0).accessConfigs().get(0).name(), "test-config");
> +   }
> +
> +   @Test(groups = "live", dependsOnMethods = "testAddAccessConfig")
> +   public void testDeleteAccessConfig() {
> +      Instance instance = api().get(INSTANCE_NAME);
> +      System.out.println(instance);
> +      assertOperationDoneSuccessfully(api().deleteAccessConfigFromNic(INSTANCE_NAME, "test-config", "nic0"));
> +      instance = api().get(INSTANCE_NAME);
> +      assertNotNull(instance);
> +      assertTrue(instance.networkInterfaces().get(0).accessConfigs().isEmpty());
> +      }

Remove the System.out and properly indent the closing `}`.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/111/files#r21639764

Re: [jclouds-labs-google] added CreationTimestamp to HttpHealthCheck and TargetPool + refactor War... (#111)

Posted by Ignasi Barrera <no...@github.com>.
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +package org.jclouds.googlecomputeengine.domain;
> +
> +import org.jclouds.json.SerializedNames;
> +
> +import com.google.auto.value.AutoValue;
> +
> +@AutoValue
> +public abstract class KeyValuePair {
> +
> +   abstract String key();
> +
> +   abstract String value();

Are these properties *package-private* for any particular reason? In that case, would it make sense to make the whole class package-private? (I'm not sure if that will prevent it from being deserialised properly):

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/111/files#r21639540

Re: [jclouds-labs-google] added CreationTimestamp to HttpHealthCheck and TargetPool + refactor War... (#111)

Posted by Ignasi Barrera <no...@github.com>.
Just a couple minors. Changes lgtm. Thanks!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/111#issuecomment-66528998