You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by an...@apache.org on 2017/08/16 07:36:45 UTC

jclouds git commit: Update field address type to Href and update tests templates

Repository: jclouds
Updated Branches:
  refs/heads/master 7c58f9d77 -> e153322ee


Update field address type to Href and update tests templates


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/e153322e
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/e153322e
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/e153322e

Branch: refs/heads/master
Commit: e153322ee06be93ea06c1aaedba5b5797b46fe9d
Parents: 7c58f9d
Author: cpanato <ct...@gmail.com>
Authored: Tue Aug 15 17:47:09 2017 -0300
Committer: Andrea Turli <an...@gmail.com>
Committed: Wed Aug 16 09:18:54 2017 +0200

----------------------------------------------------------------------
 .../main/java/org/jclouds/packet/domain/Facility.java   |  4 ++--
 .../packet/src/test/resources/facilities-first.json     |  8 ++++++--
 .../packet/src/test/resources/facilities-last.json      |  4 +++-
 providers/packet/src/test/resources/facilities.json     | 12 +++++++++---
 4 files changed, 20 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/e153322e/providers/packet/src/main/java/org/jclouds/packet/domain/Facility.java
----------------------------------------------------------------------
diff --git a/providers/packet/src/main/java/org/jclouds/packet/domain/Facility.java b/providers/packet/src/main/java/org/jclouds/packet/domain/Facility.java
index 3124c7e..2921d9c 100644
--- a/providers/packet/src/main/java/org/jclouds/packet/domain/Facility.java
+++ b/providers/packet/src/main/java/org/jclouds/packet/domain/Facility.java
@@ -32,10 +32,10 @@ public abstract class Facility {
     public abstract String code();
     public abstract List<String> features();
     @Nullable
-    public abstract String address();
+    public abstract Href address();
 
     @SerializedNames({"id", "name", "code", "features", "address"})
-    public static Facility create(final String id, String name, String code, List<String> features, String address) {
+    public static Facility create(final String id, String name, String code, List<String> features, Href address) {
         return new AutoValue_Facility(id, name, code,
                 features == null ? ImmutableList.<String> of() : ImmutableList.copyOf(features),
                 address);

http://git-wip-us.apache.org/repos/asf/jclouds/blob/e153322e/providers/packet/src/test/resources/facilities-first.json
----------------------------------------------------------------------
diff --git a/providers/packet/src/test/resources/facilities-first.json b/providers/packet/src/test/resources/facilities-first.json
index 5decf9a..f917fcf 100644
--- a/providers/packet/src/test/resources/facilities-first.json
+++ b/providers/packet/src/test/resources/facilities-first.json
@@ -8,7 +8,9 @@
         "baremetal",
         "storage"
       ],
-      "address": null
+      "address":  {
+        "href": "e1e9c52e-a0bc-4117-b996-0fc94843ea09"
+      }
     },
     {
       "id": "8e6470b3-b75e-47d1-bb93-45b225750975",
@@ -17,7 +19,9 @@
       "features": [
         "storage"
       ],
-      "address": null
+      "address":  {
+        "href": "e1e9c52e-a0bc-4117-b996-0fc94843ea09"
+      }
     }
   ],
   "meta": {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/e153322e/providers/packet/src/test/resources/facilities-last.json
----------------------------------------------------------------------
diff --git a/providers/packet/src/test/resources/facilities-last.json b/providers/packet/src/test/resources/facilities-last.json
index f5e6d1c..8a45913 100644
--- a/providers/packet/src/test/resources/facilities-last.json
+++ b/providers/packet/src/test/resources/facilities-last.json
@@ -5,7 +5,9 @@
       "name": "Sunnyvale, CA",
       "code": "sjc1",
       "features": [],
-      "address": null
+      "address":  {
+        "href": "e1e9c52e-a0bc-4117-b996-0fc94843ea09"
+      }
     }
   ],
   "meta": {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/e153322e/providers/packet/src/test/resources/facilities.json
----------------------------------------------------------------------
diff --git a/providers/packet/src/test/resources/facilities.json b/providers/packet/src/test/resources/facilities.json
index ed6ab4f..00e8036 100644
--- a/providers/packet/src/test/resources/facilities.json
+++ b/providers/packet/src/test/resources/facilities.json
@@ -8,7 +8,9 @@
         "baremetal",
         "storage"
       ],
-      "address": null
+      "address":  {
+        "href": "e1e9c52e-a0bc-4117-b996-0fc94843ea09"
+      }
     },
     {
       "id": "8e6470b3-b75e-47d1-bb93-45b225750975",
@@ -17,14 +19,18 @@
       "features": [
         "storage"
       ],
-      "address": null
+      "address":  {
+        "href": "e1e9c52e-a0bc-4117-b996-0fc94843ea09"
+      }
     },
     {
       "id": "2b70eb8f-fa18-47c0-aba7-222a842362fd",
       "name": "Sunnyvale, CA",
       "code": "sjc1",
       "features": [],
-      "address": null
+      "address":  {
+        "href": "e1e9c52e-a0bc-4117-b996-0fc94843ea09"
+      }
     }
   ]
 }