remove unicode from code

Change-Id: I086d90b6f46e31582d412b8725e48cba5c21d6bc
This commit is contained in:
LiZekun 2022-01-05 10:44:00 +08:00
parent ebafb3c656
commit 86712360f3
4 changed files with 20 additions and 20 deletions

View File

@ -433,8 +433,8 @@ class BarbicanKeyManager(key_manager.KeyManager):
Barbican key creation is done asynchronously, so this loop continues Barbican key creation is done asynchronously, so this loop continues
checking until the order is active or a timeout occurs. checking until the order is active or a timeout occurs.
""" """
active_status = u'ACTIVE' active_status = 'ACTIVE'
error_status = u'ERROR' error_status = 'ERROR'
number_of_retries = self.conf.barbican.number_of_retries number_of_retries = self.conf.barbican.number_of_retries
retry_delay = self.conf.barbican.retry_delay retry_delay = self.conf.barbican.retry_delay
order = barbican_client.orders.get(order_ref) order = barbican_client.orders.get(order_ref)

View File

@ -293,7 +293,7 @@ class BarbicanKeyManagerTestCase(test_key_manager.KeyManagerTestCase):
# Create order and assign return value # Create order and assign return value
order = mock.Mock() order = mock.Mock()
order.secret_ref = self.secret_ref order.secret_ref = self.secret_ref
order.status = u'ACTIVE' order.status = 'ACTIVE'
self.mock_barbican.orders.get.return_value = order self.mock_barbican.orders.get.return_value = order
# Create the key, get the UUID # Create the key, get the UUID
@ -330,7 +330,7 @@ class BarbicanKeyManagerTestCase(test_key_manager.KeyManagerTestCase):
container_id = "16caa8f4-dd34-4fb3-bf67-6c20533a30e4" container_id = "16caa8f4-dd34-4fb3-bf67-6c20533a30e4"
container_ref = ("http://localhost:9311/v1/containers/" + container_id) container_ref = ("http://localhost:9311/v1/containers/" + container_id)
order.container_ref = container_ref order.container_ref = container_ref
order.status = u'ACTIVE' order.status = 'ACTIVE'
self.mock_barbican.orders.get.return_value = order self.mock_barbican.orders.get.return_value = order
# Create container and assign return value # Create container and assign return value
@ -503,12 +503,12 @@ class BarbicanKeyManagerTestCase(test_key_manager.KeyManagerTestCase):
"4fe939b7-72bc-49aa-bd1e-e979589858af") "4fe939b7-72bc-49aa-bd1e-e979589858af")
pending_order = mock.Mock() pending_order = mock.Mock()
pending_order.status = u'PENDING' pending_order.status = 'PENDING'
pending_order.order_ref = order_ref_url pending_order.order_ref = order_ref_url
active_order = mock.Mock() active_order = mock.Mock()
active_order.secret_ref = self.secret_ref active_order.secret_ref = self.secret_ref
active_order.status = u'ACTIVE' active_order.status = 'ACTIVE'
active_order.order_ref = order_ref_url active_order.order_ref = order_ref_url
self.mock_barbican.orders.get.side_effect = [pending_order, self.mock_barbican.orders.get.side_effect = [pending_order,
@ -528,7 +528,7 @@ class BarbicanKeyManagerTestCase(test_key_manager.KeyManagerTestCase):
number_of_retries = self.key_mgr.conf.barbican.number_of_retries number_of_retries = self.key_mgr.conf.barbican.number_of_retries
pending_order = mock.Mock() pending_order = mock.Mock()
pending_order.status = u'PENDING' pending_order.status = 'PENDING'
pending_order.order_ref = order_ref_url pending_order.order_ref = order_ref_url
self.mock_barbican.orders.get.return_value = pending_order self.mock_barbican.orders.get.return_value = pending_order
@ -546,7 +546,7 @@ class BarbicanKeyManagerTestCase(test_key_manager.KeyManagerTestCase):
"4fe939b7-72bc-49aa-bd1e-e979589858af") "4fe939b7-72bc-49aa-bd1e-e979589858af")
error_order = mock.Mock() error_order = mock.Mock()
error_order.status = u'ERROR' error_order.status = 'ERROR'
error_order.order_ref = order_ref_url error_order.order_ref = order_ref_url
error_order.error_status_code = u"500" error_order.error_status_code = u"500"
error_order.error_reason = u"Test Error" error_order.error_reason = u"Test Error"

View File

@ -38,8 +38,8 @@ source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
project = u'castellan' project = 'castellan'
copyright = u'2013, OpenStack Foundation' copyright = '2013, OpenStack Foundation'
# If true, '()' will be appended to :func: etc. cross-reference text. # If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True add_function_parentheses = True
@ -72,8 +72,8 @@ html_extra_path = ['_extra']
latex_documents = [ latex_documents = [
('index', ('index',
'doc-castellan.tex', 'doc-castellan.tex',
u'%s Documentation' % project, '%s Documentation' % project,
u'OpenStack Foundation', 'manual'), 'OpenStack Foundation', 'manual'),
] ]
latex_elements = { latex_elements = {

View File

@ -56,8 +56,8 @@ openstackdocs_repo_name = 'openstack/castellan'
openstackdocs_auto_name = False openstackdocs_auto_name = False
openstackdocs_bug_project = 'castellan' openstackdocs_bug_project = 'castellan'
openstackdocs_bug_tag = 'doc' openstackdocs_bug_tag = 'doc'
project = u'Castellan Release Notes' project = 'Castellan Release Notes'
copyright = u'2017, Castellan Developers' copyright = '2017, Castellan Developers'
# Release notes do not need a version number in the title, they # Release notes do not need a version number in the title, they
# cover multiple releases. # cover multiple releases.
@ -204,8 +204,8 @@ latex_elements = {
# author, documentclass [howto, manual, or own class]). # author, documentclass [howto, manual, or own class]).
latex_documents = [ latex_documents = [
('index', 'CastellanReleaseNotes.tex', ('index', 'CastellanReleaseNotes.tex',
u'Castellan Release Notes Documentation', 'Castellan Release Notes Documentation',
u'Castellan Developers', 'manual'), 'Castellan Developers', 'manual'),
] ]
# The name of an image file (relative to this directory) to place at the top of # The name of an image file (relative to this directory) to place at the top of
@ -235,8 +235,8 @@ latex_documents = [
# (source start file, name, description, authors, manual section). # (source start file, name, description, authors, manual section).
man_pages = [ man_pages = [
('index', 'castellanreleasenotes', ('index', 'castellanreleasenotes',
u'Castellan Release Notes Documentation', 'Castellan Release Notes Documentation',
[u'Castellan Developers'], 1) ['Castellan Developers'], 1)
] ]
# If true, show URL addresses after external links. # If true, show URL addresses after external links.
@ -250,8 +250,8 @@ man_pages = [
# dir menu entry, description, category) # dir menu entry, description, category)
texinfo_documents = [ texinfo_documents = [
('index', 'CastellanReleaseNotes', ('index', 'CastellanReleaseNotes',
u'Castellan Release Notes Documentation', 'Castellan Release Notes Documentation',
u'Castellan Developers', 'CastellanReleaseNotes', 'Castellan Developers', 'CastellanReleaseNotes',
'One line description of project.', 'One line description of project.',
'Miscellaneous'), 'Miscellaneous'),
] ]