From eeea77d797bff7aec26a842e29d9a65eee7cd32c Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 15 Nov 2017 08:43:06 -0600 Subject: [PATCH] Document current_user_id in a release note Also fix the connect_as docstring. Change-Id: I53203b892bcf03d540d6e551ec9615439ad5c4c9 --- releasenotes/notes/add-current-user-id-49b6463e6bcc3b31.yaml | 4 ++++ shade/openstackcloud.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/add-current-user-id-49b6463e6bcc3b31.yaml diff --git a/releasenotes/notes/add-current-user-id-49b6463e6bcc3b31.yaml b/releasenotes/notes/add-current-user-id-49b6463e6bcc3b31.yaml new file mode 100644 index 000000000..fd9a1bece --- /dev/null +++ b/releasenotes/notes/add-current-user-id-49b6463e6bcc3b31.yaml @@ -0,0 +1,4 @@ +--- +features: + - Added a new property, 'current_user_id' which contains + the id of the currently authenticated user from the token. diff --git a/shade/openstackcloud.py b/shade/openstackcloud.py index 9cb88feb0..ec2d01792 100644 --- a/shade/openstackcloud.py +++ b/shade/openstackcloud.py @@ -396,7 +396,7 @@ class OpenStackCloud( cloud = shade.openstack_cloud(cloud='example') # Work normally servers = cloud.list_servers() - cloud2 = cloud.connect_as(dict(name='different-project')) + cloud2 = cloud.connect_as_project('different-project') # Work in different-project servers = cloud2.list_servers()