Rework rally test jobs
This patch reworks rally test jobs for profile context support is ready now. Change-Id: Ic0538dcc7a1fa68e0696ff212bb6e5ad4f0649bd
This commit is contained in:
parent
c4a842dff1
commit
d1fa751eb2
|
@ -83,15 +83,15 @@ class SenlinPlugin(senlin_utils.SenlinScenario):
|
|||
|
||||
@validation.required_openstack(admin=True)
|
||||
@validation.required_services(consts.Service.SENLIN)
|
||||
@validation.required_contexts("profiles")
|
||||
@scenario.configure(context={"cleanup": ["senlin"]})
|
||||
def create_resize_delete_cluster(self, profile_spec, create_params,
|
||||
def create_resize_delete_cluster(self, create_params,
|
||||
resize_params, timeout=3600):
|
||||
"""Create a cluster, resize it and then delete it.
|
||||
|
||||
Measure the `senlin cluster-create`, `senlin cluster-resize`
|
||||
and `senlin cluster-delete` commands performance.
|
||||
|
||||
:param profile_spec: the spec dictionary used to create profile
|
||||
:param create_params: the dictionary provides the parameters for
|
||||
cluster creation
|
||||
:param resize_params: the dictionary provides the parameters
|
||||
|
@ -99,9 +99,8 @@ class SenlinPlugin(senlin_utils.SenlinScenario):
|
|||
:param timeout: The timeout value in seconds for each cluster
|
||||
action, including creation, deletion and resizing
|
||||
"""
|
||||
profile = self._create_profile(profile_spec)
|
||||
cluster = self._create_cluster(profile.id, timeout=timeout,
|
||||
profile_id = self.context["tenant"]["profile"]
|
||||
cluster = self._create_cluster(profile_id, timeout=timeout,
|
||||
**create_params)
|
||||
self._resize_cluster(cluster, **resize_params)
|
||||
self._delete_cluster(cluster)
|
||||
self._delete_profile(profile)
|
||||
|
|
|
@ -1,17 +1,8 @@
|
|||
---
|
||||
|
||||
SenlinClusters.create_and_delete_profile_cluster:
|
||||
SenlinClusters.create_and_delete_cluster:
|
||||
-
|
||||
args:
|
||||
profile_spec:
|
||||
type: os.nova.server
|
||||
version: 1.0
|
||||
properties:
|
||||
name: cirros_server
|
||||
flavor: 1
|
||||
image: cirros-0.3.4-x86_64-uec
|
||||
networks:
|
||||
- network: private
|
||||
desired_capacity: 3
|
||||
min_size: 0
|
||||
max_size: 5
|
||||
|
@ -23,6 +14,15 @@
|
|||
users:
|
||||
tenants: 2
|
||||
users_per_tenant: 2
|
||||
profiles:
|
||||
type: os.nova.server
|
||||
version: "1.0"
|
||||
properties:
|
||||
name: cirros_server
|
||||
flavor: 1
|
||||
image: "cirros-0.3.4-x86_64-uec"
|
||||
networks:
|
||||
- network: private
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
|
@ -30,15 +30,6 @@
|
|||
SenlinPlugin.create_resize_delete_cluster:
|
||||
-
|
||||
args:
|
||||
profile_spec:
|
||||
type: os.nova.server
|
||||
version: 1.0
|
||||
properties:
|
||||
name: cirros_server
|
||||
flavor: 1
|
||||
image: cirros-0.3.4-x86_64-uec
|
||||
networks:
|
||||
- network: private
|
||||
create_params:
|
||||
desired_capacity: 0
|
||||
min_size: 0
|
||||
|
@ -57,6 +48,15 @@
|
|||
users:
|
||||
tenants: 2
|
||||
users_per_tenant: 2
|
||||
profiles:
|
||||
type: os.nova.server
|
||||
version: "1.0"
|
||||
properties:
|
||||
name: cirros_server
|
||||
flavor: 1
|
||||
image: "cirros-0.3.4-x86_64-uec"
|
||||
networks:
|
||||
- network: private
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
|
|
Loading…
Reference in New Issue