diff options
author | Takashi Kajinami <tkajinam@redhat.com> | 2022-05-17 23:07:02 +0900 |
---|---|---|
committer | Takashi Kajinami <tkajinam@redhat.com> | 2022-05-18 13:31:28 +0000 |
commit | 771eb8640288bce0f4976d6c8481ccf27f94ced9 (patch) | |
tree | 64a6bb81571d018114b17c03a71523219a2a2f2a /README.rst | |
parent | 69125bfd07398245480e783415352a2ed0c5ee92 (diff) | |
download | python-barbicanclient-771eb8640288bce0f4976d6c8481ccf27f94ced9.tar.gz |
Remove unicode literal5.4.0
... because u'...' is equivalent to '...' in Python 3. Also, removed
the unicode prefix from example outputs because it is no longer shown
in Python 3.
Change-Id: I1f8fbec1d711659872cb07d2dcef9e33d5a9d21a
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 20 |
1 files changed, 10 insertions, 10 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) |