Remove deprecated scenario img_dir option

It's time to remove deprecated CONF.scenario.img_dir which got
deprecated in the 25.0.0 tag.

Change-Id: I86ad219265a67a1c016e8efe04677993a0437ede
Closes-Bug: #1393881
This commit is contained in:
Martin Kopec 2020-09-29 08:12:39 +00:00
parent a66fecdcce
commit 008950efa4
3 changed files with 10 additions and 13 deletions

View File

@ -0,0 +1,8 @@
---
upgrade:
- |
img_dir scenario option has been deprecated and it's being removed.
Starting Tempest 25.0.0 release, CONF.scenario.img_file needs a full path
for the image. Until this release, old behavior was maintained and kept
working however a user needs to specify the full path in
CONF.scenario.img_file config option from now on.

View File

@ -1150,12 +1150,6 @@ ObjectStoreFeaturesGroup = [
scenario_group = cfg.OptGroup(name='scenario', title='Scenario Test Options')
ScenarioGroup = [
cfg.StrOpt('img_dir',
default='/opt/stack/new/devstack/files/images/'
'cirros-0.3.1-x86_64-uec',
help='Directory containing image files, this has been '
'deprecated - img_file option contains a full path now.',
deprecated_for_removal=True),
cfg.StrOpt('img_file', deprecated_name='qcow2_img_file',
default='/opt/stack/new/devstack/files/images'
'/cirros-0.3.1-x86_64-disk.img',

View File

@ -610,18 +610,13 @@ class ScenarioTest(tempest.test.BaseTestCase):
def image_create(self, name='scenario-img', **kwargs):
img_path = CONF.scenario.img_file
if not os.path.exists(img_path):
# TODO(kopecmartin): replace LOG.warning for rasing
# InvalidConfiguration exception after tempest 25.0.0 is
# released - there will be one release which accepts both
# behaviors in order to avoid many failures across CIs and etc.
LOG.warning(
lib_exc.InvalidConfiguration(
'Starting Tempest 25.0.0 release, CONF.scenario.img_file need '
'a full path for the image. CONF.scenario.img_dir was '
'deprecated and will be removed in the next release. Till '
'Tempest 25.0.0, old behavior is maintained and keep working '
'Tempest 25.0.0, old behavior was maintained and kept working '
'but starting Tempest 26.0.0, you need to specify the full '
'path in CONF.scenario.img_file config option.')
img_path = os.path.join(CONF.scenario.img_dir, img_path)
img_container_format = CONF.scenario.img_container_format
img_disk_format = CONF.scenario.img_disk_format
img_properties = CONF.scenario.img_properties