remove unicode from code
Change-Id: I086d90b6f46e31582d412b8725e48cba5c21d6bc
LiZekun
1 year, 8 months ago
432 | 432 | Barbican key creation is done asynchronously, so this loop continues |
433 | 433 | checking until the order is active or a timeout occurs. |
434 | 434 | """ |
435 | active_status = u'ACTIVE' | |
436 | error_status = u'ERROR' | |
435 | active_status = 'ACTIVE' | |
436 | error_status = 'ERROR' | |
437 | 437 | number_of_retries = self.conf.barbican.number_of_retries |
438 | 438 | retry_delay = self.conf.barbican.retry_delay |
439 | 439 | order = barbican_client.orders.get(order_ref) |
292 | 292 | # Create order and assign return value |
293 | 293 | order = mock.Mock() |
294 | 294 | order.secret_ref = self.secret_ref |
295 | order.status = u'ACTIVE' | |
295 | order.status = 'ACTIVE' | |
296 | 296 | self.mock_barbican.orders.get.return_value = order |
297 | 297 | |
298 | 298 | # Create the key, get the UUID |
329 | 329 | container_id = "16caa8f4-dd34-4fb3-bf67-6c20533a30e4" |
330 | 330 | container_ref = ("http://localhost:9311/v1/containers/" + container_id) |
331 | 331 | order.container_ref = container_ref |
332 | order.status = u'ACTIVE' | |
332 | order.status = 'ACTIVE' | |
333 | 333 | self.mock_barbican.orders.get.return_value = order |
334 | 334 | |
335 | 335 | # Create container and assign return value |
502 | 502 | "4fe939b7-72bc-49aa-bd1e-e979589858af") |
503 | 503 | |
504 | 504 | pending_order = mock.Mock() |
505 | pending_order.status = u'PENDING' | |
505 | pending_order.status = 'PENDING' | |
506 | 506 | pending_order.order_ref = order_ref_url |
507 | 507 | |
508 | 508 | active_order = mock.Mock() |
509 | 509 | active_order.secret_ref = self.secret_ref |
510 | active_order.status = u'ACTIVE' | |
510 | active_order.status = 'ACTIVE' | |
511 | 511 | active_order.order_ref = order_ref_url |
512 | 512 | |
513 | 513 | self.mock_barbican.orders.get.side_effect = [pending_order, |
527 | 527 | number_of_retries = self.key_mgr.conf.barbican.number_of_retries |
528 | 528 | |
529 | 529 | pending_order = mock.Mock() |
530 | pending_order.status = u'PENDING' | |
530 | pending_order.status = 'PENDING' | |
531 | 531 | pending_order.order_ref = order_ref_url |
532 | 532 | |
533 | 533 | self.mock_barbican.orders.get.return_value = pending_order |
545 | 545 | "4fe939b7-72bc-49aa-bd1e-e979589858af") |
546 | 546 | |
547 | 547 | error_order = mock.Mock() |
548 | error_order.status = u'ERROR' | |
548 | error_order.status = 'ERROR' | |
549 | 549 | error_order.order_ref = order_ref_url |
550 | 550 | error_order.error_status_code = u"500" |
551 | 551 | error_order.error_reason = u"Test Error" |
37 | 37 | master_doc = 'index' |
38 | 38 | |
39 | 39 | # General information about the project. |
40 | project = u'castellan' | |
41 | copyright = u'2013, OpenStack Foundation' | |
40 | project = 'castellan' | |
41 | copyright = '2013, OpenStack Foundation' | |
42 | 42 | |
43 | 43 | # If true, '()' will be appended to :func: etc. cross-reference text. |
44 | 44 | add_function_parentheses = True |
71 | 71 | latex_documents = [ |
72 | 72 | ('index', |
73 | 73 | 'doc-castellan.tex', |
74 | u'%s Documentation' % project, | |
75 | u'OpenStack Foundation', 'manual'), | |
74 | '%s Documentation' % project, | |
75 | 'OpenStack Foundation', 'manual'), | |
76 | 76 | ] |
77 | 77 | |
78 | 78 | latex_elements = { |
55 | 55 | openstackdocs_auto_name = False |
56 | 56 | openstackdocs_bug_project = 'castellan' |
57 | 57 | 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' | |
60 | 60 | |
61 | 61 | # Release notes do not need a version number in the title, they |
62 | 62 | # cover multiple releases. |
203 | 203 | # author, documentclass [howto, manual, or own class]). |
204 | 204 | latex_documents = [ |
205 | 205 | ('index', 'CastellanReleaseNotes.tex', |
206 | u'Castellan Release Notes Documentation', | |
207 | u'Castellan Developers', 'manual'), | |
206 | 'Castellan Release Notes Documentation', | |
207 | 'Castellan Developers', 'manual'), | |
208 | 208 | ] |
209 | 209 | |
210 | 210 | # The name of an image file (relative to this directory) to place at the top of |
234 | 234 | # (source start file, name, description, authors, manual section). |
235 | 235 | man_pages = [ |
236 | 236 | ('index', 'castellanreleasenotes', |
237 | u'Castellan Release Notes Documentation', | |
238 | [u'Castellan Developers'], 1) | |
237 | 'Castellan Release Notes Documentation', | |
238 | ['Castellan Developers'], 1) | |
239 | 239 | ] |
240 | 240 | |
241 | 241 | # If true, show URL addresses after external links. |
249 | 249 | # dir menu entry, description, category) |
250 | 250 | texinfo_documents = [ |
251 | 251 | ('index', 'CastellanReleaseNotes', |
252 | u'Castellan Release Notes Documentation', | |
253 | u'Castellan Developers', 'CastellanReleaseNotes', | |
252 | 'Castellan Release Notes Documentation', | |
253 | 'Castellan Developers', 'CastellanReleaseNotes', | |
254 | 254 | 'One line description of project.', |
255 | 255 | 'Miscellaneous'), |
256 | 256 | ] |