Adds Designate server-list scenario
This submission adds method to rally/benchmark/scenarios/designate/basic.py 1)def list_servers Added configuration files for server operations under samples/tasks/scenarios/designate 1) list-servers.json 2) list-servers.yaml Also, added unittests to test_basic.py under tests/unit/benchmark/scenarios/designate Change-Id: I948f5e0c8beca963a9d6f1d388ea0410f2d107e3
This commit is contained in:
@@ -100,3 +100,18 @@
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
|
||||
DesignateBasic.list_servers:
|
||||
-
|
||||
runner:
|
||||
type: "constant"
|
||||
times: 4
|
||||
concurrency: 2
|
||||
context:
|
||||
users:
|
||||
tenants: 2
|
||||
users_per_tenant: 2
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
|
||||
|
@@ -162,3 +162,14 @@ class DesignateBasic(utils.DesignateScenario):
|
||||
"""
|
||||
server = self._create_server()
|
||||
self._delete_server(server["id"])
|
||||
|
||||
@validation.required_services(consts.Service.DESIGNATE)
|
||||
@validation.required_openstack(admin=True)
|
||||
@base.scenario(context={"cleanup": ["designate"]})
|
||||
def list_servers(self):
|
||||
"""List Designate servers.
|
||||
|
||||
This simple scenario tests the designate server-list command by listing
|
||||
all the servers.
|
||||
"""
|
||||
self._list_servers()
|
||||
|
17
samples/tasks/scenarios/designate/list-servers.json
Normal file
17
samples/tasks/scenarios/designate/list-servers.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"DesignateBasic.list_servers": [
|
||||
{
|
||||
"runner": {
|
||||
"type": "constant",
|
||||
"times": 3,
|
||||
"concurrency": 2
|
||||
},
|
||||
"context": {
|
||||
"users": {
|
||||
"tenants": 2,
|
||||
"users_per_tenant": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
11
samples/tasks/scenarios/designate/list-servers.yaml
Normal file
11
samples/tasks/scenarios/designate/list-servers.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
DesignateBasic.list_servers:
|
||||
-
|
||||
runner:
|
||||
type: "constant"
|
||||
times: 3
|
||||
concurrency: 2
|
||||
context:
|
||||
users:
|
||||
tenants: 2
|
||||
users_per_tenant: 2
|
@@ -134,3 +134,11 @@ class DesignateBasicTestCase(test.TestCase):
|
||||
|
||||
mock_create.assert_called_once_with()
|
||||
mock_delete.assert_called_once_with("123")
|
||||
|
||||
@mock.patch(DESIGNATE_BASIC + "._list_servers")
|
||||
def test_list_servers(self, mock_list):
|
||||
scenario = basic.DesignateBasic()
|
||||
|
||||
# Default options
|
||||
scenario.list_servers()
|
||||
mock_list.assert_called_once_with()
|
||||
|
Reference in New Issue
Block a user