diff options
-rw-r--r-- | README.rst | 20 | ||||
-rw-r--r-- | barbicanclient/tests/v1/test_cas.py | 8 | ||||
-rw-r--r-- | barbicanclient/tests/v1/test_secrets.py | 28 | ||||
-rw-r--r-- | barbicanclient/v1/orders.py | 4 | ||||
-rw-r--r-- | barbicanclient/v1/secrets.py | 10 | ||||
-rw-r--r-- | doc/source/cli/cli_usage.rst | 82 | ||||
-rw-r--r-- | doc/source/cli/usage.rst | 4 | ||||
-rwxr-xr-x | doc/source/conf.py | 6 | ||||
-rw-r--r-- | functionaltests/base.py | 2 | ||||
-rw-r--r-- | functionaltests/client/v1/functional/test_secrets.py | 2 |
10 files changed, 83 insertions, 83 deletions
@@ -38,12 +38,12 @@ with keystone authentication: >>> from barbicanclient import client >>> # We'll use Keystone API v3 for authentication - >>> auth = identity.v3.Password(auth_url=u'http://localhost:5000/v3', - ... username=u'admin_user', - ... user_domain_name=u'Default', - ... password=u'password', - ... project_name=u'demo', - ... project_domain_name=u'Default') + >>> auth = identity.v3.Password(auth_url='http://localhost:5000/v3', + ... username='admin_user', + ... user_domain_name='Default', + ... password='password', + ... project_name='demo', + ... project_domain_name='Default') >>> # Next we'll create a Keystone session using the auth plugin we just created >>> sess = session.Session(auth=auth) @@ -52,13 +52,13 @@ with keystone authentication: >>> barbican = client.Client(session=sess) >>> # Let's create a Secret to store some sensitive data - >>> secret = barbican.secrets.create(name=u'Self destruction sequence', - ... payload=u'the magic words are squeamish ossifrage') + >>> secret = barbican.secrets.create(name='Self destruction sequence', + ... payload='the magic words are squeamish ossifrage') >>> # Now let's store the secret by using its store() method. This will send the secret data >>> # to Barbican, where it will be encrypted and stored securely in the cloud. >>> secret.store() - u'http://localhost:9311/v1/secrets/85b220fd-f414-483f-94e4-2f422480f655' + 'http://localhost:9311/v1/secrets/85b220fd-f414-483f-94e4-2f422480f655' >>> # The URI returned by store() uniquely identifies your secret in the Barbican service. >>> # After a secret is stored, the URI is also available by accessing @@ -67,7 +67,7 @@ with keystone authentication: http://localhost:9311/v1/secrets/091adb32-4050-4980-8558-90833c531413 >>> # When we need to retrieve our secret at a later time, we can use the secret_ref - >>> retrieved_secret = barbican.secrets.get(u'http://localhost:9311/v1/secrets/091adb32-4050-4980-8558-90833c531413') + >>> retrieved_secret = barbican.secrets.get('http://localhost:9311/v1/secrets/091adb32-4050-4980-8558-90833c531413') >>> # We can access the secret payload by using the payload attribute. >>> # Barbican decrypts the secret and sends it back. >>> print(retrieved_secret.payload) diff --git a/barbicanclient/tests/v1/test_cas.py b/barbicanclient/tests/v1/test_cas.py index 118cfdb..a352661 100644 --- a/barbicanclient/tests/v1/test_cas.py +++ b/barbicanclient/tests/v1/test_cas.py @@ -19,10 +19,10 @@ from barbicanclient.v1 import cas class CAData(object): - def __init__(self, description=u'Test CA description'): - self.name = u'Test CA' + def __init__(self, description='Test CA description'): + self.name = 'Test CA' self.description = description - self.plugin_name = u'Test CA Plugin' + self.plugin_name = 'Test CA Plugin' self.plugin_ca_id = 'plugin_uuid' now = timeutils.utcnow() @@ -35,7 +35,7 @@ class CAData(object): self.meta.append({'description': self.description}) self.ca_dict = {'meta': self.meta, - 'status': u'ACTIVE', + 'status': 'ACTIVE', 'plugin_name': self.plugin_name, 'plugin_ca_id': self.plugin_ca_id, 'created': self.created} diff --git a/barbicanclient/tests/v1/test_secrets.py b/barbicanclient/tests/v1/test_secrets.py index ef3f61b..bf5624e 100644 --- a/barbicanclient/tests/v1/test_secrets.py +++ b/barbicanclient/tests/v1/test_secrets.py @@ -27,14 +27,14 @@ from barbicanclient.v1 import secrets class SecretData(object): def __init__(self): - self.name = u'Self destruction sequence' - self.payload = u'the magic words are squeamish ossifrage' - self.payload_content_type = u'text/plain' - self.algorithm = u'AES' + self.name = 'Self destruction sequence' + self.payload = 'the magic words are squeamish ossifrage' + self.payload_content_type = 'text/plain' + self.algorithm = 'AES' self.created = str(timeutils.utcnow()) self.secret_dict = {'name': self.name, - 'status': u'ACTIVE', + 'status': 'ACTIVE', 'algorithm': self.algorithm, 'created': self.created} @@ -110,9 +110,9 @@ class WhenTestingSecrets(test_client.BaseEntityResource): secret_req = jsonutils.loads(self.responses.last_request.text) self.assertEqual(self.secret.name, secret_req['name']) - self.assertEqual(u'application/octet-stream', + self.assertEqual('application/octet-stream', secret_req['payload_content_type']) - self.assertEqual(u'base64', + self.assertEqual('base64', secret_req['payload_content_encoding']) self.assertNotEqual(binary_payload, secret_req['payload']) @@ -121,7 +121,7 @@ class WhenTestingSecrets(test_client.BaseEntityResource): data = {'secret_ref': self.entity_href} self.responses.post(self.entity_base + '/', json=data) - text_payload = u'time for an ice cold \U0001f37a' + text_payload = 'time for an ice cold \U0001f37a' secret = self.manager.create() secret.payload = text_payload @@ -129,7 +129,7 @@ class WhenTestingSecrets(test_client.BaseEntityResource): secret_req = jsonutils.loads(self.responses.last_request.text) self.assertEqual(text_payload, secret_req['payload']) - self.assertEqual(u'text/plain', secret_req['payload_content_type']) + self.assertEqual('text/plain', secret_req['payload_content_type']) def test_should_store_with_deprecated_content_type(self): """DEPRECATION WARNING @@ -141,7 +141,7 @@ class WhenTestingSecrets(test_client.BaseEntityResource): self.responses.post(self.entity_base + '/', json=data) payload = 'I should be octet-stream' - payload_content_type = u'text/plain' + payload_content_type = 'text/plain' secret = self.manager.create() secret.payload = payload @@ -165,8 +165,8 @@ class WhenTestingSecrets(test_client.BaseEntityResource): encoded_payload = base64.b64encode( b'F\x130\x89f\x8e\xd9\xa1\x0e\x1f\r\xf67uu\x8b' ).decode('UTF-8') - payload_content_type = u'application/octet-stream' - payload_content_encoding = u'base64' + payload_content_type = 'application/octet-stream' + payload_content_encoding = 'base64' secret = self.manager.create() secret.payload = encoded_payload @@ -444,7 +444,7 @@ class WhenTestingSecrets(test_client.BaseEntityResource): self.test_should_delete_from_object(self.entity_id) def test_should_update_from_manager(self, secret_ref=None): - text_payload = u'time for an ice cold \U0001f37a' + text_payload = 'time for an ice cold \U0001f37a' secret_ref = secret_ref or self.entity_href self.responses.put(self.entity_href, status_code=204) @@ -473,7 +473,7 @@ class WhenTestingSecrets(test_client.BaseEntityResource): # Verify the secret has the correct ref for testing updates self.assertEqual(secref_ref, secret.secret_ref) - text_payload = u'time for an ice cold \U0001f37a' + text_payload = 'time for an ice cold \U0001f37a' self.responses.put(self.entity_href, status_code=204) diff --git a/barbicanclient/v1/orders.py b/barbicanclient/v1/orders.py index 6b352c9..b9c11be 100644 --- a/barbicanclient/v1/orders.py +++ b/barbicanclient/v1/orders.py @@ -249,8 +249,8 @@ class Order(object, metaclass=abc.ABCMeta): class KeyOrder(Order, KeyOrderFormatter): """KeyOrders can be used to request random key material from Barbican""" _type = 'key' - _validMeta = (u'name', u'algorithm', u'mode', u'bit_length', u'expiration', - u'payload_content_type') + _validMeta = ('name', 'algorithm', 'mode', 'bit_length', 'expiration', + 'payload_content_type') def __init__(self, api, name=None, algorithm=None, bit_length=None, mode=None, expiration=None, payload_content_type=None, diff --git a/barbicanclient/v1/secrets.py b/barbicanclient/v1/secrets.py index 4a57860..8cd883e 100644 --- a/barbicanclient/v1/secrets.py +++ b/barbicanclient/v1/secrets.py @@ -170,7 +170,7 @@ class Secret(SecretFormatter): if self._content_types: return self._content_types elif self._payload_content_type: - return {u'default': self.payload_content_type} + return {'default': self.payload_content_type} return None @property @@ -268,7 +268,7 @@ class Secret(SecretFormatter): uuid_ref = base.calculate_uuid_ref(self._secret_ref, self._entity) payload_url = uuid_ref + '/payload' payload = self._api._get_raw(payload_url, headers=headers) - if self.payload_content_type == u'text/plain': + if self.payload_content_type == 'text/plain': self._payload = payload.decode('UTF-8') else: self._payload = payload @@ -322,14 +322,14 @@ class Secret(SecretFormatter): secret_dict['payload'] = ( base64.b64encode(self.payload) ).decode('UTF-8') - secret_dict['payload_content_type'] = u'application/octet-stream' - secret_dict['payload_content_encoding'] = u'base64' + secret_dict['payload_content_type'] = 'application/octet-stream' + secret_dict['payload_content_encoding'] = 'base64' elif type(self.payload) is str: ''' str is stored as text/plain ''' secret_dict['payload'] = self.payload - secret_dict['payload_content_type'] = u'text/plain' + secret_dict['payload_content_type'] = 'text/plain' secret_dict = base.filter_null_keys(secret_dict) LOG.debug("Request body: {0}".format(base.censored_copy(secret_dict, diff --git a/doc/source/cli/cli_usage.rst b/doc/source/cli/cli_usage.rst index e3b7353..ae8ca32 100644 --- a/doc/source/cli/cli_usage.rst +++ b/doc/source/cli/cli_usage.rst @@ -136,7 +136,7 @@ Secret Get | Name | mysecretname | | Created | 2015-04-16 20:36:40.334696+00:00 | | Status | ACTIVE | - | Content types | {u'default': u'application/octet-stream'} | + | Content types | {'default': 'application/octet-stream'} | | Algorithm | aes | | Bit length | 256 | | Mode | cbc | @@ -182,11 +182,11 @@ Secret List $ barbican secret list - +-----------------------------------------------------------------------+------+----------------------------------+--------+-------------------------------------------+-----------+------------+------+------------+ - | Secret href | Name | Created | Status | Content types | Algorithm | Bit length | Mode | Expiration | - +-----------------------------------------------------------------------+------+----------------------------------+--------+-------------------------------------------+-----------+------------+------+------------+ - | http://localhost:9311/v1/secrets/bb3d8c20-8ea5-4bfc-9645-c8da79c8b371 | None | 2015-04-15 20:37:37.501475+00:00 | ACTIVE | {u'default': u'application/octet-stream'} | aes | 256 | cbc | None | - +-----------------------------------------------------------------------+------+----------------------------------+--------+-------------------------------------------+-----------+------------+------+------------+ + +-----------------------------------------------------------------------+------+----------------------------------+--------+-----------------------------------------+-----------+------------+------+------------+ + | Secret href | Name | Created | Status | Content types | Algorithm | Bit length | Mode | Expiration | + +-----------------------------------------------------------------------+------+----------------------------------+--------+-----------------------------------------+-----------+------------+------+------------+ + | http://localhost:9311/v1/secrets/bb3d8c20-8ea5-4bfc-9645-c8da79c8b371 | None | 2015-04-15 20:37:37.501475+00:00 | ACTIVE | {'default': 'application/octet-stream'} | aes | 256 | cbc | None | + +-----------------------------------------------------------------------+------+----------------------------------+--------+-----------------------------------------+-----------+------------+------+------------+ ACLS @@ -296,19 +296,19 @@ To get complete ACL setting for a secret or container, use this ACL action. $ barbican acl get http://localhost:9311/v1/secrets/7776adb8-e865-413c-8ccc-4f09c3fe0213 - +----------------+----------------+----------------------------------------------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ - | Operation Type | Project Access | Users | Created | Updated | Secret ACL Ref | - +----------------+----------------+----------------------------------------------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ - | read | False | [u'721e27b8505b499e8ab3b38154705b9e', u'2d0ee7c681cc4549b6d76769c320d91f'] | 2015-07-21 17:52:01.729370+00:00 | 2015-07-28 02:08:02.455276+00:00 | http://localhost:9311/v1/secrets/7776adb8-e865-413c-8ccc-4f09c3fe0213/acl | - +----------------+----------------+----------------------------------------------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ + +----------------+----------------+--------------------------------------------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ + | Operation Type | Project Access | Users | Created | Updated | Secret ACL Ref | + +----------------+----------------+--------------------------------------------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ + | read | False | ['721e27b8505b499e8ab3b38154705b9e', '2d0ee7c681cc4549b6d76769c320d91f'] | 2015-07-21 17:52:01.729370+00:00 | 2015-07-28 02:08:02.455276+00:00 | http://localhost:9311/v1/secrets/7776adb8-e865-413c-8ccc-4f09c3fe0213/acl | + +----------------+----------------+--------------------------------------------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ $ barbican acl get http://localhost:9311/v1/containers/83c302c7-86fe-4f07-a277-c4962f121f19 - +----------------+----------------+---------------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------+ - | Operation Type | Project Access | Users | Created | Updated | Container ACL Ref | - +----------------+----------------+---------------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------+ - | read | False | [u'2d0ee7c681cc4549b6d76769c320d91f'] | 2015-07-28 01:36:55.791381+00:00 | 2015-07-28 02:05:41.175386+00:00 | http://localhost:9311/v1/containers/83c302c7-86fe-4f07-a277-c4962f121f19/acl | - +----------------+----------------+---------------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------+ + +----------------+----------------+--------------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------+ + | Operation Type | Project Access | Users | Created | Updated | Container ACL Ref | + +----------------+----------------+--------------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------+ + | read | False | ['2d0ee7c681cc4549b6d76769c320d91f'] | 2015-07-28 01:36:55.791381+00:00 | 2015-07-28 02:05:41.175386+00:00 | http://localhost:9311/v1/containers/83c302c7-86fe-4f07-a277-c4962f121f19/acl | + +----------------+----------------+--------------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------+ Secret or container ref is required. If missing, it will result in error. @@ -333,11 +333,11 @@ To submit complete ACL setting for a secret or container, use this ACL action. $ barbican acl submit --user 2d0ee7c681cc4549b6d76769c320d91f --user 721e27b8505b499e8ab3b38154705b9e http://localhost:9311/v1/secrets/7776adb8-e865-413c-8ccc-4f09c3fe0213 - +----------------+----------------+----------------------------------------------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ - | Operation Type | Project Access | Users | Created | Updated | Secret ACL Ref | - +----------------+----------------+----------------------------------------------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ - | read | True | [u'721e27b8505b499e8ab3b38154705b9e', u'2d0ee7c681cc4549b6d76769c320d91f'] | 2015-07-21 17:52:01.729370+00:00 | 2015-08-12 09:53:20.225971+00:00 | http://localhost:9311/v1/secrets/7776adb8-e865-413c-8ccc-4f09c3fe0213/acl | - +----------------+----------------+----------------------------------------------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ + +----------------+----------------+--------------------------------------------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ + | Operation Type | Project Access | Users | Created | Updated | Secret ACL Ref | + +----------------+----------------+--------------------------------------------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ + | read | True | ['721e27b8505b499e8ab3b38154705b9e', '2d0ee7c681cc4549b6d76769c320d91f'] | 2015-07-21 17:52:01.729370+00:00 | 2015-08-12 09:53:20.225971+00:00 | http://localhost:9311/v1/secrets/7776adb8-e865-413c-8ccc-4f09c3fe0213/acl | + +----------------+----------------+--------------------------------------------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ If ``user`` argument is missing or has no value, then empty list is passed for @@ -358,11 +358,11 @@ without any value. $ barbican acl submit --user 2d0ee7c681cc4549b6d76769c320d91f --no-project-access http://localhost:9311/v1/containers/83c302c7-86fe-4f07-a277-c4962f121f19 - +----------------+----------------+---------------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------+ - | Operation Type | Project Access | Users | Created | Updated | Container ACL Ref | - +----------------+----------------+---------------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------+ - | read | False | [u'2d0ee7c681cc4549b6d76769c320d91f'] | 2015-07-29 22:01:00.878270+00:00 | 2015-08-19 05:56:09.930302+00:00 | http://localhost:9311/v1/containers/83c302c7-86fe-4f07-a277-c4962f121f19/acl | - +----------------+----------------+---------------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------+ + +----------------+----------------+--------------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------+ + | Operation Type | Project Access | Users | Created | Updated | Container ACL Ref | + +----------------+----------------+--------------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------+ + | read | False | ['2d0ee7c681cc4549b6d76769c320d91f'] | 2015-07-29 22:01:00.878270+00:00 | 2015-08-19 05:56:09.930302+00:00 | http://localhost:9311/v1/containers/83c302c7-86fe-4f07-a277-c4962f121f19/acl | + +----------------+----------------+--------------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------+ Following error is returned when both mutually exclusive flags are passed. @@ -392,22 +392,22 @@ existing project access behavior flag. $ barbican acl user add --user c1d20e4b7e7d4917aee6f0832152269b http://localhost:9311/v1/containers/83c302c7-86fe-4f07-a277-c4962f121f19 - +----------------+----------------+----------------------------------------------------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------+ - | Operation Type | Project Access | Users | Created | Updated | Container ACL Ref | - +----------------+----------------+----------------------------------------------------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------+ - | read | False | [u'2d0ee7c681cc4549b6d76769c320d91f', u'c1d20e4b7e7d4917aee6f0832152269b'] | 2015-07-29 22:01:00.878270+00:00 | 2015-08-12 10:08:19.129370+00:00 | http://localhost:9311/v1/containers/83c302c7-86fe-4f07-a277-c4962f121f19/acl | - +----------------+----------------+----------------------------------------------------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------+ + +----------------+----------------+--------------------------------------------------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------+ + | Operation Type | Project Access | Users | Created | Updated | Container ACL Ref | + +----------------+----------------+--------------------------------------------------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------+ + | read | False | ['2d0ee7c681cc4549b6d76769c320d91f', 'c1d20e4b7e7d4917aee6f0832152269b'] | 2015-07-29 22:01:00.878270+00:00 | 2015-08-12 10:08:19.129370+00:00 | http://localhost:9311/v1/containers/83c302c7-86fe-4f07-a277-c4962f121f19/acl | + +----------------+----------------+--------------------------------------------------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------+ .. code-block:: bash # Added 2 users for secret (084c2098-66db-4401-8348-d969be0eddaa) earlier via set action. $ barbican acl user add --user --no-project-access http://localhost:9311/v1/secrets/084c2098-66db-4401-8348-d969be0eddaa - +----------------+----------------+----------------------------------------------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ - | Operation Type | Project Access | Users | Created | Updated | Secret ACL Ref | - +----------------+----------------+----------------------------------------------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ - | read | False | [u'721e27b8505b499e8ab3b38154705b9e', u'2d0ee7c681cc4549b6d76769c320d91f'] | 2015-08-12 10:09:27.564371+00:00 | 2015-08-12 10:11:09.749980+00:00 | http://localhost:9311/v1/secrets/084c2098-66db-4401-8348-d969be0eddaa/acl | - +----------------+----------------+----------------------------------------------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ + +----------------+----------------+--------------------------------------------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ + | Operation Type | Project Access | Users | Created | Updated | Secret ACL Ref | + +----------------+----------------+--------------------------------------------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ + | read | False | ['721e27b8505b499e8ab3b38154705b9e', '2d0ee7c681cc4549b6d76769c320d91f'] | 2015-08-12 10:09:27.564371+00:00 | 2015-08-12 10:11:09.749980+00:00 | http://localhost:9311/v1/secrets/084c2098-66db-4401-8348-d969be0eddaa/acl | + +----------------+----------------+--------------------------------------------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ ACL Remove User(s) @@ -426,11 +426,11 @@ existing userid(s) are removed from ACL. $ barbican acl user remove --user 2d0ee7c681cc4549b6d76769c320d91f --user invalid_user_id http://localhost:9311/v1/secrets/084c2098-66db-4401-8348-d969be0eddaa - +----------------+----------------+---------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ - | Operation Type | Project Access | Users | Created | Updated | Secret ACL Ref | - +----------------+----------------+---------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ - | read | False | [u'721e27b8505b499e8ab3b38154705b9e'] | 2015-08-12 10:09:27.564371+00:00 | 2015-08-12 10:12:21.842888+00:00 | http://localhost:9311/v1/secrets/084c2098-66db-4401-8348-d969be0eddaa/acl | - +----------------+----------------+---------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ + +----------------+----------------+--------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ + | Operation Type | Project Access | Users | Created | Updated | Secret ACL Ref | + +----------------+----------------+--------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ + | read | False | ['721e27b8505b499e8ab3b38154705b9e'] | 2015-08-12 10:09:27.564371+00:00 | 2015-08-12 10:12:21.842888+00:00 | http://localhost:9311/v1/secrets/084c2098-66db-4401-8348-d969be0eddaa/acl | + +----------------+----------------+--------------------------------------+----------------------------------+----------------------------------+---------------------------------------------------------------------------+ ACLs Delete diff --git a/doc/source/cli/usage.rst b/doc/source/cli/usage.rst index dbbad60..4bf2d38 100644 --- a/doc/source/cli/usage.rst +++ b/doc/source/cli/usage.rst @@ -45,14 +45,14 @@ Example: def random_password(length): sys_random = random.SystemRandom() - return u''.join( + return ''.join( sys_random.choice(string.ascii_letters + string.digits) for _ in range(length) ) barbican = client.Client(...) my_secret = barbican.secrets.create() - my_secret.name = u'Random plain text password' + my_secret.name = 'Random plain text password' my_secret.payload = random_password(24) my_secret_ref = my_secret.store() diff --git a/doc/source/conf.py b/doc/source/conf.py index 7579242..298a8b0 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -38,7 +38,7 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -copyright = u'2014, OpenStack Foundation' +copyright = '2014, OpenStack Foundation' # If true, '()' will be appended to :func: etc. cross-reference text. add_function_parentheses = True @@ -69,8 +69,8 @@ htmlhelp_basename = 'python-barbicanclientdoc' latex_documents = [ ('index', 'doc-python-barbicanclient.tex', - u'python-barbicanclient Documentation', - u'OpenStack Foundation', 'manual'), + 'python-barbicanclient Documentation', + 'OpenStack Foundation', 'manual'), ] latex_use_xindy = False diff --git a/functionaltests/base.py b/functionaltests/base.py index 8bd75a8..c9fc817 100644 --- a/functionaltests/base.py +++ b/functionaltests/base.py @@ -23,7 +23,7 @@ CONF = config.get_config() class BaseTestCase(oslotest.BaseTestCase): max_payload_size = CONF.keymanager.max_payload_size - max_sized_payload = u'a' * max_payload_size + max_sized_payload = 'a' * max_payload_size oversized_payload = 'a' * (max_payload_size + 1) max_field_size = 255 max_sized_field = 'a' * max_field_size diff --git a/functionaltests/client/v1/functional/test_secrets.py b/functionaltests/client/v1/functional/test_secrets.py index fae6c42..2ea483b 100644 --- a/functionaltests/client/v1/functional/test_secrets.py +++ b/functionaltests/client/v1/functional/test_secrets.py @@ -673,7 +673,7 @@ class SecretsTestCase(base.TestCase): @utils.parameterized_dataset({ 'text/plain': [ - u'meowwwwwwwmeowwwwwww', + 'meowwwwwwwmeowwwwwww', 'text/plain'], 'application/octet-stream': [ |