summaryrefslogtreecommitdiff
path: root/cloudinit/mergers
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2013-05-03 14:46:52 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2013-05-03 14:46:52 -0700
commitc972396ecccb4b67eafc038a482ffeaa1df2c93e (patch)
treec21c284291916a74c7187b3b8b112085947e5f9e /cloudinit/mergers
parent4a669649b17cf01b6f89f7902b6683d02ef0bee1 (diff)
downloadvyos-cloud-init-c972396ecccb4b67eafc038a482ffeaa1df2c93e.tar.gz
vyos-cloud-init-c972396ecccb4b67eafc038a482ffeaa1df2c93e.zip
A few more tests + cleanings.
Diffstat (limited to 'cloudinit/mergers')
-rw-r--r--cloudinit/mergers/m_list.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/cloudinit/mergers/m_list.py b/cloudinit/mergers/m_list.py
index 50f279e8..34b32379 100644
--- a/cloudinit/mergers/m_list.py
+++ b/cloudinit/mergers/m_list.py
@@ -16,13 +16,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+DEF_MERGE_TYPE = 'replace'
+MERGE_TYPES = ('append', 'prepend', DEF_MERGE_TYPE,)
+
class Merger(object):
def __init__(self, merger, opts):
self._merger = merger
# Affects merging behavior...
- self._method = 'replace'
- for m in ['append', 'prepend', 'replace']:
+ self._method = DEF_MERGE_TYPE
+ for m in MERGE_TYPES:
if m in opts:
self._method = m
break