Move config options from nova/api directory (5)

This is the fifth and final patch moving config options from the
nova/api directory. In this patch, the deprecated options from the
legacy_v2 directory have been moved to nova/conf/legacy_v2.py. A
subsequent patch will enhance the help text for these options.

Blueprint centralize-config-options-newton

Change-Id: I3fdff0d3c0c2f36155ad4f7060395e788b78d150
This commit is contained in:
EdLeafe
2016-04-21 15:53:54 +00:00
parent e9a3bca866
commit b6dd96c342
84 changed files with 193 additions and 419 deletions

View File

@@ -19,24 +19,12 @@ It can't be called 'extensions' because that causes namespacing problems.
"""
from oslo_config import cfg
from oslo_log import log as logging
from nova.api.openstack import extensions
import nova.conf
ext_opts = [
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),
]
CONF = cfg.CONF
CONF.register_opts(ext_opts)
CONF = nova.conf.CONF
LOG = logging.getLogger(__name__)

View File

@@ -13,27 +13,16 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from oslo_log import log as logging
from nova.api.openstack import extensions as base_extensions
import nova.conf
from nova.i18n import _LW
STANDARD_EXTENSIONS = ('nova.api.openstack.compute.legacy_v2.contrib.' +
'standard_extensions')
ext_opts = [
cfg.MultiStrOpt(
'osapi_compute_extension',
default=[STANDARD_EXTENSIONS],
help='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),
]
CONF = cfg.CONF
CONF.register_opts(ext_opts)
CONF = nova.conf.CONF
LOG = logging.getLogger(__name__)

View File

@@ -1,26 +0,0 @@
# 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.
import itertools
import nova.api.openstack.compute.legacy_v2.contrib
import nova.api.openstack.compute.legacy_v2.extensions
def list_opts():
return [
('DEFAULT',
itertools.chain(
nova.api.openstack.compute.legacy_v2.contrib.ext_opts,
nova.api.openstack.compute.legacy_v2.extensions.ext_opts,
)),
]

View File

@@ -53,7 +53,7 @@ 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 legacy_api
from nova.conf import libvirt
from nova.conf import mks
# from nova.conf import matchmaker_redis
@@ -128,7 +128,7 @@ ipv6.register_opts(CONF)
ironic.register_opts(CONF)
key_manager.register_opts(CONF)
# keystone_authtoken.register_opts(CONF)
# legacy_api.register_opts(CONF)
legacy_api.register_opts(CONF)
libvirt.register_opts(CONF)
# matchmaker_redis.register_opts(CONF)
# metadata.register_opts(CONF)

47
nova/conf/legacy_api.py Normal file
View File

@@ -0,0 +1,47 @@
# 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}

View File

@@ -25,8 +25,6 @@ from nova.tests.unit import fake_network
from nova.tests.unit import fake_utils
CONF = nova.conf.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
# API samples heavily uses testscenarios. This allows us to use the
# same tests, with slight variations in configuration to ensure our

View File

@@ -13,14 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
from nova.tests.unit.image import fake
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class AccessIPsSampleJsonTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class AdminActionsSamplesJsonTest(test_servers.ServersSampleBase):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class AdminPasswordJsonTest(test_servers.ServersSampleBase):

View File

@@ -13,14 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.db.sqlalchemy import models
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class AgentsJsonTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class AggregatesSampleJsonTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -12,14 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
from nova.tests.unit.api.openstack import fakes
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class AssistedVolumeSnapshotsJsonTests(test_servers.ServersSampleBase):

View File

@@ -13,16 +13,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova import exception
from nova.network import api as network_api
from nova.tests.functional.api_sample_tests import test_servers
from nova.tests.unit import fake_network_cache_model
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class AttachInterfacesSampleJsonTest(test_servers.ServersSampleBase):

View File

@@ -16,8 +16,6 @@ import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = nova.conf.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
class AvailabilityZoneJsonTest(test_servers.ServersSampleBase):

View File

@@ -14,13 +14,10 @@
import mock
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class FakeNode(object):

View File

@@ -13,14 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
from nova.tests.unit.api.openstack import fakes
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class BlockDeviceMappingV1BootJsonTest(test_servers.ServersSampleBase):

View File

@@ -23,8 +23,6 @@ from nova import exception
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = nova.conf.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
class CellsSampleJsonTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -13,14 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
from nova.tests.unit import fake_crypto
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class CertificatesSamplesJsonTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -14,16 +14,13 @@
import uuid as uuid_lib
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
from nova.tests.unit.image import fake
CONF = cfg.CONF
CONF = nova.conf.CONF
CONF.import_opt('vpn_image_id', 'nova.cloudpipe.pipelib')
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
class CloudPipeSampleTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -13,15 +13,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
from nova.tests.unit.api.openstack import fakes
from nova.tests.unit.image import fake
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class ConfigDriveSampleJsonTest(test_servers.ServersSampleBase):

View File

@@ -14,14 +14,12 @@
import re
from oslo_config import cfg
from oslo_serialization import jsonutils
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class ConsoleAuthTokensSampleJsonTests(test_servers.ServersSampleBase):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class ConsoleOutputSampleJsonTest(test_servers.ServersSampleBase):

View File

@@ -13,16 +13,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import mock
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
from nova.tests.unit.image import fake
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class CreateBackupSamplesJsonTest(test_servers.ServersSampleBase):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class DeferredDeleteSampleJsonTests(test_servers.ServersSampleBase):

View File

@@ -13,14 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
from nova.tests.unit.image import fake
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class DiskConfigJsonTest(test_servers.ServersSampleBase):

View File

@@ -14,13 +14,11 @@
# under the License.
import mock
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class EvacuateJsonTest(test_servers.ServersSampleBase):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class ExtendedAvailabilityZoneJsonTests(test_servers.ServersSampleBase):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class ExtendedServerAttributesJsonTest(test_servers.ServersSampleBase):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class ExtendedStatusSampleJsonTests(test_servers.ServersSampleBase):

View File

@@ -13,14 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
from nova.tests.unit.api.openstack import fakes
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class ExtendedVolumesSampleJsonTests(test_servers.ServersSampleBase):

View File

@@ -12,16 +12,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova import exception
from nova.tests.functional.api_sample_tests import test_servers
from nova.tests.unit.objects import test_network
from nova.tests.unit import utils as test_utils
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class FixedIpTest(test_servers.ServersSampleBase):

View File

@@ -12,13 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class FlavorAccessTestsBase(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class FlavorExtraSpecsSampleJsonTests(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class FlavorManageSampleJsonTests(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class FlavorRxtxJsonTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class FlavorsSampleJsonTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -12,13 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class FloatingIpDNSTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -12,13 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class FloatingIPPoolsSampleTests(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -18,8 +18,6 @@ from nova import context
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = nova.conf.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
class FloatingIpsTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -18,8 +18,6 @@ from nova import context
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = nova.conf.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
class FloatingIpsBulkTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -13,14 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
from nova.tests.unit.api.openstack.compute import test_fping
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class FpingSampleJsonTests(test_servers.ServersSampleBase):

View File

@@ -18,8 +18,6 @@ import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = nova.conf.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
class ServersSampleHideAddressesJsonTest(test_servers.ServersSampleJsonTest):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class HostsSampleJsonTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -14,15 +14,13 @@
# under the License.
import mock
from oslo_config import cfg
from nova.cells import utils as cells_utils
import nova.conf
from nova import objects
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class HypervisorsSampleJsonTests(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -13,14 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
from nova.tests.unit.image import fake
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class ImagesSampleJsonTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -15,17 +15,15 @@
import copy
from oslo_config import cfg
import six
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
from nova.tests.unit import fake_instance
from nova.tests.unit import fake_server_actions
from nova.tests.unit import utils as test_utils
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class ServerActionsSampleJsonTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -15,13 +15,10 @@
import urllib
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class InstanceUsageAuditLogJsonTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -15,15 +15,12 @@
import uuid
from oslo_config import cfg
import nova.conf
from nova.objects import keypair as keypair_obj
from nova.tests.functional.api_sample_tests import api_sample_base
from nova.tests.unit import fake_crypto
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class KeyPairsSampleJsonTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class LimitsSampleJsonTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class LockServerSamplesJsonTest(test_servers.ServersSampleBase):

View File

@@ -14,14 +14,12 @@
# under the License.
import mock
from oslo_config import cfg
from oslo_utils import versionutils
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class MigrateServerSamplesJsonTest(test_servers.ServersSampleBase):

View File

@@ -15,15 +15,12 @@
import datetime
from oslo_config import cfg
import nova.conf
from nova import context
from nova import objects
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
# NOTE(ShaoHe Feng) here I can not use uuidsentinel, it generate a random

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class MultinicSampleJsonTest(test_servers.ServersSampleBase):

View File

@@ -13,14 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
from nova.tests.unit.image import fake
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class MultipleCreateJsonTest(test_servers.ServersSampleBase):

View File

@@ -13,14 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
from nova.tests.unit.api.openstack.compute import test_networks
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class NetworksJsonTests(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class NetworksAssociateJsonTests(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class PauseServerSamplesJsonTest(test_servers.ServersSampleBase):

View File

@@ -12,15 +12,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from nova.compute import api as compute_api
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
from nova.tests.unit.image import fake
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class PreserveEphemeralOnRebuildJsonTest(test_servers.ServersSampleBase):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class QuotaClassesSampleJsonTests(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class QuotaSetsSampleJsonTests(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class ConsolesSampleJsonTests(test_servers.ServersSampleBase):

View File

@@ -13,14 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class RescueJsonTest(test_servers.ServersSampleBase):

View File

@@ -15,14 +15,11 @@
import uuid
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
from nova.tests.unit.image import fake
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class SchedulerHintsJsonTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -12,13 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class SecurityGroupDefaultRulesSampleJsonTest(

View File

@@ -13,14 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
import nova.tests.functional.api_samples_test_base as astb
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
def fake_get(*args, **kwargs):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class ServerDiagnosticsSamplesJsonTest(test_servers.ServersSampleBase):

View File

@@ -12,13 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class ServerExternalEventsSamplesJsonTest(test_servers.ServersSampleBase):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class ServerGroupsSampleJsonTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class ServersMetadataJsonTest(test_servers.ServersSampleBase):

View File

@@ -13,13 +13,11 @@
# under the License.
import mock
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class ServerPasswordSampleJsonTests(test_servers.ServersSampleBase):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class ServerUsageSampleJsonTest(test_servers.ServersSampleBase):

View File

@@ -13,14 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
from nova.tests.unit.image import fake
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class ServersSampleBase(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class ServersIpsJsonTest(test_servers.ServersSampleBase):

View File

@@ -13,16 +13,14 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from oslo_utils import fixture as utils_fixture
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
from nova.tests.unit.api.openstack.compute import test_services
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class ServicesJsonTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -18,8 +18,6 @@ import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = nova.conf.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
class ShelveJsonTest(test_servers.ServersSampleBase):

View File

@@ -15,15 +15,13 @@
import datetime
import urllib
from oslo_config import cfg
from oslo_utils import timeutils
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
import nova.tests.functional.api_samples_test_base as astb
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class SimpleTenantUsageSampleJsonTest(test_servers.ServersSampleBase):

View File

@@ -12,13 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class SuspendServerSamplesJsonTest(test_servers.ServersSampleBase):

View File

@@ -14,17 +14,12 @@
# under the License.
from oslo_config import cfg
from oslo_serialization import jsonutils
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('enable_network_quota',
'nova.api.openstack.compute.legacy_v2.contrib.'
'os_tenant_networks')
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class TenantNetworksJsonTests(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class UsedLimitsSamplesJsonTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -14,14 +14,12 @@
# under the License.
import base64
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import api_sample_base
from nova.tests.unit.image import fake
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class UserDataJsonTest(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -13,13 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import nova.conf
from nova.tests.functional.api_sample_tests import test_servers
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class VirtualInterfacesJsonTest(test_servers.ServersSampleBase):

View File

@@ -13,10 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import datetime
import nova.conf
from nova import context
from nova import objects
from nova.tests.functional.api_sample_tests import api_sample_base
@@ -25,9 +24,7 @@ from nova.tests.unit.api.openstack import fakes
from nova.tests.unit import fake_block_device
from nova.tests.unit import fake_instance
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
'nova.api.openstack.compute.legacy_v2.extensions')
CONF = nova.conf.CONF
class SnapshotsSampleJsonTests(api_sample_base.ApiSampleTestBaseV21):

View File

@@ -15,8 +15,6 @@
import mock
from oslo_config import cfg
from nova.api.metadata import password
from nova.api.openstack.compute import server_password \
as server_password_v21
@@ -27,9 +25,6 @@ from nova.tests.unit.api.openstack import fakes
from nova.tests.unit import fake_instance
CONF = cfg.CONF
class ServerPasswordTestV21(test.NoDBTestCase):
content_type = 'application/json'
server_password = server_password_v21

View File

@@ -28,7 +28,6 @@ packages =
oslo.config.opts =
nova = nova.opts:list_opts
nova.conf = nova.conf.opts:list_opts
nova.api = nova.api.opts:list_opts
nova.cells = nova.cells.opts:list_opts
nova.compute = nova.compute.opts:list_opts
nova.network.neutronv2 = nova.network.neutronv2.api:list_opts