Remove legacy v2 unit tests[f-n]

There are two implementation code for similar API in Nova repository.
One is newer: v2.1 API, another is legacy: v2 API. v2.1 API has been
used as the default API since Liberty and legacy v2 API has been marked
as deprecated. We have used and tested v2.1 API so well and now is nice
time to remove legacy API code based on the consensus of the design
summit of Austin. This patch removes unit tests of legacy v2 API[f-n].

Partially implements blueprint remove-legacy-v2-api-code

Change-Id: I543bc2a9c068aae2c755f8159c7d2a9fff2c67ee
This commit is contained in:
Ken'ichi Ohmichi
2016-05-01 20:30:30 -07:00
parent a2e6a55a0d
commit 7eb7a3dbb2
24 changed files with 9 additions and 787 deletions

View File

@@ -22,8 +22,6 @@ import six
from webob import exc
from nova.api.openstack.compute import instance_actions as instance_actions_v21
from nova.api.openstack.compute.legacy_v2.contrib import instance_actions \
as instance_actions_v2
from nova.api.openstack import wsgi as os_wsgi
from nova.compute import api as compute_api
from nova.db.sqlalchemy import models
@@ -108,16 +106,6 @@ class InstanceActionsPolicyTestV21(test.NoDBTestCase):
str(uuid.uuid4()), '1')
class InstanceActionsPolicyTestV2(InstanceActionsPolicyTestV21):
instance_actions = instance_actions_v2
def _set_policy_rules(self):
rules = {'compute:get': '',
'compute_extension:instance_actions':
'project_id:%(project_id)s'}
policy.set_rules(oslo_policy.Rules.from_dict(rules))
class InstanceActionsTestV21(test.NoDBTestCase):
instance_actions = instance_actions_v21
wsgi_api_version = os_wsgi.DEFAULT_API_VERSION
@@ -238,13 +226,3 @@ class InstanceActionsTestV221(InstanceActionsTestV21):
want_objects=False):
self.assertEqual('yes', context.read_deleted)
return objects.Instance(uuid=instance_uuid)
class InstanceActionsTestV2(InstanceActionsTestV21):
instance_actions = instance_actions_v2
def _set_policy_rules(self):
rules = {'compute:get': '',
'compute_extension:instance_actions': '',
'compute_extension:instance_actions:events': 'is_admin:True'}
policy.set_rules(oslo_policy.Rules.from_dict(rules))