Improvements/Fixes to netcreate-boot-ping plugin

The following changes have been made:
+ Change class name to BrowbeatPlguin for consistency
+ Change JSON input task to YAML for consistency
+ Implement quotas in input task
+ Make concurrency/times configurable via scenario-previously
  times was set to 1 and there was no way to change concurrency

Change-Id: I09ff27974695fbc36d60b988aa34d987dac32688
This commit is contained in:
Sai Sindhur Malleni 2016-09-16 14:13:19 -04:00
parent f97f670dc4
commit 72fb9441a0
4 changed files with 56 additions and 35 deletions

View File

@ -90,6 +90,7 @@ rally:
venv: /home/stack/rally-venv/bin/activate
plugins:
- netcreate-boot: rally/rally-plugins/netcreate-boot
- netcreate-boot-ping: rally/rally-plugins/netcreate-boot-ping
- subnet-router-create: rally/rally-plugins/subnet-router-create
- glance-create-boot-delete: rally/rally-plugins/glance-create-boot-delete
- nova-create-pbench-uperf: rally/rally-plugins/nova-create-pbench-uperf
@ -215,6 +216,12 @@ rally:
image_name: cirros
flavor_name: m1.tiny
file: rally/rally-plugins/netcreate-boot/netcreate_boot.yml
- name: netcreate-boot-ping
enabled: true
image_name: cirros
flavor_name: m1.xtiny
net_id: 790354c7-f286-4fd1-a4a1-ec9749c61fbf
file: rally/rally-plugins/netcreate-boot-ping/netcreate_nova-boot-fip-ping.yml
- name: subnet-router-create
enabled: true
num_networks: 10

View File

@ -1,29 +0,0 @@
{
"NeutronBootFipPingPlugin.create_network_nova_boot_ping": [
{
"args": {
"floating": True,
"flavor": {
"name": "{{flavor_name}}"
},
"image": {
"name": "{{image_name}}"
},
"ext_net": {
"id": "{{net_id}}"
},
"network_create_args": {}
},
"runner": {
"type": "serial",
"times": 1
},
"context": {
"users": {
"tenants": 1,
"users_per_tenant": 1
}
}
}
]
}

View File

@ -18,9 +18,9 @@ from rally.task import types
from rally.task import validation
class NeutronBootFipPingPlugin(neutron_utils.NeutronScenario,
vm_utils.VMScenario,
scenario.Scenario):
class BrowbeatPlugin(neutron_utils.NeutronScenario,
vm_utils.VMScenario,
scenario.Scenario):
#
# Create network
# Create subnet
@ -36,12 +36,13 @@ class NeutronBootFipPingPlugin(neutron_utils.NeutronScenario,
@validation.image_valid_on_flavor("flavor", "image")
@validation.required_openstack(users=True)
@scenario.configure(context={"cleanup": ["nova", "neutron"],
"keypair": {}, "allow_ssh": {}})
def create_network_nova_boot_ping(self, image, flavor, ext_net, floating=False, router=None,
"keypair": {}, "allow_ssh": {}})
def create_network_nova_boot_ping(self, image, flavor, ext_net, floating=True,
router_create_args=None, router=None,
network_create_args=None, subnet_create_args=None,
**kwargs):
if router is None:
router = self._create_router({}, ext_net)
router = self._create_router(router_create_args, ext_net)
network = self._create_network(network_create_args or {})
subnet = self._create_subnet(network, subnet_create_args or {})

View File

@ -0,0 +1,42 @@
{% set sla_max_avg_duration = sla_max_avg_duration or 60 %}
{% set sla_max_failure = sla_max_failure or 0 %}
{% set sla_max_seconds = sla_max_seconds or 60 %}
---
BrowbeatPlugin.create_network_nova_boot_ping:
-
args:
floating: True
flavor:
name: '{{flavor_name}}'
image:
name: '{{image_name}}'
ext_net:
id: {{ net_id }}
network_create_args: {}
router_create_args: {}
subnet_create_args: {}
runner:
concurrency: {{concurrency}}
times: {{times}}
type: "constant"
context:
users:
tenants: 1
users_per_tenant: 1
quotas:
neutron:
network: -1
port: -1
router: -1
subnet: -1
nova:
instances: -1
cores: -1
ram: -1
sla:
max_avg_duration: {{sla_max_avg_duration}}
max_seconds_per_iteration: {{sla_max_seconds}}
failure_rate:
max: {{sla_max_failure}}