Remove deprecated NovaImages.list_images scenario

This scenario was deprecated in Rally 0.10

Change-Id: I3afb4a4e78a6145ea95b37dfa7d5015ed4ae1a18
This commit is contained in:
Andrey Kurilin 2018-09-26 14:43:18 +03:00
parent cb28d65439
commit 781736cf52
8 changed files with 4 additions and 152 deletions

View File

@ -43,9 +43,9 @@ Changed
* Error messages become more user-friendly in ``rally env check``.
* Deprecate api_info argument of all clients which inherits from OSClient
and deprecate api_version argument of cleanup.manager.cleanup, because
api information has been moved into credentails object.
* `Docker image <https://hub.docker.com/r/xrally/xrally-openstack>`_ now supports
mysql and postgres as db backends.
api information has been moved into credentials object.
* `Docker image <https://hub.docker.com/r/xrally/xrally-openstack>`_ now
supports mysql and postgres as db backends.
Removed
~~~~~~~
@ -59,6 +59,7 @@ Removed
* Remove deprecated properties *insecure*, *cacert* (use *https_insecure* and
*https_cacert* properties instead) and method *list_services* (use
appropriate method of Clients object) of OpenStackCredentials object.
* Remove deprecated in Rally 0.10.0 ``NovaImages.list_images`` scenario.
Fixed
~~~~~

View File

@ -749,19 +749,6 @@
users:
tenants: 2
users_per_tenant: 2
-
title: NovaImages.list_images tests
scenario:
NovaImages.list_images:
detailed: True
runner:
constant:
times: 4
concurrency: 4
contexts:
users:
tenants: 2
users_per_tenant: 1
-
title: NovaKeypair.create_and_delete_keypair tests
workloads:

View File

@ -1,44 +0,0 @@
# Copyright 2015: Workday, 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 rally.common.plugin import plugin
from rally.task import validation
from rally_openstack import consts
from rally_openstack import scenario
from rally_openstack.scenarios.nova import utils
"""Scenarios for Nova images."""
@plugin.deprecated("The image proxy-interface was removed from Nova-API. Use "
"Glance related scenarios instead "
"(i.e GlanceImages.list_images.", rally_version="0.10.0")
@validation.add("required_services", services=[consts.Service.NOVA])
@validation.add("required_platform", platform="openstack", users=True)
@scenario.configure(name="NovaImages.list_images", platform="openstack")
class ListImages(utils.NovaScenario):
def run(self, detailed=True, **kwargs):
"""[DEPRECATED] List all images.
Measure the "nova image-list" command performance.
:param detailed: True if the image listing
should contain detailed information
:param kwargs: Optional additional arguments for image listing
"""
self._list_images(detailed, **kwargs)

View File

@ -510,22 +510,6 @@ class NovaScenario(scenario.OpenStackScenario):
)
return image
@atomic.action_timer("nova.list_images")
def _list_images(self, detailed=False, **kwargs):
"""List all images.
:param detailed: True if the image listing
should contain detailed information
:param kwargs: Optional additional arguments for image listing
:returns: Image list
"""
LOG.warning("Method '_delete_image' of NovaScenario class is "
"deprecated since Rally 0.10.0. Use GlanceUtils instead.")
glance = image_service.Image(self._clients,
atomic_inst=self.atomic_actions())
return glance.list_images()
@atomic.action_timer("nova.get_keypair")
def _get_keypair(self, keypair):
"""Get a keypair.

View File

@ -1,25 +0,0 @@
{
"NovaImages.list_images": [
{
"runner": {
"type": "constant",
"concurrency": 2,
"times": 10
},
"args": {
"detailed": true
},
"context": {
"users": {
"tenants": 3,
"users_per_tenant": 2
}
},
"sla": {
"failure_rate": {
"max": 0
}
}
}
]
}

View File

@ -1,16 +0,0 @@
---
NovaImages.list_images:
-
args:
detailed: True
runner:
type: "constant"
times: 10
concurrency: 2
context:
users:
tenants: 3
users_per_tenant: 2
sla:
failure_rate:
max: 0

View File

@ -1,28 +0,0 @@
# Copyright: 2015 Workday, 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.
import mock
from rally_openstack.scenarios.nova import images
from tests.unit import test
class NovaImagesTestCase(test.TestCase):
def test_list_images(self):
scenario = images.ListImages()
scenario._list_images = mock.Mock()
scenario.run(detailed=False, fakearg="fakearg")
scenario._list_images.assert_called_once_with(False, fakearg="fakearg")

View File

@ -935,13 +935,6 @@ class NovaScenarioTestCase(test.ScenarioTestCase):
self._test_atomic_action_timer(nova_scenario.atomic_actions(),
"nova.list_interfaces")
@mock.patch("rally_openstack.scenarios.nova.utils.image_service")
def test__list_images(self, mock_image_service):
result = utils.NovaScenario(clients=mock.Mock())._list_images()
glance = mock_image_service.Image.return_value
self.assertEqual(glance.list_images.return_value, result)
glance.list_images.assert_called_once_with()
def test__lock_server(self):
server = mock.Mock()
nova_scenario = utils.NovaScenario(context=self.context)