Remove deprecated legacy_api config options
The config options 'osapi_compute_ext_list' and 'osapi_compute_extension' that are deprecated in mitaka has been removed in newton. Blueprint centralize-config-options-newton Change-Id: I899c0a7da371138ed5e448d33a10d8ec46e42fe1
This commit is contained in:
parent
7cf8ab7354
commit
c05d08b6fd
@ -55,7 +55,6 @@ from nova.conf import ipv6
|
||||
from nova.conf import ironic
|
||||
from nova.conf import key_manager
|
||||
# from nova.conf import keystone_authtoken
|
||||
from nova.conf import legacy_api
|
||||
from nova.conf import libvirt
|
||||
from nova.conf import mks
|
||||
# from nova.conf import matchmaker_redis
|
||||
@ -132,7 +131,6 @@ ipv6.register_opts(CONF)
|
||||
ironic.register_opts(CONF)
|
||||
key_manager.register_opts(CONF)
|
||||
# keystone_authtoken.register_opts(CONF)
|
||||
legacy_api.register_opts(CONF)
|
||||
libvirt.register_opts(CONF)
|
||||
# matchmaker_redis.register_opts(CONF)
|
||||
# metadata.register_opts(CONF)
|
||||
|
@ -1,54 +0,0 @@
|
||||
# needs:fix_opt_description
|
||||
# needs:check_deprecation_status
|
||||
# needs:check_opt_group_and_type
|
||||
# needs:fix_opt_description_indentation
|
||||
# needs:fix_opt_registration_consistency
|
||||
|
||||
|
||||
# Copyright 2015 OpenStack Foundation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
STANDARD_EXTENSIONS = ('nova.api.openstack.compute.legacy_v2.contrib.' +
|
||||
'standard_extensions')
|
||||
|
||||
osapi_ext_list_opt = cfg.ListOpt('osapi_compute_ext_list',
|
||||
default=[],
|
||||
help='DEPRECATED: Specify list of extensions to load when '
|
||||
'using osapi_compute_extension option with nova.api.'
|
||||
'openstack.compute.legacy_v2.contrib.select_extensions '
|
||||
'This option will be removed in the near future. '
|
||||
'After that point you have to run all of the API.',
|
||||
deprecated_for_removal=True)
|
||||
|
||||
osapi_comp_ext_opt = cfg.MultiStrOpt(
|
||||
'osapi_compute_extension',
|
||||
default=[STANDARD_EXTENSIONS],
|
||||
help='The osapi compute extension to load. '
|
||||
'This option will be removed in the near future. '
|
||||
'After that point you have to run all of the API.',
|
||||
deprecated_for_removal=True)
|
||||
|
||||
ALL_OPTS = [osapi_ext_list_opt] + [osapi_comp_ext_opt]
|
||||
|
||||
|
||||
def register_opts(conf):
|
||||
conf.register_opt(osapi_ext_list_opt)
|
||||
conf.register_opt(osapi_comp_ext_opt)
|
||||
|
||||
|
||||
def list_opts():
|
||||
return {"DEFAULT": ALL_OPTS}
|
@ -71,9 +71,6 @@ class FlavorDisabledTestV21(test.NoDBTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(FlavorDisabledTestV21, self).setUp()
|
||||
ext = ('nova.api.openstack.compute.contrib'
|
||||
'.flavor_disabled.Flavor_disabled')
|
||||
self.flags(osapi_compute_extension=[ext])
|
||||
fakes.stub_out_nw_api(self)
|
||||
self.stubs.Set(flavors, "get_all_flavors_sorted_list",
|
||||
fake_get_all_flavors_sorted_list)
|
||||
|
@ -66,9 +66,6 @@ class FlavorRxtxTestV21(test.NoDBTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(FlavorRxtxTestV21, self).setUp()
|
||||
ext = ('nova.api.openstack.compute.contrib'
|
||||
'.flavor_rxtx.Flavor_rxtx')
|
||||
self.flags(osapi_compute_extension=[ext])
|
||||
fakes.stub_out_nw_api(self)
|
||||
self.stubs.Set(flavors, "get_all_flavors_sorted_list",
|
||||
fake_get_all_flavors_sorted_list)
|
||||
|
@ -68,9 +68,6 @@ class FlavorSwapTestV21(test.NoDBTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(FlavorSwapTestV21, self).setUp()
|
||||
ext = ('nova.api.openstack.compute.contrib'
|
||||
'.flavor_swap.Flavor_swap')
|
||||
self.flags(osapi_compute_extension=[ext])
|
||||
fakes.stub_out_nw_api(self)
|
||||
self.stubs.Set(flavors, "get_all_flavors_sorted_list",
|
||||
fake_get_all_flavors_sorted_list)
|
||||
|
@ -59,9 +59,6 @@ class FlavorExtraDataTestV21(test.NoDBTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(FlavorExtraDataTestV21, self).setUp()
|
||||
ext = ('nova.api.openstack.compute.contrib'
|
||||
'.flavorextradata.Flavorextradata')
|
||||
self.flags(osapi_compute_extension=[ext])
|
||||
self.stubs.Set(flavors, 'get_flavor_by_flavor_id',
|
||||
fake_get_flavor_by_flavor_id)
|
||||
self.stubs.Set(flavors, 'get_all_flavors_sorted_list',
|
||||
|
@ -119,7 +119,6 @@ class FlavorsTestV21(test.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(FlavorsTestV21, self).setUp()
|
||||
self.flags(osapi_compute_extension=[])
|
||||
fakes.stub_out_networking(self)
|
||||
self.stubs.Set(nova.compute.flavors, "get_all_flavors_sorted_list",
|
||||
fake_get_all_flavors_sorted_list)
|
||||
|
@ -81,8 +81,6 @@ class ImageSizeTestV21(test.NoDBTestCase):
|
||||
self.stubs.Set(glance.GlanceImageServiceV2, 'show', fake_show)
|
||||
self.stubs.Set(glance.GlanceImageServiceV2, 'detail', fake_detail)
|
||||
|
||||
self.flags(osapi_compute_extension=['nova.api.openstack.compute'
|
||||
'.contrib.image_size.Image_size'])
|
||||
self.flags(api_servers=['http://localhost:9292'], group='glance')
|
||||
|
||||
def _make_request(self, url):
|
||||
|
@ -84,10 +84,6 @@ class KeypairsTestV21(test.TestCase):
|
||||
db_key_pair_create)
|
||||
self.stub_out("nova.db.key_pair_destroy",
|
||||
db_key_pair_destroy)
|
||||
self.flags(
|
||||
osapi_compute_extension=[
|
||||
'nova.api.openstack.compute.contrib.select_extensions'],
|
||||
osapi_compute_ext_list=['Keypairs'])
|
||||
self._setup_app_and_controller()
|
||||
|
||||
self.req = fakes.HTTPRequest.blank('', version=self.wsgi_api_version)
|
||||
|
@ -512,10 +512,6 @@ class TestNeutronSecurityGroupsOutputTest(TestNeutronSecurityGroupsTestCase):
|
||||
'get_instances_security_groups_bindings',
|
||||
(test_security_groups.
|
||||
fake_get_instances_security_groups_bindings))
|
||||
self.flags(
|
||||
osapi_compute_extension=[
|
||||
'nova.api.openstack.compute.contrib.select_extensions'],
|
||||
osapi_compute_ext_list=['Security_groups'])
|
||||
|
||||
def _make_request(self, url, body=None):
|
||||
req = webob.Request.blank(url)
|
||||
|
@ -1312,10 +1312,6 @@ class SecurityGroupsOutputTestV21(test.TestCase):
|
||||
self.stubs.Set(compute.api.API, 'get', fake_compute_get)
|
||||
self.stubs.Set(compute.api.API, 'get_all', fake_compute_get_all)
|
||||
self.stubs.Set(compute.api.API, 'create', fake_compute_create)
|
||||
self.flags(
|
||||
osapi_compute_extension=[
|
||||
'nova.api.openstack.compute.contrib.select_extensions'],
|
||||
osapi_compute_ext_list=['Security_groups'])
|
||||
self.app = self._setup_app()
|
||||
|
||||
def _setup_app(self):
|
||||
|
@ -64,10 +64,6 @@ class ServerUsageTestV21(test.TestCase):
|
||||
fakes.stub_out_nw_api(self)
|
||||
self.stub_out('nova.compute.api.API.get', fake_compute_get)
|
||||
self.stub_out('nova.compute.api.API.get_all', fake_compute_get_all)
|
||||
self.flags(
|
||||
osapi_compute_extension=[
|
||||
'nova.api.openstack.compute.contrib.select_extensions'],
|
||||
osapi_compute_ext_list=['Server_usage'])
|
||||
return_server = fakes.fake_instance_get()
|
||||
self.stub_out('nova.db.instance_get_by_uuid', return_server)
|
||||
|
||||
|
@ -133,10 +133,6 @@ class BootFromVolumeTest(test.TestCase):
|
||||
fakes.stub_out_nw_api(self)
|
||||
self._block_device_mapping_seen = None
|
||||
self._legacy_bdm_seen = True
|
||||
self.flags(
|
||||
osapi_compute_extension=[
|
||||
'nova.api.openstack.compute.contrib.select_extensions'],
|
||||
osapi_compute_ext_list=['Volumes', 'Block_device_mapping_v2_boot'])
|
||||
|
||||
def _get_fake_compute_api_create(self):
|
||||
def _fake_compute_api_create(cls, context, instance_type,
|
||||
@ -230,10 +226,6 @@ class VolumeApiTestV21(test.NoDBTestCase):
|
||||
self.stubs.Set(cinder.API, "delete", fakes.stub_volume_delete)
|
||||
self.stubs.Set(cinder.API, "get", fakes.stub_volume_get)
|
||||
self.stubs.Set(cinder.API, "get_all", fakes.stub_volume_get_all)
|
||||
self.flags(
|
||||
osapi_compute_extension=[
|
||||
'nova.api.openstack.compute.contrib.select_extensions'],
|
||||
osapi_compute_ext_list=['Volumes'])
|
||||
|
||||
self.context = context.get_admin_context()
|
||||
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
upgrade:
|
||||
- The config options 'osapi_compute_ext_list' and 'osapi_compute_extension'
|
||||
were deprecated in mitaka. Hence these options were completely removed in
|
||||
newton, as v2 API is removed and v2.1 API doesn't provide the option of
|
||||
configuring extensions.
|
Loading…
Reference in New Issue
Block a user