diff --git a/compass/deployment/installers/installer.py b/compass/deployment/installers/installer.py index d1347a0b..838e2193 100644 --- a/compass/deployment/installers/installer.py +++ b/compass/deployment/installers/installer.py @@ -101,7 +101,7 @@ class BaseInstaller(object): raise KeyError("'%s' is an invalid metadata!" % key) def _get_tmpl_vars_helper(self, metadata, config, output): - for key, config_value in config.iteritems(): + for key, config_value in sorted(config.iteritems()): is_regular_key, sub_meta = self._get_submeta_by_key(metadata, key) mapping_to = self._get_key_mapping(sub_meta, key, is_regular_key) diff --git a/compass/tests/deployment/installers/os_installers/cobbler/test_cobbler.py b/compass/tests/deployment/installers/os_installers/cobbler/test_cobbler.py index 807c5b2b..c798c1cf 100644 --- a/compass/tests/deployment/installers/os_installers/cobbler/test_cobbler.py +++ b/compass/tests/deployment/installers/os_installers/cobbler/test_cobbler.py @@ -65,10 +65,6 @@ class TestCobblerInstaller(unittest2.TestCase): } }, "partition": { - "/var": { - "vol_size": 30, - "vol_percentage": 30 - }, "/home": { "vol_size": 50, "vol_percentage": 40 @@ -76,6 +72,10 @@ class TestCobblerInstaller(unittest2.TestCase): "/test": { "vol_size": 10, "vol_percentage": 10 + }, + "/var": { + "vol_size": 30, + "vol_percentage": 30 } }, "server_credentials": { @@ -148,7 +148,7 @@ class TestCobblerInstaller(unittest2.TestCase): "ksmeta": { "promisc_nics": "", "timezone": "UTC", - "partition": "/test 10%;/var 30%;/home 40%", + "partition": "/home 40%;/test 10%;/var 30%", "https_proxy": "", "ntp_server": "127.0.0.1", "chef_url": "https://127.0.0.1", diff --git a/compass/tests/deployment/test_data/templates/cobbler/Ubuntu-12.04-x86_64/system.tmpl b/compass/tests/deployment/test_data/templates/cobbler/Ubuntu-12.04-x86_64/system.tmpl index 694874b5..e874d70e 100644 --- a/compass/tests/deployment/test_data/templates/cobbler/Ubuntu-12.04-x86_64/system.tmpl +++ b/compass/tests/deployment/test_data/templates/cobbler/Ubuntu-12.04-x86_64/system.tmpl @@ -38,7 +38,7 @@ , "ksmeta":{ #set partition_config = '' - #for k, v in $host.partition.iteritems(): + #for k, v in sorted($host.partition.iteritems()): #set path = '' #if v['vol_percentage']: #set $path = k + ' ' + str(v['vol_percentage']) + '%'