Skip to content

Commit

Permalink
Keystone v3: Accept domain_name as Param of VncApi lib call
Browse files Browse the repository at this point in the history
Closes-Bug:#1528798
Change-Id: I6582990c0fb4657597394772268dc8f0de11693f
  • Loading branch information
Senthilnathan Murugappan committed Jan 15, 2016
1 parent 840a9ea commit 08c1b45
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/api-lib/vnc_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ def __init__(self, username=None, password=None, tenant_name=None,
api_server_url=None, conf_file=None, user_info=None,
auth_token=None, auth_host=None, auth_port=None,
auth_protocol = None, auth_url=None, auth_type=None,
wait_for_connect=False, api_server_use_ssl=False):
wait_for_connect=False, api_server_use_ssl=False,
domain_name=None):
# TODO allow for username/password to be present in creds file

self._obj_serializer = self._obj_serializer_diff
Expand Down Expand Up @@ -189,6 +190,9 @@ def __init__(self, username=None, password=None, tenant_name=None,
self._tenant_name = tenant_name or \
_read_cfg(cfg_parser, 'auth', 'AUTHN_TENANT',
self._DEFAULT_AUTHN_TENANT)
self._domain_name = domain_name or \
_read_cfg(cfg_parser, 'auth', 'AUTHN_DOMAIN',
self._DEFAULT_DOMAIN_ID)

#contrail-api SSL support
try:
Expand Down Expand Up @@ -239,14 +243,14 @@ def __init__(self, username=None, password=None, tenant_name=None,
' "password":{' + \
' "user":{' + \
' "name": "%s",' % (self._username) + \
' "domain": { "id": "%s" },' % (self._DEFAULT_DOMAIN_ID) + \
' "domain": { "id": "%s" },' % (self._domain_name) + \
' "password": "%s"' % (self._password) + \
'}' + \
'}' + \
'},' + \
' "scope":{' + \
' "project":{' + \
' "domain": { "id": "%s" },' % (self._DEFAULT_DOMAIN_ID) + \
' "domain": { "id": "%s" },' % (self._domain_name) + \
' "name": "%s"' % (self._username) + \
'}' + \
'}' + \
Expand Down

0 comments on commit 08c1b45

Please sign in to comment.