Skip to content

Commit

Permalink
Changes to bring analytics authenticated access in sync with config
Browse files Browse the repository at this point in the history
1. Rename cloud-admin-only to cloud-admin for analytics AAA mode
2. Add parameter cloud_admin_role to allow users to set the cloud-admon
   role name in testbed.py

Change-Id: I9806958797894b3702c178b6b5a5e8cc68dbd7a8
Closes-Bug: #1607563
  • Loading branch information
Megh Bhatt committed Aug 1, 2016
1 parent 63b3d86 commit c9c33da
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions fabfile/utils/commandline.py
Expand Up @@ -212,6 +212,9 @@ def frame_vnc_config_cmd(host_string, cmd="setup-vnc-config"):
if cassandra_user is not None:
cmd += ' --cassandra_user %s' % (cassandra_user)
cmd += ' --cassandra_password %s' % (cassandra_password)
cloud_admin_role = get_cloud_admin_role()
if cloud_admin_role:
cmd += " --cloud_admin_role %s" % cloud_admin_role
return cmd

def frame_vnc_vcenter_plugin_cmd(host_string, cmd="setup-vcenter-plugin"):
Expand Down Expand Up @@ -584,5 +587,8 @@ def frame_vnc_collector_cmd(host_string, cmd='setup-vnc-collector'):
if orchestrator != 'openstack':
analytics_aaa_mode = 'no-auth'
cmd += " --aaa_mode %s" % analytics_aaa_mode
cloud_admin_role = get_cloud_admin_role()
if cloud_admin_role:
cmd += " --cloud_admin_role %s" % cloud_admin_role
return cmd

5 changes: 4 additions & 1 deletion fabfile/utils/multitenancy.py
Expand Up @@ -7,9 +7,12 @@ def get_mt_enable():
#end _get_mt_ena

def get_analytics_aaa_mode():
return getattr(testbed, 'analytics_aaa_mode', 'cloud-admin-only')
return getattr(testbed, 'analytics_aaa_mode', 'cloud-admin')
# end get_analytics_mt_enable

def get_cloud_admin_role():
return getattr(testbed, 'cloud_admin_role', '')

def get_mt_opts():
mt_opts = ''
if get_mt_enable():
Expand Down

0 comments on commit c9c33da

Please sign in to comment.