diff options
Diffstat (limited to 'moonclient/moonclient/shell.py')
-rw-r--r-- | moonclient/moonclient/shell.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/moonclient/moonclient/shell.py b/moonclient/moonclient/shell.py index 79f9a244..fa675dd9 100644 --- a/moonclient/moonclient/shell.py +++ b/moonclient/moonclient/shell.py @@ -188,7 +188,7 @@ class MoonClient(App): finally: self.log.debug(str(content)) - def auth_keystone(self, username=None, password=None, host=None, port=None): + def auth_keystone(self, username=None, password=None, host=None, port=None, tenant=None): """Send a new authentication request to Keystone :param username: user identification name @@ -198,6 +198,8 @@ class MoonClient(App): self.post["auth"]["identity"]["password"]["user"]["name"] = username if password: self.post["auth"]["identity"]["password"]["user"]["password"] = password + if tenant: + self.post["auth"]["scope"]["project"]["name"] = tenant if host: self.host = host if port: |