From a75d816ad7c95088125574778853df6ef3e7a528 Mon Sep 17 00:00:00 2001 From: Jeff Gehlbach Date: Wed, 25 Jul 2012 12:11:58 -0400 Subject: [PATCH] Add support for chef_environment on Node domain object --- .../main/java/org/jclouds/chef/domain/Node.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/Node.java b/apis/chef/src/main/java/org/jclouds/chef/domain/Node.java index f4dfafc84a..3f8b876547 100644 --- a/apis/chef/src/main/java/org/jclouds/chef/domain/Node.java +++ b/apis/chef/src/main/java/org/jclouds/chef/domain/Node.java @@ -43,6 +43,8 @@ public class Node { private Map automatic = Maps.newLinkedHashMap(); @SerializedName("run_list") private List runList = Lists.newArrayList(); + @SerializedName("chef_environment") + private String chefEnvironment; // internal @SerializedName("json_class") @@ -98,6 +100,10 @@ public class Node { return runList; } + public String getChefEnvironment() { + return chefEnvironment; + } + @SerializedName("chef_type") private String _chefType = "node"; @@ -113,6 +119,7 @@ public class Node { result = prime * result + ((normal == null) ? 0 : normal.hashCode()); result = prime * result + ((override == null) ? 0 : override.hashCode()); result = prime * result + ((runList == null) ? 0 : runList.hashCode()); + result = prime * result + ((chefEnvironment == null) ? 0 : chefEnvironment.hashCode()); return result; } @@ -165,7 +172,12 @@ public class Node { return false; } else if (!runList.equals(other.runList)) return false; + if (chefEnvironment == null) { + if (other.chefEnvironment != null) + return false; + } else if (!chefEnvironment.equals(other.chefEnvironment)) + return false; return true; } -} \ No newline at end of file +}