Skip to content

Commit

Permalink
vcenter-as-compute: adding keystone_version to setup-vcenter-plugin
Browse files Browse the repository at this point in the history
Change-Id: Ia380e248ae70cad7d6e16566275caa7f232e2efc
Closes-Bug: #1600020
  • Loading branch information
Amudha committed Jul 8, 2016
1 parent 9b56e18 commit 4a3609b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contrail_provisioning/vcenter_plugin/setup.py
Expand Up @@ -22,6 +22,7 @@ def __init__(self, args_str = None):
'api_port': 8082,
'zookeeper_serverlist': '127.0.0.1:2181',
'introspect_port': 8234,
'keystone_version': 'v2.0',
}

self.parse_args(args_str)
Expand All @@ -45,6 +46,7 @@ def parse_args(self, args_str):
parser.add_argument("--zookeeper_serverlist", help = "List of zookeeper ip:port")
parser.add_argument("--vcenter_mode", help = "vcenter as compute mode value")
parser.add_argument("--keystone_ip", help = "IP Address of keystone node")
parser.add_argument("--keystone_version", choices=['v2.0', 'v3'], help = "Keystone Version")
parser.add_argument("--keystone_admin_user", help = "Keystone admin tenant user.")
parser.add_argument("--keystone_admin_passwd", help = "Keystone admin user's password.")
parser.add_argument("--keystone_admin_tenant_name", help = "Keystone admin tenant name.")
Expand All @@ -59,6 +61,7 @@ def fixup_config_files(self):
def fixup_contrail_vcenter_plugin(self):
vcenter_full_url = "https://"+self._args.vcenter_url+"/sdk"
keystone_ip = ""
keystone_version = ""
ks_auth_protocol = ""
ks_auth_port = ""
ks_admin_user = ""
Expand All @@ -68,12 +71,13 @@ def fixup_contrail_vcenter_plugin(self):

if self._args.vcenter_mode == "vcenter-as-compute":
keystone_ip = self._args.keystone_ip
keystone_version = self._args.keystone_version
ks_auth_protocol = self._args.keystone_auth_protocol
ks_auth_port = self._args.keystone_auth_port
ks_admin_user = self._args.keystone_admin_user
ks_admin_passwd = self._args.keystone_admin_passwd
ks_admin_tenant_name = self._args.keystone_admin_tenant_name
ks_auth_url = ks_auth_protocol+"://"+keystone_ip+":"+ks_auth_port+"/v2.0"
ks_auth_url = ks_auth_protocol+"://"+keystone_ip+":"+ks_auth_port+"/"+keystone_version

template_vals = {'__contrail_vcenter_url__' : vcenter_full_url,
'__contrail_vcenter_username__' : self._args.vcenter_username,
Expand Down

0 comments on commit 4a3609b

Please sign in to comment.