Remove deprecated 'orchestration' config group options

'orchestration' config group options were deprecated in
Id0f69f3b60cbb4f4a1f1fa7e18c7700490d6656a

And heat tests also been removed from tempest
- Ifc2cac575919da4e361eaa3234d7e0f3e2f98d21

Now we can remove these deprecated config options.

Cleaning up heat related things in account_generator,
cleanup_service etc.

Change-Id: I1c02fd88c3d93b511ff4a6b54b668ebd306481a9
This commit is contained in:
ghanshyam 2017-12-10 12:51:42 +03:00
parent 4acc05b56b
commit 6283daa5ad
7 changed files with 8 additions and 121 deletions

View File

@ -8,3 +8,5 @@ upgrade:
* ``[identity-feature-enabled].forbid_global_implied_dsr`` * ``[identity-feature-enabled].forbid_global_implied_dsr``
* ``[image-feature-enabled].deactivate_image`` * ``[image-feature-enabled].deactivate_image``
* ``[default].resources_prefix`` * ``[default].resources_prefix``
* config group ``orchestration``
* ``[service_available].heat``

View File

@ -162,9 +162,7 @@ def generate_resources(cred_provider, admin):
if CONF.service_available.swift: if CONF.service_available.swift:
spec.append([CONF.object_storage.operator_role]) spec.append([CONF.object_storage.operator_role])
spec.append([CONF.object_storage.reseller_admin_role]) spec.append([CONF.object_storage.reseller_admin_role])
if CONF.service_available.heat: spec.append([CONF.object_storage.operator_role])
spec.append([CONF.orchestration.stack_owner_role,
CONF.object_storage.operator_role])
if admin: if admin:
spec.append('admin') spec.append('admin')
resources = [] resources = []

View File

@ -37,7 +37,6 @@ CONF_USERS = None
IS_CINDER = None IS_CINDER = None
IS_GLANCE = None IS_GLANCE = None
IS_HEAT = None
IS_NEUTRON = None IS_NEUTRON = None
IS_NOVA = None IS_NOVA = None
@ -60,7 +59,6 @@ def init_conf():
IS_CINDER = CONF.service_available.cinder IS_CINDER = CONF.service_available.cinder
IS_GLANCE = CONF.service_available.glance IS_GLANCE = CONF.service_available.glance
IS_HEAT = CONF.service_available.heat
IS_NEUTRON = CONF.service_available.neutron IS_NEUTRON = CONF.service_available.neutron
IS_NOVA = CONF.service_available.nova IS_NOVA = CONF.service_available.nova
@ -212,33 +210,6 @@ class ServerGroupService(ServerService):
self.data['server_groups'] = sgs self.data['server_groups'] = sgs
class StackService(BaseService):
def __init__(self, manager, **kwargs):
super(StackService, self).__init__(kwargs)
params = config.service_client_config('orchestration')
self.client = manager.orchestration.OrchestrationClient(
manager.auth_provider, **params)
def list(self):
client = self.client
stacks = client.list_stacks()['stacks']
LOG.debug("List count, %s Stacks", len(stacks))
return stacks
def delete(self):
client = self.client
stacks = self.list()
for stack in stacks:
try:
client.delete_stack(stack['id'])
except Exception:
LOG.exception("Delete Stack exception.")
def dry_run(self):
stacks = self.list()
self.data['stacks'] = stacks
class KeyPairService(BaseService): class KeyPairService(BaseService):
def __init__(self, manager, **kwargs): def __init__(self, manager, **kwargs):
super(KeyPairService, self).__init__(kwargs) super(KeyPairService, self).__init__(kwargs)
@ -960,8 +931,6 @@ def get_project_cleanup_services():
if not IS_NEUTRON: if not IS_NEUTRON:
project_services.append(FloatingIpService) project_services.append(FloatingIpService)
project_services.append(NovaQuotaService) project_services.append(NovaQuotaService)
if IS_HEAT:
project_services.append(StackService)
if IS_NEUTRON: if IS_NEUTRON:
project_services.append(NetworkFloatingIpService) project_services.append(NetworkFloatingIpService)
if utils.is_extension_enabled('metering', 'network'): if utils.is_extension_enabled('metering', 'network'):

