Remove SERVICE_NAMES

The rest of services listed in the SERVICE_NAMES got
a class implementation under config_tempest/services
directory in order to remove the hardcoded list of
services - SERVICE_NAMES.

Story: 2002787
Task: 29693

Change-Id: Ibc58236b581551f64dfaf21fb443ed8c1cc1282b
changes/65/640865/4
Martin Kopec 4 years ago
parent 33e39f3606
commit e312be824d
  1. 16
      config_tempest/constants.py
  2. 33
      config_tempest/services/alarming.py
  3. 27
      config_tempest/services/baremetal.py
  4. 27
      config_tempest/services/data-processing.py
  5. 27
      config_tempest/services/database.py
  6. 27
      config_tempest/services/event.py
  7. 27
      config_tempest/services/messaging.py
  8. 27
      config_tempest/services/metric.py
  9. 27
      config_tempest/services/orchestration.py
  10. 18
      config_tempest/services/services.py
  11. 27
      config_tempest/services/telemetry.py
  12. 27
      config_tempest/services/workflowv2.py

@ -42,19 +42,3 @@ ALL_CREDENTIALS_KEYS = {
"identity.alt_project_name": [],
"identity.admin_domain_name": [],
}
# services, which don't have their own class implemented under
# config_tempest/services, and their codenames
# NOTE: if a service from the dict below gets implementation under
# config_tempest/services it should be removed from the list
SERVICE_NAMES = {
'baremetal': 'ironic',
'database': 'trove',
'data-processing': 'sahara',
'orchestration': 'heat',
'telemetry': 'ceilometer',
'messaging': 'zaqar',
'metric': 'gnocchi',
'event': 'panko',
'workflowv2': 'mistral',
}

@ -0,0 +1,33 @@
# Copyright 2019 Red Hat, Inc.
# 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 config_tempest.services.base import Service
class AlarmingService(Service):
def set_availability(self, conf, available):
# TODO(arxcruz): Remove this once/if we get the following reviews
# merged in all branches supported by tempestconf, or once/if
# tempestconf do not support anymore the OpenStack release where
# those patches are not available.
# https://review.openstack.org/#/c/492526/
# https://review.openstack.org/#/c/492525/
conf.set('service_available', 'aodh', str(available))
conf.set('service_available', 'aodh_plugin', str(available))
@staticmethod
def get_service_name():
return ['aodh']

@ -0,0 +1,27 @@
# Copyright 2019 Red Hat, Inc.
# 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 config_tempest.services.base import Service
class BaremetalService(Service):
@staticmethod
def get_service_name():
return ['ironic']
@staticmethod
def get_codename():
return 'ironic'

@ -0,0 +1,27 @@
# Copyright 2019 Red Hat, Inc.
# 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 config_tempest.services.base import Service
class DataProcessingService(Service):
@staticmethod
def get_service_name():
return ['sahara']
@staticmethod
def get_codename():
return 'sahara'

@ -0,0 +1,27 @@
# Copyright 2019 Red Hat, Inc.
# 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 config_tempest.services.base import Service
class DatabaseService(Service):
@staticmethod
def get_service_name():
return ['trove']
@staticmethod
def get_codename():
return 'trove'

@ -0,0 +1,27 @@
# Copyright 2019 Red Hat, Inc.
# 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 config_tempest.services.base import Service
class EventService(Service):
@staticmethod
def get_service_name():
return ['panko']
@staticmethod
def get_codename():
return 'panko'

@ -0,0 +1,27 @@
# Copyright 2019 Red Hat, Inc.
# 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 config_tempest.services.base import Service
class MessagingService(Service):
@staticmethod
def get_service_name():
return ['zaqar']
@staticmethod
def get_codename():
return 'zaqar'

@ -0,0 +1,27 @@
# Copyright 2019 Red Hat, Inc.
# 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 config_tempest.services.base import Service
class MetricService(Service):
@staticmethod
def get_service_name():
return ['gnocchi']
@staticmethod
def get_codename():
return 'gnocchi'

@ -0,0 +1,27 @@
# Copyright 2019 Red Hat, Inc.
# 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 config_tempest.services.base import Service
class OrchestrationService(Service):
@staticmethod
def get_service_name():
return ['heat']
@staticmethod
def get_codename():
return 'heat'

@ -232,24 +232,6 @@ class Services(object):
horizon.configure_horizon(self._conf)
for service, codename in C.SERVICE_NAMES.items():
# ceilometer is still transitioning from metering to telemetry
if service == 'telemetry' and self.is_service('metering'):
service = 'metering'
available = str(self.is_service(service))
self._conf.set('service_available', codename, available)
# TODO(arxcruz): Remove this once/if we get the following reviews
# merged in all branches supported by tempestconf, or once/if
# tempestconf do not support anymore the OpenStack release where
# those patches are not available.
# https://review.openstack.org/#/c/492526/
# https://review.openstack.org/#/c/492525/
if self.is_service('alarming'):
self._conf.set('service_available', 'aodh', 'True')
self._conf.set('service_available', 'aodh_plugin', 'True')
# TODO(arxcruz): This should be set in compute service, not here,
# however, it requires a refactor in the code, which is not our
# goal right now

@ -0,0 +1,27 @@
# Copyright 2019 Red Hat, Inc.
# 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 config_tempest.services.base import Service
class TelemetryService(Service):
@staticmethod
def get_service_name():
return ['ceilometer']
@staticmethod
def get_codename():
return 'ceilometer'

@ -0,0 +1,27 @@
# Copyright 2019 Red Hat, Inc.
# 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 config_tempest.services.base import Service
class Workflowv2Service(Service):
@staticmethod
def get_service_name():
return ['mistral']
@staticmethod
def get_codename():
return 'mistral'
Loading…
Cancel
Save