Deprecate api_extensions of compute service

The patch removes setting compute_feature_enabled.api_extensions
from tempest.conf as the extensions have been deprecated since
Tempest 14.0.

Story: 2005794
Task: 33521

Change-Id: I118c4ac1eac43db6b99605e830467b386be7c0b3
This commit is contained in:
Martin Kopec 2019-06-10 08:42:51 +00:00
parent 9d67bf760d
commit aa204351a0
5 changed files with 20 additions and 22 deletions

View File

@ -22,11 +22,6 @@ from config_tempest.services.base import VersionedService
class ComputeService(VersionedService): class ComputeService(VersionedService):
def set_extensions(self):
body = self.do_get(self.service_url + '/extensions')
body = json.loads(body)
self.extensions = list(map(lambda x: x['alias'], body['extensions']))
def set_versions(self): def set_versions(self):
url, top_level = self.no_port_cut_url() url, top_level = self.no_port_cut_url()
body = self.do_get(url, top_level=top_level) body = self.do_get(url, top_level=top_level)
@ -47,9 +42,6 @@ class ComputeService(VersionedService):
conf.set('compute', 'min_microversion', m_versions['min_microversion']) conf.set('compute', 'min_microversion', m_versions['min_microversion'])
conf.set('compute', 'max_microversion', m_versions['max_microversion']) conf.set('compute', 'max_microversion', m_versions['max_microversion'])
def get_service_extension_key(self):
return 'api_extensions'
def _get_number_of_hosts(self): def _get_number_of_hosts(self):
# Right now the client returned is hosts, in the future # Right now the client returned is hosts, in the future
# change it to a dict, and get the client as requested # change it to a dict, and get the client as requested

View File

@ -30,7 +30,7 @@ class TestComputeService(BaseServiceTest):
disable_ssl_validation=False) disable_ssl_validation=False)
def test_set_get_extensions(self): def test_set_get_extensions(self):
exp_resp = ['NMN', 'OS-DCF'] exp_resp = []
self._set_get_extensions(self.Service, exp_resp, self.FAKE_EXTENSIONS) self._set_get_extensions(self.Service, exp_resp, self.FAKE_EXTENSIONS)
def test_set_get_versions(self): def test_set_get_versions(self):

View File

@ -80,19 +80,19 @@ Generating a sample profile.yaml file
verbose: false verbose: false
append: {} append: {}
#identity.username: username #identity.username: username
#compute-feature-enabled.api_extensions: #network-feature-enabled.api_extensions:
# - dvr # - dvr
# - extension # - extension
overrides: {} overrides: {}
#identity.username: username #identity.username: username
#identity.password: #identity.password:
# - my_password # - my_password
#compute-feature-enabled.api_extensions: #network-feature-enabled.api_extensions:
# - dvr # - dvr
# - extension # - extension
remove: {} remove: {}
#identity.username: username #identity.username: username
#compute-feature-enabled.api_extensions: #network-feature-enabled.api_extensions:
# - dvr # - dvr
# - extension # - extension
@ -117,11 +117,11 @@ what suits you better, either strings or lists:
identity.username: my_override identity.username: my_override
identity.password: my_password identity.password: my_password
network-feature-enabled.api_extensions: all network-feature-enabled.api_extensions: all
compute-feature-enabled.api_extensions: dvr,mine volume-feature-enabled.api_extensions: dvr,mine
remove: remove:
auth.identity: username auth.identity: username
network-feature-enabled.api_extensions: '' network-feature-enabled.api_extensions: ''
compute-feature-enabled.api_extensions: dvr,mine volume-feature-enabled.api_extensions: dvr,mine
.. code-block:: yaml .. code-block:: yaml
@ -136,14 +136,14 @@ what suits you better, either strings or lists:
- my_password - my_password
network-feature-enabled.api_extensions: network-feature-enabled.api_extensions:
- all - all
compute-feature-enabled.api_extensions: volume-feature-enabled.api_extensions:
- dvr - dvr
- mine - mine
remove: remove:
auth.identity: username auth.identity: username
network-feature-enabled.api_extensions: network-feature-enabled.api_extensions:
- '' - ''
compute-feature-enabled.api_extensions: volume-feature-enabled.api_extensions:
- dvr - dvr
- mine - mine

View File

@ -128,12 +128,12 @@ if they were discovered or not.
In the following case **all** api_extensions will be removed and In the following case **all** api_extensions will be removed and
``tempest.conf`` will **not contain** the api_extensions key under ``tempest.conf`` will **not contain** the api_extensions key under
compute-feature-enabled section. volume-feature-enabled section.
.. code-block:: shell-session .. code-block:: shell-session
$ discover-tempest-config \ $ discover-tempest-config \
--remove compute-feature-enabled.api_extensions --remove volume-feature-enabled.api_extensions
In the following case **only** NMN api extension will be removed from the In the following case **only** NMN api extension will be removed from the
api_extensions list. api_extensions list.
@ -141,7 +141,7 @@ api_extensions list.
.. code-block:: shell-session .. code-block:: shell-session
$ discover-tempest-config \ $ discover-tempest-config \
--remove compute-feature-enabled.api_extensions=NMN --remove volume-feature-enabled.api_extensions=NMN
In the following case only NMN **and** OS-EXT-IPS api extensions will be In the following case only NMN **and** OS-EXT-IPS api extensions will be
removed. removed.
@ -149,7 +149,7 @@ removed.
.. code-block:: shell-session .. code-block:: shell-session
$ discover-tempest-config \ $ discover-tempest-config \
--remove compute-feature-enabled.api_extensions=NMN,OS-EXT-IPS --remove volume-feature-enabled.api_extensions=NMN,OS-EXT-IPS
.. note:: .. note::
@ -171,13 +171,13 @@ api_extensions, you can make ``python-tempestconf`` append any extensions
by using ``--append`` argument. by using ``--append`` argument.
The following will make ``python-tempestconf`` append my_ext extension to The following will make ``python-tempestconf`` append my_ext extension to
compute-feature-enabled.api_extensions and tag and tag-ext extensions to volume-feature-enabled.api_extensions and tag and tag-ext extensions to
network-feature-enabled.api_extensions. network-feature-enabled.api_extensions.
.. code-block:: shell-session .. code-block:: shell-session
$ discover-tempest-config \ $ discover-tempest-config \
--append compute-feature-enabled.api_extensions=my_ext \ --append volume-feature-enabled.api_extensions=my_ext \
--append network-feature-enabled.api_extensions=tag,tag-ext --append network-feature-enabled.api_extensions=tag,tag-ext
.. note:: .. note::

View File

@ -0,0 +1,6 @@
---
deprecations:
- |
The *api_extensions* config option in the *compute-feature-enabled* group has
been deprecated since Tempest 14.0. Therefore the option will be no longer
set by python-tempestconf.