diff options
author | Douglas Mendizábal <mail@doug.gt> | 2015-03-09 16:45:30 -0500 |
---|---|---|
committer | Douglas Mendizábal <mail@doug.gt> | 2015-03-11 17:46:27 -0500 |
commit | 46ef634de8c6867fa0d18fb4c3618cfca8516038 (patch) | |
tree | 7f933794e95fb6abe2794e9067ddbb786fdf24ad /README.rst | |
parent | 42af4f528ee4bbe3610f2c94a4b3cc788ebf6124 (diff) | |
download | python-barbicanclient-46ef634de8c6867fa0d18fb4c3618cfca8516038.tar.gz |
Deprecate setting the payload type and encoding
Deprecate manually setting the payload_content_type and
payload_content_encoding properties of a secret. With this CR a user of
the client only needs to provide the payload, and the client will figure
out what the correct payload_content_type and payload_content_encoding
values should be.
Setting these properties for the user lets us avoid a lot of weird
behaviors such as the one described in Bug #1419166, and also lets us
avoid errors that happen when a user mismatches the payload and an
incorrect content type.
In the interest of backwards compatibility, these properties are still
usable, but will log deprecation warnings. They should be removed in a
future version after current users have had enough time to update their
code bases.
Change-Id: Ibfe3ad42e11bd83c002d0f1b69fb8a323a7b6f3d
Closes-Bug: #1419166
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -31,12 +31,12 @@ with keystone authentication: >>> from barbicanclient import client >>> # We'll use Keystone API v3 for authentication - >>> 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') + >>> 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') >>> # Next we'll create a Keystone session using the auth plugin we just created >>> sess = session.Session(auth=auth) @@ -45,9 +45,8 @@ with keystone authentication: >>> barbican = client.Client(session=sess) >>> # Let's create a Secret to store some sensitive data - >>> secret = barbican.secrets.create(name='Self destruction sequence', - ... payload='the magic words are squeamish ossifrage', - ... payload_content_type='text/plain') + >>> secret = barbican.secrets.create(name=u'Self destruction sequence', + ... payload=u'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. |