diff --git a/cinder/tests/unit/api/contrib/test_backups.py b/cinder/tests/unit/api/contrib/test_backups.py index 6a260bdc9d1..56567f3260d 100644 --- a/cinder/tests/unit/api/contrib/test_backups.py +++ b/cinder/tests/unit/api/contrib/test_backups.py @@ -1917,7 +1917,7 @@ class BackupsAPITestCase(test.TestCase): self.assertEqual(backup.id, res_dict['restore']['backup_id']) self.assertEqual(volume.id, res_dict['restore']['volume_id']) self.assertEqual(volume_name, res_dict['restore']['volume_name']) - mock_restore_backup.assert_called_once_with(mock.ANY, u'testhost', + mock_restore_backup.assert_called_once_with(mock.ANY, 'testhost', mock.ANY, volume.id) # Manually check if restore_backup was called with appropriate backup. self.assertEqual(backup.id, mock_restore_backup.call_args[0][2].id) diff --git a/cinder/tests/unit/api/contrib/test_services.py b/cinder/tests/unit/api/contrib/test_services.py index 7b91a5c41dc..053f108a56d 100644 --- a/cinder/tests/unit/api/contrib/test_services.py +++ b/cinder/tests/unit/api/contrib/test_services.py @@ -687,7 +687,7 @@ class ServicesTest(test.TestCase): fakes.HTTPRequest.blank('v1/fake/os-services/disable-log-reason')) body = {'host': 'host1', 'binary': 'cinder-scheduler', - 'disabled_reason': u'test-reason', + 'disabled_reason': 'test-reason', } res_dict = self.controller.update(req, "disable-log-reason", body) diff --git a/cinder/tests/unit/api/contrib/test_snapshot_manage.py b/cinder/tests/unit/api/contrib/test_snapshot_manage.py index a270e950766..113241039e9 100644 --- a/cinder/tests/unit/api/contrib/test_snapshot_manage.py +++ b/cinder/tests/unit/api/contrib/test_snapshot_manage.py @@ -148,7 +148,7 @@ class SnapshotManageTest(test.TestCase): # correct arguments. self.assertEqual(1, mock_rpcapi.call_count) args = mock_rpcapi.call_args[0] - self.assertEqual({u'fake_key': u'fake_ref'}, args[3]) + self.assertEqual({'fake_key': 'fake_ref'}, args[3]) @mock.patch( 'cinder.scheduler.rpcapi.SchedulerAPI.manage_existing_snapshot') diff --git a/cinder/tests/unit/api/contrib/test_types_manage.py b/cinder/tests/unit/api/contrib/test_types_manage.py index e9fe61936c8..a6180ac09ed 100644 --- a/cinder/tests/unit/api/contrib/test_types_manage.py +++ b/cinder/tests/unit/api/contrib/test_types_manage.py @@ -191,8 +191,8 @@ class VolumeTypesManageApiTest(test.TestCase): mock_get.return_value = \ {'extra_specs': {"key1": "value1"}, 'id': DEFAULT_VOLUME_TYPE, - 'name': u'vol_type_1', - 'description': u'vol_type_desc_%s' % DEFAULT_VOLUME_TYPE} + 'name': 'vol_type_1', + 'description': 'vol_type_desc_%s' % DEFAULT_VOLUME_TYPE} mock_destroy.side_effect = return_volume_types_destroy req = fakes.HTTPRequest.blank('/v2/%s/types/%s' % @@ -235,8 +235,8 @@ class VolumeTypesManageApiTest(test.TestCase): mock_get_volume_type_by_name.return_value = \ {'extra_specs': {"key1": "value1"}, 'id': DEFAULT_VOLUME_TYPE, - 'name': u'vol_type_1', - 'description': u''} + 'name': 'vol_type_1', + 'description': ''} type_description = "" body = {"volume_type": {"name": "vol_type_1", @@ -338,8 +338,8 @@ class VolumeTypesManageApiTest(test.TestCase): mock_get_volume_type_by_name.return_value = \ {'extra_specs': {"key1": "value1"}, 'id': DEFAULT_VOLUME_TYPE, - 'name': u'vol_type_1', - 'description': u'vol_type_desc_1'} + 'name': 'vol_type_1', + 'description': 'vol_type_desc_1'} body = {"volume_type": {"name": "vol_type_1", "os-volume-type-access:is_public": True, @@ -424,8 +424,8 @@ class VolumeTypesManageApiTest(test.TestCase): self, mock_get_volume_type, mock_type_update): mock_get_volume_type.return_value = \ - {'id': DEFAULT_VOLUME_TYPE, 'name': u'vol_type_1', - 'description': u''} + {'id': DEFAULT_VOLUME_TYPE, 'name': 'vol_type_1', + 'description': ''} type_description = "" body = {"volume_type": {"description": type_description}} diff --git a/cinder/tests/unit/api/contrib/test_volume_actions.py b/cinder/tests/unit/api/contrib/test_volume_actions.py index bdff30d4e81..fbd7e348b30 100644 --- a/cinder/tests/unit/api/contrib/test_volume_actions.py +++ b/cinder/tests/unit/api/contrib/test_volume_actions.py @@ -818,30 +818,30 @@ class VolumeImageActionsTest(test.TestCase): def fake_image_service_create(self, *args): ret = { - 'status': u'queued', - 'name': u'image_name', + 'status': 'queued', + 'name': 'image_name', 'deleted': False, - 'container_format': u'bare', + 'container_format': 'bare', 'created_at': datetime.datetime(1, 1, 1, 1, 1, 1), - 'disk_format': u'raw', + 'disk_format': 'raw', 'updated_at': datetime.datetime(1, 1, 1, 1, 1, 1), 'id': fake.IMAGE_ID, 'min_ram': 0, 'checksum': None, 'min_disk': 0, 'deleted_at': None, - 'properties': {u'x_billing_code_license': u'246254365'}, + 'properties': {'x_billing_code_license': '246254365'}, 'size': 0} return ret def fake_image_service_create_with_params(self, *args): ret = { - 'status': u'queued', - 'name': u'image_name', + 'status': 'queued', + 'name': 'image_name', 'deleted': False, - 'container_format': u'bare', + 'container_format': 'bare', 'created_at': datetime.datetime(1, 1, 1, 1, 1, 1), - 'disk_format': u'raw', + 'disk_format': 'raw', 'updated_at': datetime.datetime(1, 1, 1, 1, 1, 1), 'id': fake.IMAGE_ID, 'min_ram': 0, @@ -850,7 +850,7 @@ class VolumeImageActionsTest(test.TestCase): 'visibility': 'public', 'protected': True, 'deleted_at': None, - 'properties': {u'x_billing_code_license': u'246254365'}, + 'properties': {'x_billing_code_license': '246254365'}, 'size': 0} return ret diff --git a/cinder/tests/unit/api/contrib/test_volume_type_access.py b/cinder/tests/unit/api/contrib/test_volume_type_access.py index 28f5f3298bd..07e45d00584 100644 --- a/cinder/tests/unit/api/contrib/test_volume_type_access.py +++ b/cinder/tests/unit/api/contrib/test_volume_type_access.py @@ -30,7 +30,7 @@ from cinder.tests.unit import test def generate_type(type_id, is_public): return { 'id': type_id, - 'name': u'test', + 'name': 'test', 'deleted': False, 'created_at': datetime.datetime(2012, 1, 1, 1, 1, 1, 1), 'updated_at': None, diff --git a/cinder/tests/unit/api/v3/test_cluster.py b/cinder/tests/unit/api/v3/test_cluster.py index fd559d78b5b..93d042fad86 100644 --- a/cinder/tests/unit/api/v3/test_cluster.py +++ b/cinder/tests/unit/api/v3/test_cluster.py @@ -243,7 +243,7 @@ class ClustersTestCase(test.TestCase): return_value=CLUSTERS_ORM[1]) def test_update_enable(self, get_mock, update_mock): req = FakeRequest() - expected = {'cluster': {'name': u'cluster2', + expected = {'cluster': {'name': 'cluster2', 'binary': 'cinder-volume', 'state': 'down', 'status': 'enabled', @@ -266,7 +266,7 @@ class ClustersTestCase(test.TestCase): def test_update_disable(self, get_mock, update_mock): req = FakeRequest() disabled_reason = 'For testing' - expected = {'cluster': {'name': u'cluster_name', + expected = {'cluster': {'name': 'cluster_name', 'state': 'up', 'binary': 'cinder-volume', 'status': 'disabled', diff --git a/doc/source/conf.py b/doc/source/conf.py index 0bb6810bcef..1f4c2bb786b 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -89,7 +89,7 @@ openstackdocs_repo_name = 'openstack/cinder' openstackdocs_bug_project = 'cinder' openstackdocs_bug_tag = 'doc' openstackdocs_pdf_link = True -copyright = u'2010-present, OpenStack Foundation' +copyright = '2010-present, OpenStack Foundation' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -129,13 +129,13 @@ modindex_common_prefix = ['cinder.'] # -- Options for man page output ---------------------------------------------- # Grouping the document tree for man pages. -# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual' +# List of tuples 'sourcefile', 'target', 'title', 'Authors name', 'manual' man_pages = [ - ('cli/cinder-manage', 'cinder-manage', u'Cloud controller fabric', - [u'OpenStack'], 1), - ('cli/cinder-status', 'cinder-status', u'Upgrade checking utility', - [u'OpenStack'], 1), + ('cli/cinder-manage', 'cinder-manage', 'Cloud controller fabric', + ['OpenStack'], 1), + ('cli/cinder-status', 'cinder-status', 'Upgrade checking utility', + ['OpenStack'], 1), ] # -- Options for HTML output -------------------------------------------------- @@ -228,8 +228,8 @@ htmlhelp_basename = 'cinderdoc' # (source start file, target name, title, author, documentclass # [howto/manual]). latex_documents = [ - ('index', 'doc-cinder.tex', u'Cinder Documentation', - u'Cinder Contributors', 'manual'), + ('index', 'doc-cinder.tex', 'Cinder Documentation', + 'Cinder Contributors', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of