summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Page <james.page@ubuntu.com>2014-12-17 21:57:18 +0000
committergit-ubuntu importer <ubuntu-devel-discuss@lists.ubuntu.com>2014-12-17 21:58:10 +0000
commit7c68512821a8f2ad272fb15bfff4637e1f6db3fd (patch)
treea53a8bba99c5e689321ae8ccee45dba0650e53ae
parent5be6b0255206fe55972d74d39e9731c847c782eb (diff)
1.0.1-0ubuntu1 (patches unapplied)import/1.0.1-0ubuntu1ubuntu/vivid
Imported using git-ubuntu import.
Notes
Notes: * New upstream release (LP: #1393873).
-rw-r--r--ChangeLog8
-rw-r--r--PKG-INFO2
-rw-r--r--debian/changelog6
-rw-r--r--doc/source/index.rst2
-rw-r--r--doc/source/releases.rst8
-rw-r--r--functional/tests/test_identity.py46
-rw-r--r--openstackclient/identity/v2_0/ec2creds.py22
-rw-r--r--python_openstackclient.egg-info/PKG-INFO2
-rw-r--r--setup.cfg2
9 files changed, 89 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 99700fb..312288a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,14 @@
CHANGES
=======
+1.0.1
+-----
+
+* Release 1.0.1
+* Followup for ec2 credentials command fix
+* Fix ec2 credentials commands for new auth
+* Workflow documentation is now in infra-manual
+
1.0.0
-----
diff --git a/PKG-INFO b/PKG-INFO
index 9d6101c..521eb4c 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: python-openstackclient
-Version: 1.0.0
+Version: 1.0.1
Summary: OpenStack Command-line Client
Home-page: http://wiki.openstack.org/OpenStackClient
Author: OpenStack
diff --git a/debian/changelog b/debian/changelog
index c6e1b2a..2ce110b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+python-openstackclient (1.0.1-0ubuntu1) vivid; urgency=medium
+
+ * New upstream release (LP: #1393873).
+
+ -- James Page <james.page@ubuntu.com> Wed, 17 Dec 2014 21:57:18 +0000
+
python-openstackclient (1.0.0-0ubuntu2) vivid; urgency=medium
* d/control: Add missing BD' on cliff-tablib >= 1.0 and
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 9d4989f..41c2487 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -38,7 +38,7 @@ the openstack/python-openstackclient project using `Gerrit`_.
.. _on OpenStack's Git server: https://git.openstack.org/cgit/openstack/python-openstackclient/tree
.. _Launchpad: https://launchpad.net/python-openstackclient
-.. _Gerrit: http://wiki.openstack.org/GerritWorkflow
+.. _Gerrit: http://docs.openstack.org/infra/manual/developers.html#development-workflow
Indices and Tables
==================
diff --git a/doc/source/releases.rst b/doc/source/releases.rst
index ad9c59e..0f0f33f 100644
--- a/doc/source/releases.rst
+++ b/doc/source/releases.rst
@@ -2,6 +2,14 @@
Release Notes
=============
+1.0.1 (08 Dec 2014)
+===================
+
+* Bug 1399757_: EC2 credentials create fails
+
+.. _1399757: https://bugs.launchpad.net/bugs/1399757
+
+
1.0.0 (04 Dec 2014)
===================
diff --git a/functional/tests/test_identity.py b/functional/tests/test_identity.py
index c5779a2..b328115 100644
--- a/functional/tests/test_identity.py
+++ b/functional/tests/test_identity.py
@@ -24,6 +24,19 @@ class IdentityV2Tests(test.TestCase):
USER_FIELDS = ['email', 'enabled', 'id', 'name', 'project_id', 'username']
PROJECT_FIELDS = ['enabled', 'id', 'name', 'description']
+ EC2_CREDENTIALS_FIELDS = [
+ 'access',
+ 'project_id',
+ 'secret',
+ 'trust_id',
+ 'user_id',
+ ]
+ EC2_CREDENTIALS_LIST_HEADERS = [
+ 'Access',
+ 'Secret',
+ 'Project ID',
+ 'User ID',
+ ]
def test_user_list(self):
raw_output = self.openstack('user list')
@@ -70,6 +83,39 @@ class IdentityV2Tests(test.TestCase):
raw_output = self.openstack('project delete dummy-project')
self.assertEqual(0, len(raw_output))
+ def test_ec2_credentials_create(self):
+ create_output = self.openstack('ec2 credentials create')
+ create_items = self.parse_show(create_output)
+ self.openstack(
+ 'ec2 credentials delete %s' % create_items[0]['access'],
+ )
+ self.assert_show_fields(create_items, self.EC2_CREDENTIALS_FIELDS)
+
+ def test_ec2_credentials_delete(self):
+ create_output = self.openstack('ec2 credentials create')
+ create_items = self.parse_show(create_output)
+ raw_output = self.openstack(
+ 'ec2 credentials delete %s' % create_items[0]['access'],
+ )
+ self.assertEqual(0, len(raw_output))
+
+ def test_ec2_credentials_list(self):
+ raw_output = self.openstack('ec2 credentials list')
+ items = self.parse_listing(raw_output)
+ self.assert_table_structure(items, self.EC2_CREDENTIALS_LIST_HEADERS)
+
+ def test_ec2_credentials_show(self):
+ create_output = self.openstack('ec2 credentials create')
+ create_items = self.parse_show(create_output)
+ show_output = self.openstack(
+ 'ec2 credentials show %s' % create_items[0]['access'],
+ )
+ items = self.parse_show(show_output)
+ self.openstack(
+ 'ec2 credentials delete %s' % create_items[0]['access'],
+ )
+ self.assert_show_fields(items, self.EC2_CREDENTIALS_FIELDS)
+
class IdentityV3Tests(test.TestCase):
"""Functional tests for Identity V3 commands. """
diff --git a/openstackclient/identity/v2_0/ec2creds.py b/openstackclient/identity/v2_0/ec2creds.py
index fd8eef8..a20ffd4 100644
--- a/openstackclient/identity/v2_0/ec2creds.py
+++ b/openstackclient/identity/v2_0/ec2creds.py
@@ -57,7 +57,7 @@ class CreateEC2Creds(show.ShowOne):
).id
else:
# Get the project from the current auth
- project = identity_client.auth_tenant_id
+ project = self.app.client_manager.auth_ref.project_id
if parsed_args.user:
user = utils.find_resource(
identity_client.users,
@@ -65,12 +65,18 @@ class CreateEC2Creds(show.ShowOne):
).id
else:
# Get the user from the current auth
- user = identity_client.auth_user_id
+ user = self.app.client_manager.auth_ref.user_id
creds = identity_client.ec2.create(user, project)
info = {}
info.update(creds._info)
+
+ if 'tenant_id' in info:
+ info.update(
+ {'project_id': info.pop('tenant_id')}
+ )
+
return zip(*sorted(six.iteritems(info)))
@@ -104,7 +110,7 @@ class DeleteEC2Creds(command.Command):
).id
else:
# Get the user from the current auth
- user = identity_client.auth_user_id
+ user = self.app.client_manager.auth_ref.user_id
identity_client.ec2.delete(user, parsed_args.access_key)
@@ -134,7 +140,7 @@ class ListEC2Creds(lister.Lister):
).id
else:
# Get the user from the current auth
- user = identity_client.auth_user_id
+ user = self.app.client_manager.auth_ref.user_id
columns = ('access', 'secret', 'tenant_id', 'user_id')
column_headers = ('Access', 'Secret', 'Project ID', 'User ID')
@@ -177,10 +183,16 @@ class ShowEC2Creds(show.ShowOne):
).id
else:
# Get the user from the current auth
- user = identity_client.auth_user_id
+ user = self.app.client_manager.auth_ref.user_id
creds = identity_client.ec2.get(user, parsed_args.access_key)
info = {}
info.update(creds._info)
+
+ if 'tenant_id' in info:
+ info.update(
+ {'project_id': info.pop('tenant_id')}
+ )
+
return zip(*sorted(six.iteritems(info)))
diff --git a/python_openstackclient.egg-info/PKG-INFO b/python_openstackclient.egg-info/PKG-INFO
index 9d6101c..521eb4c 100644
--- a/python_openstackclient.egg-info/PKG-INFO
+++ b/python_openstackclient.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: python-openstackclient
-Version: 1.0.0
+Version: 1.0.1
Summary: OpenStack Command-line Client
Home-page: http://wiki.openstack.org/OpenStackClient
Author: OpenStack
diff --git a/setup.cfg b/setup.cfg
index 84d949e..c16a70b 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -308,7 +308,7 @@ directory = python-openstackclient/locale
domain = python-openstackclient
[egg_info]
-tag_build =
tag_svn_revision = 0
tag_date = 0
+tag_build =