remove unicode prefix from code
Change-Id: I2bb0aa3a7d285bade0fdf115f4afa2e37e9f9c4b
This commit is contained in:
parent
733ed4289a
commit
0525d54cca
@ -38,8 +38,8 @@ source_suffix = '.rst'
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'Heat Dashboard'
|
||||
copyright = u'2017, OpenStack Developers'
|
||||
project = 'Heat Dashboard'
|
||||
copyright = '2017, OpenStack Developers'
|
||||
|
||||
# openstackdocstheme options
|
||||
openstackdocs_repo_name = 'openstack/heat-dashboard'
|
||||
@ -75,8 +75,8 @@ htmlhelp_basename = '%sdoc' % project
|
||||
latex_documents = [
|
||||
('index',
|
||||
'doc-heat-dashboard.tex',
|
||||
u'Heat Dashboard Documentation',
|
||||
u'OpenStack Developers', 'manual', True),
|
||||
'Heat Dashboard Documentation',
|
||||
'OpenStack Developers', 'manual', True),
|
||||
]
|
||||
|
||||
latex_domain_indices = False
|
||||
@ -91,10 +91,10 @@ latex_elements = {
|
||||
}
|
||||
|
||||
man_pages = [
|
||||
('index', u'Heat Dashboard Documentation',
|
||||
('index', 'Heat Dashboard Documentation',
|
||||
'Documentation for Heat Dashboard plugin to Openstack\
|
||||
Dashboard (Horizon)',
|
||||
[u'OpenStack'], 1)
|
||||
['OpenStack'], 1)
|
||||
]
|
||||
|
||||
# Example configuration for intersphinx: refer to the Python standard library.
|
||||
|
@ -131,16 +131,16 @@ def resource_to_url(resource):
|
||||
@register.filter
|
||||
def stack_output(output):
|
||||
if not output:
|
||||
return u''
|
||||
return ''
|
||||
if isinstance(output, str):
|
||||
parts = urlparse.urlsplit(output)
|
||||
if parts.netloc and parts.scheme in ('http', 'https'):
|
||||
url = html.escape(output)
|
||||
safe_link = u'<a href="%s" target="_blank">%s</a>' % (url, url)
|
||||
safe_link = '<a href="%s" target="_blank">%s</a>' % (url, url)
|
||||
return safestring.mark_safe(safe_link)
|
||||
if isinstance(output, dict) or isinstance(output, list):
|
||||
output = json.dumps(output, indent=2)
|
||||
return safestring.mark_safe(u'<pre>%s</pre>' % html.escape(output))
|
||||
return safestring.mark_safe('<pre>%s</pre>' % html.escape(output))
|
||||
|
||||
|
||||
static_url = getattr(settings, "STATIC_URL", "/static/")
|
||||
|
@ -55,7 +55,7 @@ def data(TEST):
|
||||
{'id': "21023e92-8008-1234-8059-7f2293ff3889",
|
||||
'status': 'in-use',
|
||||
'size': 10,
|
||||
'display_name': u'my_volume',
|
||||
'display_name': 'my_volume',
|
||||
'display_description': '',
|
||||
'created_at': '2013-04-01 10:30:00',
|
||||
'volume_type': None,
|
||||
@ -67,7 +67,7 @@ def data(TEST):
|
||||
'name': 'my_volume2',
|
||||
'status': 'in-use',
|
||||
'size': 10,
|
||||
'display_name': u'my_volume2',
|
||||
'display_name': 'my_volume2',
|
||||
'display_description': '',
|
||||
'created_at': '2013-04-01 10:30:00',
|
||||
'volume_type': 'vol_type_2',
|
||||
@ -78,7 +78,7 @@ def data(TEST):
|
||||
{'id': "21023e92-8008-1234-8059-7f2293ff3890",
|
||||
'status': 'in-use',
|
||||
'size': 10,
|
||||
'display_name': u'my_volume',
|
||||
'display_name': 'my_volume',
|
||||
'display_description': '',
|
||||
'created_at': '2013-04-01 10:30:00',
|
||||
'volume_type': None,
|
||||
@ -97,19 +97,19 @@ def data(TEST):
|
||||
TEST.cinder_volumes.add(api.cinder.Volume(non_bootable_volume))
|
||||
|
||||
vol_type1 = volume_types.VolumeType(volume_types.VolumeTypeManager(None),
|
||||
{'id': u'1',
|
||||
'name': u'vol_type_1',
|
||||
{'id': '1',
|
||||
'name': 'vol_type_1',
|
||||
'description': 'type 1 description',
|
||||
'extra_specs': {'foo': 'bar',
|
||||
'volume_backend_name':
|
||||
'backend_1'}})
|
||||
vol_type2 = volume_types.VolumeType(volume_types.VolumeTypeManager(None),
|
||||
{'id': u'2',
|
||||
'name': u'vol_type_2',
|
||||
{'id': '2',
|
||||
'name': 'vol_type_2',
|
||||
'description': 'type 2 description'})
|
||||
vol_type3 = volume_types.VolumeType(volume_types.VolumeTypeManager(None),
|
||||
{'id': u'3',
|
||||
'name': u'vol_type_3',
|
||||
{'id': '3',
|
||||
'name': 'vol_type_3',
|
||||
'is_public': False,
|
||||
'description': 'type 3 description'})
|
||||
TEST.cinder_volume_types.add(vol_type1, vol_type2, vol_type3)
|
||||
|
@ -55,28 +55,28 @@ def data(TEST):
|
||||
TEST.imagesV2 = utils.TestDataContainer()
|
||||
|
||||
# Snapshots
|
||||
snapshot_dict = {'name': u'snapshot',
|
||||
'container_format': u'ami',
|
||||
snapshot_dict = {'name': 'snapshot',
|
||||
'container_format': 'ami',
|
||||
'id': 3,
|
||||
'status': "active",
|
||||
'owner': TEST.tenant.id,
|
||||
'properties': {'image_type': u'snapshot'},
|
||||
'properties': {'image_type': 'snapshot'},
|
||||
'is_public': False,
|
||||
'protected': False}
|
||||
snapshot_dict_no_owner = {'name': u'snapshot 2',
|
||||
'container_format': u'ami',
|
||||
snapshot_dict_no_owner = {'name': 'snapshot 2',
|
||||
'container_format': 'ami',
|
||||
'id': 4,
|
||||
'status': "active",
|
||||
'owner': None,
|
||||
'properties': {'image_type': u'snapshot'},
|
||||
'properties': {'image_type': 'snapshot'},
|
||||
'is_public': False,
|
||||
'protected': False}
|
||||
snapshot_dict_queued = {'name': u'snapshot 2',
|
||||
'container_format': u'ami',
|
||||
snapshot_dict_queued = {'name': 'snapshot 2',
|
||||
'container_format': 'ami',
|
||||
'id': 5,
|
||||
'status': "queued",
|
||||
'owner': TEST.tenant.id,
|
||||
'properties': {'image_type': u'snapshot'},
|
||||
'properties': {'image_type': 'snapshot'},
|
||||
'is_public': False,
|
||||
'protected': False}
|
||||
snapshot = images.Image(images.ImageManager(None), snapshot_dict)
|
||||
@ -89,14 +89,14 @@ def data(TEST):
|
||||
# Images
|
||||
image_dict = {'id': '007e7d55-fe1e-4c5c-bf08-44b4a4964822',
|
||||
'name': 'public_image',
|
||||
'disk_format': u'qcow2',
|
||||
'disk_format': 'qcow2',
|
||||
'status': "active",
|
||||
'size': 20 * 1024 ** 3,
|
||||
'virtual_size': None,
|
||||
'min_disk': 0,
|
||||
'owner': TEST.tenant.id,
|
||||
'container_format': 'novaImage',
|
||||
'properties': {'image_type': u'image'},
|
||||
'properties': {'image_type': 'image'},
|
||||
'is_public': True,
|
||||
'protected': False,
|
||||
'min_ram': 0,
|
||||
@ -125,7 +125,7 @@ def data(TEST):
|
||||
'virtual_size': None,
|
||||
'min_disk': 30,
|
||||
'container_format': 'novaImage',
|
||||
'properties': {'image_type': u'image'},
|
||||
'properties': {'image_type': 'image'},
|
||||
'is_public': True,
|
||||
'protected': True,
|
||||
'min_ram': 0,
|
||||
@ -140,7 +140,7 @@ def data(TEST):
|
||||
'min_disk': 0,
|
||||
'owner': TEST.tenant.id,
|
||||
'container_format': 'novaImage',
|
||||
'properties': {'image_type': u'image'},
|
||||
'properties': {'image_type': 'image'},
|
||||
'is_public': True,
|
||||
'protected': False,
|
||||
'min_ram': 0}
|
||||
@ -209,9 +209,9 @@ def data(TEST):
|
||||
'min_disk': 0,
|
||||
'owner': TEST.tenant.id,
|
||||
'container_format': 'novaImage',
|
||||
'properties': {'description': u'a multi prop image',
|
||||
'foo': u'foo val',
|
||||
'bar': u'bar val'},
|
||||
'properties': {'description': 'a multi prop image',
|
||||
'foo': 'foo val',
|
||||
'bar': 'bar val'},
|
||||
'is_public': True,
|
||||
'protected': False}
|
||||
multi_prop_image = images.Image(images.ImageManager(None), image_dict)
|
||||
@ -250,7 +250,7 @@ def data(TEST):
|
||||
'created_at': '2014-02-14T20:56:53',
|
||||
'direct_url': 'swift+config://ref1/glance/'
|
||||
'da8500d5-8b80-4b9c-8410-cc57fb8fb9d5',
|
||||
'disk_format': u'qcow2',
|
||||
'disk_format': 'qcow2',
|
||||
'file': '/v2/images/'
|
||||
'da8500d5-8b80-4b9c-8410-cc57fb8fb9d5/file',
|
||||
'id': '007e7d55-fe1e-4c5c-bf08-44b4a4964822',
|
||||
@ -261,7 +261,7 @@ def data(TEST):
|
||||
'da8500d5-8b80-4b9c-8410-cc57fb8fb9d5'}],
|
||||
'min_ram': 0,
|
||||
'name': 'public_image',
|
||||
'image_type': u'image',
|
||||
'image_type': 'image',
|
||||
'min_disk': 0,
|
||||
'owner': TEST.tenant.id,
|
||||
'protected': False,
|
||||
@ -277,7 +277,7 @@ def data(TEST):
|
||||
'container_format': 'novaImage',
|
||||
'created_at': '2014-03-16T06:22:14',
|
||||
'disk_format': None,
|
||||
'image_type': u'image',
|
||||
'image_type': 'image',
|
||||
'file': '/v2/images/885d1cb0-9f5c-4677-9d03-175be7f9f984/file',
|
||||
'id': 'd6936c86-7fec-474a-85c5-5e467b371c3c',
|
||||
'locations': [],
|
||||
@ -311,9 +311,9 @@ def data(TEST):
|
||||
'updated_at': '2015-09-02T00:31:17Z',
|
||||
'virtual_size': None,
|
||||
'visibility': 'public',
|
||||
'description': u'a multi prop image',
|
||||
'foo': u'foo val',
|
||||
'bar': u'bar val'
|
||||
'description': 'a multi prop image',
|
||||
'foo': 'foo val',
|
||||
'bar': 'bar val'
|
||||
}]
|
||||
for fixture in image_v2_dicts:
|
||||
apiresource = APIResourceV2(fixture)
|
||||
|
@ -415,7 +415,7 @@ def data(TEST):
|
||||
'AWS::StackName': "teststack{0}".format(i),
|
||||
'DBPassword': '******',
|
||||
'AWS::Region': 'ap-southeast-1',
|
||||
'DBName': u'wordpress'
|
||||
'DBName': 'wordpress'
|
||||
},
|
||||
"stack_status_reason": "Stack successfully created",
|
||||
"stack_name": "stack-test{0}".format(i),
|
||||
|
@ -223,7 +223,7 @@ def data(TEST):
|
||||
'domain_id': '2',
|
||||
'domain_name': 'disabled_domain'}
|
||||
tenant_dict_3 = {'id': "3",
|
||||
'name': u'\u4e91\u89c4\u5219',
|
||||
'name': '\u4e91\u89c4\u5219',
|
||||
'description': "an unicode-named tenant.",
|
||||
'enabled': True,
|
||||
'domain_id': '2',
|
||||
|
@ -271,7 +271,7 @@ class HeatApiTests(test.APITestCase):
|
||||
user_data:
|
||||
get_file: http://test.example/example
|
||||
'''
|
||||
expected_files = {u'http://test.example/example': b'echo "test"'}
|
||||
expected_files = {'http://test.example/example': b'echo "test"'}
|
||||
url = 'http://test.example/example'
|
||||
data = b'echo "test"'
|
||||
mock_read_url_content.return_value = data
|
||||
|
@ -87,22 +87,22 @@ class MappingsTests(test.TestCase):
|
||||
'aaa')
|
||||
|
||||
def test_stack_output(self):
|
||||
self.assertEqual(u'<pre>foo</pre>', mappings.stack_output('foo'))
|
||||
self.assertEqual(u'', mappings.stack_output(None))
|
||||
self.assertEqual('<pre>foo</pre>', mappings.stack_output('foo'))
|
||||
self.assertEqual('', mappings.stack_output(None))
|
||||
|
||||
outputs = ['one', 'two', 'three']
|
||||
expected_text = """[\n "one",\n "two",\n "three"\n]"""
|
||||
|
||||
self.assertEqual(u'<pre>%s</pre>' % html.escape(expected_text),
|
||||
self.assertEqual('<pre>%s</pre>' % html.escape(expected_text),
|
||||
mappings.stack_output(outputs))
|
||||
|
||||
outputs = {'foo': 'bar'}
|
||||
expected_text = """{\n "foo": "bar"\n}"""
|
||||
self.assertEqual(u'<pre>%s</pre>' % html.escape(expected_text),
|
||||
self.assertEqual('<pre>%s</pre>' % html.escape(expected_text),
|
||||
mappings.stack_output(outputs))
|
||||
|
||||
self.assertEqual(
|
||||
u'<a href="http://www.example.com/foo" target="_blank">'
|
||||
'<a href="http://www.example.com/foo" target="_blank">'
|
||||
'http://www.example.com/foo</a>',
|
||||
mappings.stack_output('http://www.example.com/foo'))
|
||||
|
||||
|
@ -52,8 +52,8 @@ source_suffix = '.rst'
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'Heat Dashboard Release Notes'
|
||||
copyright = u'2017, OpenStack Foundation'
|
||||
project = 'Heat Dashboard Release Notes'
|
||||
copyright = '2017, OpenStack Foundation'
|
||||
|
||||
# openstackdocstheme options
|
||||
openstackdocs_repo_name = 'openstack/heat-dashboard'
|
||||
@ -206,8 +206,8 @@ latex_elements = {
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [
|
||||
('index', 'HeatDashboardReleaseNotes.tex',
|
||||
u'Heat Dashboard Release Notes Documentation',
|
||||
u'OpenStack Foundation', 'manual'),
|
||||
'Heat Dashboard Release Notes Documentation',
|
||||
'OpenStack Foundation', 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
@ -237,8 +237,8 @@ latex_documents = [
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('index', 'HeatDashboardReleaseNotes',
|
||||
u'Heat Dashboard Release Notes Documentation',
|
||||
[u'OpenStack Foundation'], 1)
|
||||
'Heat Dashboard Release Notes Documentation',
|
||||
['OpenStack Foundation'], 1)
|
||||
]
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
@ -252,8 +252,8 @@ man_pages = [
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
('index', 'HeatDashboardReleaseNotes',
|
||||
u'Heat Dashboard Release Notes Documentation',
|
||||
u'OpenStack Foundation', 'HeatDashboardReleaseNotes',
|
||||
'Heat Dashboard Release Notes Documentation',
|
||||
'OpenStack Foundation', 'HeatDashboardReleaseNotes',
|
||||
'Dashboard for Heat',
|
||||
'Miscellaneous'),
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user