From eb9d3a5a4695a2be327b30074b78dcaff89d3584 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 --- openstack/cloud/openstackcloud.py | 2 +- releasenotes/notes/add-current-user-id-49b6463e6bcc3b31.yaml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/add-current-user-id-49b6463e6bcc3b31.yaml diff --git a/openstack/cloud/openstackcloud.py b/openstack/cloud/openstackcloud.py index dce6bda73..006841997 100644 --- a/openstack/cloud/openstackcloud.py +++ b/openstack/cloud/openstackcloud.py @@ -398,7 +398,7 @@ class OpenStackCloud(_normalize.Normalizer): 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() 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.