summaryrefslogtreecommitdiff
path: root/cloudinit/handlers
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2013-04-17 10:17:09 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2013-04-17 10:17:09 -0700
commit6ad068d1ae175d784481fe8f8e190b2721a221f5 (patch)
treef93023b84cbf94459ef7ce3f31fd5f32b70b1714 /cloudinit/handlers
parent66ea1ae9599d27686db2510f3a079485ea8292c3 (diff)
downloadvyos-cloud-init-6ad068d1ae175d784481fe8f8e190b2721a221f5.tar.gz
vyos-cloud-init-6ad068d1ae175d784481fe8f8e190b2721a221f5.zip
Altering the order of merging.
Diffstat (limited to 'cloudinit/handlers')
-rw-r--r--cloudinit/handlers/cloud_config.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/cloudinit/handlers/cloud_config.py b/cloudinit/handlers/cloud_config.py
index d30d6338..7678a5b0 100644
--- a/cloudinit/handlers/cloud_config.py
+++ b/cloudinit/handlers/cloud_config.py
@@ -39,7 +39,6 @@ class CloudConfigPartHandler(handlers.Handler):
self.cloud_buf = None
self.cloud_fn = paths.get_ipath("cloud_config")
self.file_names = []
- self.mergers = [DEF_MERGERS]
def list_types(self):
return [
@@ -89,13 +88,9 @@ class CloudConfigPartHandler(handlers.Handler):
return all_mergers
def _merge_part(self, payload, headers):
- next_mergers = self._extract_mergers(payload, headers)
- # Use the merger list from the last call, since it is the one
- # that will be defining how to merge with the next payload.
- curr_mergers = list(self.mergers[-1])
- LOG.debug("Merging by applying %s", curr_mergers)
- self.mergers.append(next_mergers)
- merger = mergers.construct(curr_mergers)
+ my_mergers = self._extract_mergers(payload, headers)
+ LOG.debug("Merging by applying %s", my_mergers)
+ merger = mergers.construct(my_mergers)
if self.cloud_buf is None:
# First time through, merge with an empty dict...
self.cloud_buf = {}
@@ -105,7 +100,6 @@ class CloudConfigPartHandler(handlers.Handler):
def _reset(self):
self.file_names = []
self.cloud_buf = None
- self.mergers = [DEF_MERGERS]
def handle_part(self, _data, ctype, filename, # pylint: disable=W0221
payload, _frequency, headers): # pylint: disable=W0613