New Plugin for Rally
Plugin to allow the user to create a router and attach N networks to that router. Change-Id: Id081f8d319f1d79c11811472596c03a229d2f869
This commit is contained in:
parent
1df5bcae31
commit
884100d101
@ -59,6 +59,7 @@ rally:
|
|||||||
plugins:
|
plugins:
|
||||||
- netcreate-boot: rally/rally-plugins/netcreate-boot
|
- netcreate-boot: rally/rally-plugins/netcreate-boot
|
||||||
- netcreate-boot-ping: rally/rally-plugins/netcreate-boot-ping
|
- netcreate-boot-ping: rally/rally-plugins/netcreate-boot-ping
|
||||||
|
- subnet-router-create: rally/rally-plugins/subnet-router-create
|
||||||
benchmarks:
|
benchmarks:
|
||||||
- name: authenticate
|
- name: authenticate
|
||||||
enabled: true
|
enabled: true
|
||||||
@ -208,6 +209,10 @@ rally:
|
|||||||
sla_max_avg_duration: 12
|
sla_max_avg_duration: 12
|
||||||
sla_max_seconds: 30
|
sla_max_seconds: 30
|
||||||
sla_max_failure: 0
|
sla_max_failure: 0
|
||||||
|
- name: subnet-router-create
|
||||||
|
enabled: true
|
||||||
|
num_networks: 50
|
||||||
|
file: rally/rally-plugins/subnet-router-create/subnet-router-create.yml
|
||||||
#shaker scenarios require atleast 2 compute nodes
|
#shaker scenarios require atleast 2 compute nodes
|
||||||
shaker:
|
shaker:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
@ -90,6 +90,7 @@ rally:
|
|||||||
venv: /home/stack/rally-venv/bin/activate
|
venv: /home/stack/rally-venv/bin/activate
|
||||||
plugins:
|
plugins:
|
||||||
- netcreate-boot: rally/rally-plugins/netcreate-boot
|
- netcreate-boot: rally/rally-plugins/netcreate-boot
|
||||||
|
- subnet-router-create: rally/rally-plugins/subnet-router-create
|
||||||
benchmarks:
|
benchmarks:
|
||||||
- name: authenticate
|
- name: authenticate
|
||||||
enabled: true
|
enabled: true
|
||||||
@ -196,3 +197,7 @@ rally:
|
|||||||
image_name: cirros
|
image_name: cirros
|
||||||
flavor_name: m1.tiny
|
flavor_name: m1.tiny
|
||||||
file: rally/rally-plugins/netcreate-boot/netcreate_boot.yml
|
file: rally/rally-plugins/netcreate-boot/netcreate_boot.yml
|
||||||
|
- name: subnet-router-create
|
||||||
|
enabled: true
|
||||||
|
num_networks: 10
|
||||||
|
file: rally/rally-plugins/subnet-router-create/subnet-router-create.yml
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
from rally.task import atomic
|
||||||
|
from rally.task import scenario
|
||||||
|
from rally.plugins.openstack.scenarios.nova import utils as nova_utils
|
||||||
|
from rally.plugins.openstack.scenarios.neutron import utils as neutron_utils
|
||||||
|
from rally.task import types
|
||||||
|
from rally.task import utils as task_utils
|
||||||
|
from rally.task import validation
|
||||||
|
|
||||||
|
class NeutronPlugin(neutron_utils.NeutronScenario,
|
||||||
|
scenario.Scenario):
|
||||||
|
@types.set(image=types.ImageResourceType,
|
||||||
|
flavor=types.FlavorResourceType)
|
||||||
|
@validation.required_openstack(users=True)
|
||||||
|
@scenario.configure(context={"cleanup": ["neutron"]})
|
||||||
|
def create_router_and_net(self,num_networks=1,network_create_args=None,
|
||||||
|
subnet_create_args=None,**kwargs):
|
||||||
|
router = self._create_router({})
|
||||||
|
subnets = []
|
||||||
|
if num_networks == 1 :
|
||||||
|
network = self._create_network(network_create_args or {})
|
||||||
|
subnet = self._create_subnet(network, subnet_create_args or {})
|
||||||
|
subnets.append(subnet)
|
||||||
|
self._add_interface_router(subnet['subnet'],router['router'])
|
||||||
|
else :
|
||||||
|
for net in range(1,num_networks):
|
||||||
|
network = self._create_network(network_create_args or {})
|
||||||
|
subnet = self._create_subnet(network, subnet_create_args or {})
|
||||||
|
subnets.append(subnet)
|
||||||
|
self._add_interface_router(subnet['subnet'],router['router'])
|
||||||
|
for subnet in subnets :
|
||||||
|
self._remove_interface_router(subnet['subnet'],router['router'])
|
@ -0,0 +1,28 @@
|
|||||||
|
{% 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 %}
|
||||||
|
---
|
||||||
|
NeutronPlugin.create_router_and_net:
|
||||||
|
-
|
||||||
|
args:
|
||||||
|
network_create_args: {}
|
||||||
|
num_networks: {{num_networks}}
|
||||||
|
runner:
|
||||||
|
concurrency: {{concurrency}}
|
||||||
|
times: {{times}}
|
||||||
|
type: "constant"
|
||||||
|
context:
|
||||||
|
users:
|
||||||
|
tenants: 1
|
||||||
|
users_per_tenant: 8
|
||||||
|
quotas:
|
||||||
|
neutron:
|
||||||
|
network: -1
|
||||||
|
port: -1
|
||||||
|
router: -1
|
||||||
|
subnet: -1
|
||||||
|
sla:
|
||||||
|
max_avg_duration: {{sla_max_avg_duration}}
|
||||||
|
max_seconds_per_iteration: {{sla_max_seconds}}
|
||||||
|
failure_rate:
|
||||||
|
max: {{sla_max_failure}}
|
Loading…
Reference in New Issue
Block a user