rally trunk port list

Change-Id: Idbbe08bdef83c60fad49f49996a74fd999914fe8
This commit is contained in:
Kevin Benton 2016-12-09 10:18:15 -07:00 committed by Kevin Benton
parent 69259e9525
commit 8976e42e30
2 changed files with 10 additions and 3 deletions

View File

@ -308,10 +308,10 @@
NeutronTrunks.create_and_list_trunk_subports:
-
args:
subport_count: 50
subport_count: 500
runner:
type: "constant"
times: 10
times: 1
concurrency: 4
context:
users:
@ -320,4 +320,4 @@
quotas:
neutron:
network: -1
port: -1
port: 1000

View File

@ -29,6 +29,7 @@ class TrunkLifeCycle(utils.NeutronScenario):
def run(self, subport_count=50):
net = self._create_network({})
self._create_subnet(net, {'cidr': '10.0.0.0/8'})
ports = [self._create_port(net, {}) for i in range(subport_count)]
parent, subports = ports[0], ports[1:]
subport_payload = [{'port_id': p['port']['id'],
@ -38,7 +39,9 @@ class TrunkLifeCycle(utils.NeutronScenario):
trunk_payload = {'port_id': parent['port']['id'],
'sub_ports': subport_payload}
trunk = self._create_trunk(trunk_payload)
self._update_port(parent, {'device_id': 'sometrunk'})
self._list_trunks(id=trunk['trunk']['id'])
self._list_ports_by_device_id("sometrunk")
self._delete_trunk(trunk['trunk']['id'])
@atomic.action_timer("neutron.delete_trunk")
@ -52,3 +55,7 @@ class TrunkLifeCycle(utils.NeutronScenario):
@atomic.optional_action_timer("neutron.list_trunks")
def _list_trunks(self, **kwargs):
return self.clients("neutron").list_trunks(**kwargs)["trunks"]
@atomic.optional_action_timer("neutron.list_ports_by_device_id")
def _list_ports_by_device_id(self, device_id):
return self.clients("neutron").list_ports(device_id=device_id)