Skip to content

Commit

Permalink
Closes-Bug: #1549833, contrail-status removes xmpp down message incor…
Browse files Browse the repository at this point in the history
…rectly after adding xmpp auth knobs

Closes-Bug: #1549663, SMLite - lbass and ceilometer parameters are not updated in the cluster json from testbed.py

testbed.py specify as follows
env.enable_lbaas = True
env.xmpp_auth_enable = True
env.xmpp_dns_auth_enable = True
enable_ceilometer = True

cluster.json specify as follows USE lower case true or false, conf parser at agent/controller is not liking the True/False.
root@a3s14:~# more cluster.json
{
    "cluster": [
        {
            "id": "cluster_auto_652",
            "parameters": {
                "enable_ceilometer": "true",
                "xmpp_auth_enable": "true",
                "xmpp_dns_auth_enable": "true"
            }
        }
    ]
}

Change-Id: I5ea6b14ab77f1877c546d41223ae72f94c925399
  • Loading branch information
miriyalar committed Feb 25, 2016
1 parent e6a54b4 commit 76cede3
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/client/testbed_parser.py
Expand Up @@ -605,6 +605,7 @@ def set_if_defined(self, source_variable_name,
source_variable = kwargs.get('source_variable', self.testsetup)
function = kwargs.get('function', getattr)
to_string = kwargs.get('to_string', True)
to_lower = kwargs.get('to_lower', False)
log.debug('Adding Variable (%s)' % destination_variable_name)
log.debug('Source Variable: (%s) Destination Variable: (%s) ' \
'Source Variable Name (%s) Destination Variable Name (%s) ' \
Expand All @@ -615,7 +616,11 @@ def set_if_defined(self, source_variable_name,
log.debug('Retrieved Value (%s)' % value)
if value is not None:
if to_string:
value = str(value)
if to_lower:
value = str(value).lower()
else:
value = str(value)

destination_variable[destination_variable_name] = value

def generate(self):
Expand Down Expand Up @@ -777,6 +782,14 @@ def _initialize(self):
self.set_if_defined('ext_routers', cluster_dict['parameters'],
destination_variable_name='external_bgp')

# xmpp params
self.set_if_defined('xmpp_auth_enable', cluster_dict['parameters'], to_lower=True)
self.set_if_defined('xmpp_dns_auth_enable', cluster_dict['parameters'], to_lower=True)
# lbass params
self.set_if_defined('enable_lbaas', cluster_dict['parameters'], to_lower=True)
# ceilometer params
self.set_if_defined('enable_ceilometer', cluster_dict['parameters'], to_lower=True)

# Update storage keys
self.set_if_defined('storage_mon_secret', cluster_dict['parameters'],
source_variable=self.storage_keys,
Expand Down

0 comments on commit 76cede3

Please sign in to comment.