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:
parent
72c1ddead2
commit
7c70cc2e5e
|
@ -93,9 +93,9 @@ for need_user in need:
|
||||||
elif 'password' in detail:
|
elif 'password' in detail:
|
||||||
args = ['rabbitmqctl', 'change_password', username, detail['password']]
|
args = ['rabbitmqctl', 'change_password', username, detail['password']]
|
||||||
subprocess.check_call(args, stdout=sys.stderr)
|
subprocess.check_call(args, stdout=sys.stderr)
|
||||||
# no "else", we have a user that exists, and no assertion about passwords. we
|
# no "else", we have a user that exists, and no assertion about passwords.
|
||||||
# don't want to generate a new password if this is just a user that we're
|
# we don't want to generate a new password if this is just a user that
|
||||||
# setting user tags on.
|
# we're setting user tags on.
|
||||||
if 'permissions' in detail:
|
if 'permissions' in detail:
|
||||||
args = ['rabbitmqctl', 'set_permissions', username]
|
args = ['rabbitmqctl', 'set_permissions', username]
|
||||||
args.append(detail['permissions']['conf'])
|
args.append(detail['permissions']['conf'])
|
||||||
|
@ -113,13 +113,14 @@ if want - have:
|
||||||
LOG.error('Desired users missing: want=%s have=%s', want, have)
|
LOG.error('Desired users missing: want=%s have=%s', want, have)
|
||||||
sys.exit(1)
|
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'],
|
'--key-default', 'False'],
|
||||||
stdout=subprocess.PIPE).stdout.read()
|
stdout=subprocess.PIPE).stdout.read()
|
||||||
|
|
||||||
if 'True' in CLEAN_USERS:
|
if 'True' in CLEAN_USERS:
|
||||||
to_delete = have - want
|
to_delete = have - want
|
||||||
for username in to_delete:
|
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)
|
LOG.debug("Deleted user %s" % username)
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
|
|
||||||
import ConfigParser
|
import ConfigParser
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
hacking>=0.8.0,<0.9
|
hacking>=0.9.2,<0.10
|
||||||
|
|
||||||
oslotest
|
oslotest
|
||||||
oslosphinx
|
oslosphinx
|
||||||
|
|
Loading…
Reference in New Issue