View File

@ -349,7 +349,6 @@ def check_service_availability(os, update):
'image': 'glance', 'image': 'glance',
'object_storage': 'swift', 'object_storage': 'swift',
'compute': 'nova', 'compute': 'nova',
'orchestration': 'heat',
'baremetal': 'ironic', 'baremetal': 'ironic',
'identity': 'keystone', 'identity': 'keystone',
} }

View File

@ -65,9 +65,7 @@ AuthGroup = [
deprecated_opts=[cfg.DeprecatedOpt('allow_tenant_isolation', deprecated_opts=[cfg.DeprecatedOpt('allow_tenant_isolation',
group='auth'), group='auth'),
cfg.DeprecatedOpt('allow_tenant_isolation', cfg.DeprecatedOpt('allow_tenant_isolation',
group='compute'), group='compute')]),
cfg.DeprecatedOpt('allow_tenant_isolation',
group='orchestration')]),
cfg.ListOpt('tempest_roles', cfg.ListOpt('tempest_roles',
help="Roles to assign to all users created by tempest", help="Roles to assign to all users created by tempest",
default=[]), default=[]),
@ -909,66 +907,6 @@ ObjectStoreFeaturesGroup = [
help="Execute discoverability tests"), help="Execute discoverability tests"),
] ]
orchestration_group = cfg.OptGroup(name='orchestration',
title='Orchestration Service Options')
OrchestrationGroup = [
cfg.StrOpt('catalog_type',
default='orchestration',
help="Catalog type of the Orchestration service.",
deprecated_for_removal=True,
deprecated_reason='Heat support will be removed from Tempest'),
cfg.StrOpt('region',
default='',
help="The orchestration region name to use. If empty, the "
"value of identity.region is used instead. If no such "
"region is found in the service catalog, the first found "
"one is used.",
deprecated_for_removal=True,
deprecated_reason='Heat support will be removed from Tempest'),
cfg.StrOpt('endpoint_type',
default='publicURL',
choices=['public', 'admin', 'internal',
'publicURL', 'adminURL', 'internalURL'],
help="The endpoint type to use for the orchestration service.",
deprecated_for_removal=True,
deprecated_reason='Heat support will be removed from Tempest'),
cfg.StrOpt('stack_owner_role', default='heat_stack_owner',
help='Role required for users to be able to manage stacks',
deprecated_for_removal=True,
deprecated_reason='Heat support will be removed from Tempest'),
cfg.IntOpt('build_interval',
default=1,
help="Time in seconds between build status checks.",
deprecated_for_removal=True,
deprecated_reason='Heat support will be removed from Tempest'),
cfg.IntOpt('build_timeout',
default=1200,
help="Timeout in seconds to wait for a stack to build.",
deprecated_for_removal=True,
deprecated_reason='Heat support will be removed from Tempest'),
cfg.StrOpt('instance_type',
default='m1.micro',
help="Instance type for tests. Needs to be big enough for a "
"full OS plus the test workload",
deprecated_for_removal=True,
deprecated_reason='Heat support will be removed from Tempest'),
cfg.StrOpt('keypair_name',
help="Name of existing keypair to launch servers with.",
deprecated_for_removal=True,
deprecated_reason='Heat support will be removed from Tempest'),
cfg.IntOpt('max_template_size',
default=524288,
help="Value must match heat configuration of the same name.",
deprecated_for_removal=True,
deprecated_reason='Heat support will be removed from Tempest'),
cfg.IntOpt('max_resources_per_stack',
default=1000,
help="Value must match heat configuration of the same name.",
deprecated_for_removal=True,
deprecated_reason='Heat support will be removed from Tempest'),
]
scenario_group = cfg.OptGroup(name='scenario', title='Scenario Test Options') scenario_group = cfg.OptGroup(name='scenario', title='Scenario Test Options')
@ -1030,11 +968,6 @@ ServiceAvailableGroup = [
cfg.BoolOpt('nova', cfg.BoolOpt('nova',
default=True, default=True,
help="Whether or not nova is expected to be available"), help="Whether or not nova is expected to be available"),
cfg.BoolOpt('heat',
default=False,
help="Whether or not Heat is expected to be available",
deprecated_for_removal=True,
deprecated_reason='Heat support will be removed from Tempest'),
] ]
debug_group = cfg.OptGroup(name="debug", debug_group = cfg.OptGroup(name="debug",
@ -1091,7 +1024,6 @@ _opts = [
(volume_feature_group, VolumeFeaturesGroup), (volume_feature_group, VolumeFeaturesGroup),
(object_storage_group, ObjectStoreGroup), (object_storage_group, ObjectStoreGroup),
(object_storage_feature_group, ObjectStoreFeaturesGroup), (object_storage_feature_group, ObjectStoreFeaturesGroup),
(orchestration_group, OrchestrationGroup),
(scenario_group, ScenarioGroup), (scenario_group, ScenarioGroup),
(service_available_group, ServiceAvailableGroup), (service_available_group, ServiceAvailableGroup),
(debug_group, DebugGroup), (debug_group, DebugGroup),
@ -1158,7 +1090,6 @@ class TempestConfigPrivate(object):
self.object_storage = _CONF['object-storage'] self.object_storage = _CONF['object-storage']
self.object_storage_feature_enabled = _CONF[ self.object_storage_feature_enabled = _CONF[
'object-storage-feature-enabled'] 'object-storage-feature-enabled']
self.orchestration = _CONF.orchestration
self.scenario = _CONF.scenario self.scenario = _CONF.scenario
self.service_available = _CONF.service_available self.service_available = _CONF.service_available
self.debug = _CONF.debug self.debug = _CONF.debug

View File

@ -153,17 +153,14 @@ class TestGenerateResourcesV2(base.TestCase, MockHelpersMixin):
def test_generate_resources_no_admin(self): def test_generate_resources_no_admin(self):
cfg.CONF.set_default('swift', False, group='service_available') cfg.CONF.set_default('swift', False, group='service_available')
cfg.CONF.set_default('heat', False, group='service_available')
cfg.CONF.set_default('operator_role', 'fake_operator', cfg.CONF.set_default('operator_role', 'fake_operator',
group='object-storage') group='object-storage')
cfg.CONF.set_default('reseller_admin_role', 'fake_reseller', cfg.CONF.set_default('reseller_admin_role', 'fake_reseller',
group='object-storage') group='object-storage')
cfg.CONF.set_default('stack_owner_role', 'fake_owner',
group='orchestration')
resources = account_generator.generate_resources( resources = account_generator.generate_resources(
self.cred_provider, admin=False) self.cred_provider, admin=False)
resource_types = [k for k, _ in resources] resource_types = [k for k, _ in resources]
# No admin, no heat, no swift, expect two credentials only # No admin, no swift, expect two credentials only
self.assertEqual(2, len(resources)) self.assertEqual(2, len(resources))
# Ensure create_user was invoked twice (two distinct users) # Ensure create_user was invoked twice (two distinct users)
self.assertEqual(2, self.user_create_fixture.mock.call_count) self.assertEqual(2, self.user_create_fixture.mock.call_count)
@ -180,17 +177,14 @@ class TestGenerateResourcesV2(base.TestCase, MockHelpersMixin):
def test_generate_resources_admin(self): def test_generate_resources_admin(self):
cfg.CONF.set_default('swift', False, group='service_available') cfg.CONF.set_default('swift', False, group='service_available')
cfg.CONF.set_default('heat', False, group='service_available')
cfg.CONF.set_default('operator_role', 'fake_operator', cfg.CONF.set_default('operator_role', 'fake_operator',
group='object-storage') group='object-storage')
cfg.CONF.set_default('reseller_admin_role', 'fake_reseller', cfg.CONF.set_default('reseller_admin_role', 'fake_reseller',
group='object-storage') group='object-storage')
cfg.CONF.set_default('stack_owner_role', 'fake_owner',
group='orchestration')
resources = account_generator.generate_resources( resources = account_generator.generate_resources(
self.cred_provider, admin=True) self.cred_provider, admin=True)
resource_types = [k for k, _ in resources] resource_types = [k for k, _ in resources]
# Admin, no heat, no swift, expect three credentials only # Admin, no swift, expect three credentials only
self.assertEqual(3, len(resources)) self.assertEqual(3, len(resources))
# Ensure create_user was invoked 3 times (3 distinct users) # Ensure create_user was invoked 3 times (3 distinct users)
self.assertEqual(3, self.user_create_fixture.mock.call_count) self.assertEqual(3, self.user_create_fixture.mock.call_count)
@ -205,28 +199,24 @@ class TestGenerateResourcesV2(base.TestCase, MockHelpersMixin):
self.assertIsNotNone(resource[1].router) self.assertIsNotNone(resource[1].router)
self.assertIsNotNone(resource[1].subnet) self.assertIsNotNone(resource[1].subnet)
def test_generate_resources_swift_heat_admin(self): def test_generate_resources_swift_admin(self):
cfg.CONF.set_default('swift', True, group='service_available') cfg.CONF.set_default('swift', True, group='service_available')
cfg.CONF.set_default('heat', True, group='service_available')
cfg.CONF.set_default('operator_role', 'fake_operator', cfg.CONF.set_default('operator_role', 'fake_operator',
group='object-storage') group='object-storage')
cfg.CONF.set_default('reseller_admin_role', 'fake_reseller', cfg.CONF.set_default('reseller_admin_role', 'fake_reseller',
group='object-storage') group='object-storage')
cfg.CONF.set_default('stack_owner_role', 'fake_owner',
group='orchestration')
resources = account_generator.generate_resources( resources = account_generator.generate_resources(
self.cred_provider, admin=True) self.cred_provider, admin=True)
resource_types = [k for k, _ in resources] resource_types = [k for k, _ in resources]
# all options on, expect six credentials # all options on, expect six credentials
self.assertEqual(6, len(resources)) self.assertEqual(6, len(resources))
# Ensure create_user was invoked 6 times (6 distinct users) # Ensure create_user was invoked 6 times (6 distinct users)
self.assertEqual(6, self.user_create_fixture.mock.call_count) self.assertEqual(5, self.user_create_fixture.mock.call_count)
self.assertIn('primary', resource_types) self.assertIn('primary', resource_types)
self.assertIn('alt', resource_types) self.assertIn('alt', resource_types)
self.assertIn('admin', resource_types) self.assertIn('admin', resource_types)
self.assertIn(['fake_operator'], resource_types) self.assertIn(['fake_operator'], resource_types)
self.assertIn(['fake_reseller'], resource_types) self.assertIn(['fake_reseller'], resource_types)
self.assertIn(['fake_owner', 'fake_operator'], resource_types)
for resource in resources: for resource in resources:
self.assertIsNotNone(resource[1].network) self.assertIsNotNone(resource[1].network)
self.assertIsNotNone(resource[1].router) self.assertIsNotNone(resource[1].router)
@ -258,7 +248,6 @@ class TestDumpAccountsV2(base.TestCase, MockHelpersMixin):
self.opts) self.opts)
self.mock_resource_creation() self.mock_resource_creation()
cfg.CONF.set_default('swift', True, group='service_available') cfg.CONF.set_default('swift', True, group='service_available')
cfg.CONF.set_default('heat', True, group='service_available')
self.resources = account_generator.generate_resources( self.resources = account_generator.generate_resources(
self.cred_provider, admin=True) self.cred_provider, admin=True)

View File

@ -39,7 +39,6 @@ class ConfigFixture(conf_fixture.Config):
self.conf.set_default('uri_v3', 'http://fake_uri_v3.com/auth', self.conf.set_default('uri_v3', 'http://fake_uri_v3.com/auth',
group='identity') group='identity')
self.conf.set_default('neutron', True, group='service_available') self.conf.set_default('neutron', True, group='service_available')
self.conf.set_default('heat', True, group='service_available')
lock_path = str(os.environ.get('OS_TEST_LOCK_PATH', lock_path = str(os.environ.get('OS_TEST_LOCK_PATH',
os.environ.get('TMPDIR', '/tmp'))) os.environ.get('TMPDIR', '/tmp')))
if not os.path.exists(lock_path): if not os.path.exists(lock_path):