Codebase list python-castellan / 8671236
remove unicode from code Change-Id: I086d90b6f46e31582d412b8725e48cba5c21d6bc LiZekun 2 years ago
4 changed file(s) with 20 addition(s) and 20 deletion(s). Raw diff Collapse all Expand all
432432 Barbican key creation is done asynchronously, so this loop continues
433433 checking until the order is active or a timeout occurs.
434434 """
435 active_status = u'ACTIVE'
436 error_status = u'ERROR'
435 active_status = 'ACTIVE'
436 error_status = 'ERROR'
437437 number_of_retries = self.conf.barbican.number_of_retries
438438 retry_delay = self.conf.barbican.retry_delay
439439 order = barbican_client.orders.get(order_ref)
292292 # Create order and assign return value
293293 order = mock.Mock()
294294 order.secret_ref = self.secret_ref
295 order.status = u'ACTIVE'
295 order.status = 'ACTIVE'
296296 self.mock_barbican.orders.get.return_value = order
297297
298298 # Create the key, get the UUID
329329 container_id = "16caa8f4-dd34-4fb3-bf67-6c20533a30e4"
330330 container_ref = ("http://localhost:9311/v1/containers/" + container_id)
331331 order.container_ref = container_ref
332 order.status = u'ACTIVE'
332 order.status = 'ACTIVE'
333333 self.mock_barbican.orders.get.return_value = order
334334
335335 # Create container and assign return value
502502 "4fe939b7-72bc-49aa-bd1e-e979589858af")
503503
504504 pending_order = mock.Mock()
505 pending_order.status = u'PENDING'
505 pending_order.status = 'PENDING'
506506 pending_order.order_ref = order_ref_url
507507
508508 active_order = mock.Mock()
509509 active_order.secret_ref = self.secret_ref
510 active_order.status = u'ACTIVE'
510 active_order.status = 'ACTIVE'
511511 active_order.order_ref = order_ref_url
512512
513513 self.mock_barbican.orders.get.side_effect = [pending_order,
527527 number_of_retries = self.key_mgr.conf.barbican.number_of_retries
528528
529529 pending_order = mock.Mock()
530 pending_order.status = u'PENDING'
530 pending_order.status = 'PENDING'
531531 pending_order.order_ref = order_ref_url
532532
533533 self.mock_barbican.orders.get.return_value = pending_order
545545 "4fe939b7-72bc-49aa-bd1e-e979589858af")
546546
547547 error_order = mock.Mock()
548 error_order.status = u'ERROR'
548 error_order.status = 'ERROR'
549549 error_order.order_ref = order_ref_url
550550 error_order.error_status_code = u"500"
551551 error_order.error_reason = u"Test Error"
3737 master_doc = 'index'
3838
3939 # General information about the project.
40 project = u'castellan'
41 copyright = u'2013, OpenStack Foundation'
40 project = 'castellan'
41 copyright = '2013, OpenStack Foundation'
4242
4343 # If true, '()' will be appended to :func: etc. cross-reference text.
4444 add_function_parentheses = True
7171 latex_documents = [
7272 ('index',
7373 'doc-castellan.tex',
74 u'%s Documentation' % project,
75 u'OpenStack Foundation', 'manual'),
74 '%s Documentation' % project,
75 'OpenStack Foundation', 'manual'),
7676 ]
7777
7878 latex_elements = {
5555 openstackdocs_auto_name = False
5656 openstackdocs_bug_project = 'castellan'
5757 openstackdocs_bug_tag = 'doc'
58 project = u'Castellan Release Notes'
59 copyright = u'2017, Castellan Developers'
58 project = 'Castellan Release Notes'
59 copyright = '2017, Castellan Developers'
6060
6161 # Release notes do not need a version number in the title, they
6262 # cover multiple releases.
203203 # author, documentclass [howto, manual, or own class]).
204204 latex_documents = [
205205 ('index', 'CastellanReleaseNotes.tex',
206 u'Castellan Release Notes Documentation',
207 u'Castellan Developers', 'manual'),
206 'Castellan Release Notes Documentation',
207 'Castellan Developers', 'manual'),
208208 ]
209209
210210 # The name of an image file (relative to this directory) to place at the top of
234234 # (source start file, name, description, authors, manual section).
235235 man_pages = [
236236 ('index', 'castellanreleasenotes',
237 u'Castellan Release Notes Documentation',
238 [u'Castellan Developers'], 1)
237 'Castellan Release Notes Documentation',
238 ['Castellan Developers'], 1)
239239 ]
240240
241241 # If true, show URL addresses after external links.
249249 # dir menu entry, description, category)
250250 texinfo_documents = [
251251 ('index', 'CastellanReleaseNotes',
252 u'Castellan Release Notes Documentation',
253 u'Castellan Developers', 'CastellanReleaseNotes',
252 'Castellan Release Notes Documentation',
253 'Castellan Developers', 'CastellanReleaseNotes',
254254 'One line description of project.',
255255 'Miscellaneous'),
256256 ]