Fix rabbitmq hash lookups

rabbitmq hash lookups should use 'rabbitmq' key
instead of 'rabbitmq_hash' to do proper deep hash
merges.

Since this patch would create a CI failure if it
landed before its corresponding fuel-library fix,
a fallback to rabbit_hash still exists.

Change-Id: I6bf14fb4e869b8f2d34c92f5b6f2ad1d9afe26b2
Partial-Bug: #1542307
This commit is contained in:
Matthew Mosesohn 2016-02-16 13:35:58 +03:00
parent 5baaccb268
commit 356a99cd9e
1 changed files with 16 additions and 1 deletions

View File

@ -54,10 +54,18 @@ class RabbitSanityClass(BaseTestCase):
return self._password
if self._password is None:
self._password = self.get_hiera_values(
hiera_hash='rabbit',
hash_key='password'
)
# FIXME(mattmymo): Remove this after merging
# https://review.openstack.org/#/c/276797/
if not self._password:
self._password = self.get_hiera_values(
hiera_hash='rabbit_hash',
hash_key='password'
)
return self._password
@property
@ -92,6 +100,13 @@ class RabbitSanityClass(BaseTestCase):
return self._userid
if self._userid is None:
self._userid = self.get_hiera_values(
hiera_hash='rabbit',
hash_key='user'
)
# FIXME(mattmymo): Remove this after merging
# https://review.openstack.org/#/c/276797/
if not self._userid:
self._userid = self.get_hiera_values(
hiera_hash='rabbit_hash',
hash_key='user'
@ -153,7 +168,7 @@ class RabbitSanityClass(BaseTestCase):
' list_channels is {0}'.format(output))
return output
def get_hiera_values(self, hiera_hash="rabbit_hash",
def get_hiera_values(self, hiera_hash="rabbit",
hash_key=None,
conf_path="/etc/hiera.yaml",
json_parse=False):