Bump hacking to 0.9.x series

Includes minor formatting changes to make the code compatible 
with the new hacking release.

Change-Id: I9e4985efc4f6441bbd3db44075615a6e958d9fe5
This commit is contained in:
Dougal Matthews 2014-11-13 13:33:49 +00:00
parent 72c1ddead2
commit 7c70cc2e5e
3 changed files with 9 additions and 7 deletions

View File

@ -93,9 +93,9 @@ for need_user in need:
elif 'password' in detail:
args = ['rabbitmqctl', 'change_password', username, detail['password']]
subprocess.check_call(args, stdout=sys.stderr)
# no "else", we have a user that exists, and no assertion about passwords. we
# don't want to generate a new password if this is just a user that we're
# setting user tags on.
# no "else", we have a user that exists, and no assertion about passwords.
# we don't want to generate a new password if this is just a user that
# we're setting user tags on.
if 'permissions' in detail:
args = ['rabbitmqctl', 'set_permissions', username]
args.append(detail['permissions']['conf'])
@ -113,13 +113,14 @@ if want - have:
LOG.error('Desired users missing: want=%s have=%s', want, have)
sys.exit(1)
CLEAN_USERS = subprocess.Popen(['os-apply-config', '--key', 'rabbit.clean_users',
CLEAN_USERS = subprocess.Popen(['os-apply-config', '--key',
'rabbit.clean_users',
'--key-default', 'False'],
stdout=subprocess.PIPE).stdout.read()
if 'True' in CLEAN_USERS:
to_delete = have - want
for username in to_delete:
subprocess.check_call(['rabbitmqctl', 'delete_user', username], stdout=sys.stderr)
subprocess.check_call(['rabbitmqctl', 'delete_user', username],
stdout=sys.stderr)
LOG.debug("Deleted user %s" % username)

View File

@ -28,6 +28,7 @@
import ConfigParser
import requests

View File

@ -1,4 +1,4 @@
hacking>=0.8.0,<0.9
hacking>=0.9.2,<0.10
oslotest
oslosphinx