summaryrefslogtreecommitdiffstats
path: root/inventory/multi_ec2.py
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2014-12-12 20:07:49 -0500
committerKenny Woodson <kwoodson@redhat.com>2014-12-12 20:07:49 -0500
commitd8ccf2a6b937f53e4f564102d4e7f009ade1e26a (patch)
tree7e1e2d322113d98df97a3367d6222d450a2b67d2 /inventory/multi_ec2.py
parent6eead926a86f3de1ea0dd4113a715a1516458bcc (diff)
downloadopenshift-d8ccf2a6b937f53e4f564102d4e7f009ade1e26a.tar.gz
openshift-d8ccf2a6b937f53e4f564102d4e7f009ade1e26a.tar.bz2
openshift-d8ccf2a6b937f53e4f564102d4e7f009ade1e26a.tar.xz
openshift-d8ccf2a6b937f53e4f564102d4e7f009ade1e26a.zip
Updated the function name to accurately reflect its procedure.
Diffstat (limited to 'inventory/multi_ec2.py')
-rwxr-xr-xinventory/multi_ec2.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/inventory/multi_ec2.py b/inventory/multi_ec2.py
index 6085a1aef..7fbfb0c90 100755
--- a/inventory/multi_ec2.py
+++ b/inventory/multi_ec2.py
@@ -106,7 +106,7 @@ class MultiEc2(object):
self.results[result['name']] = json.loads(result['out'])
values = self.results.values()
values.insert(0, self.result)
- map(lambda x: self.merge(self.result, x), values)
+ map(lambda x: self.merge_destructively(self.result, x), values)
else:
# For any 0 result, return it
count = 0
@@ -117,12 +117,12 @@ class MultiEc2(object):
if count > 1:
raise RuntimeError("Found > 1 results for --host %s. \
This is an invalid state." % self.args.host)
- def merge(self, a, b):
+ def merge_destructively(self, a, b):
"merges b into a"
for key in b:
if key in a:
if isinstance(a[key], dict) and isinstance(b[key], dict):
- self.merge(a[key], b[key])
+ self.merge_destructively(a[key], b[key])
elif a[key] == b[key]:
pass # same leaf value
# both lists so add each element in b to a if it does ! exist