Browse Source

Mark several cleanup resources as tenant_resource

Nova servers and security groups are tenant related resources,
but resource decorator missed that fact which makes cleanup
tries to delete one resources several times.

Change-Id: Ie3a0a40c2282fc7cffa33f1efe5d37601a461709
Closes-Bug: #1584104
tags/0.5.0
Alexandr Nevenchannyy 3 years ago
parent
commit
6429e13617
2 changed files with 47 additions and 2 deletions
  1. +43
    -0
      rally-jobs/nova.yaml
  2. +4
    -2
      rally/plugins/openstack/cleanup/resources.py

+ 43
- 0
rally-jobs/nova.yaml View File

@@ -127,6 +127,27 @@
failure_rate:
max: 0

NovaServers.boot_and_list_server:
-
args:
flavor:
name: {{flavor_name}}
image:
name: {{image_name}}
detailed: True
runner:
type: "constant"
times: 4
concurrency: 2
context:
users:
tenants: 2
users_per_tenant: 2
user_choice_method: "round_robin"
sla:
failure_rate:
max: 0

NovaServers.suspend_and_resume_server:
-
args:
@@ -674,6 +695,28 @@
failure_rate:
max: 0

NovaSecGroup.create_and_list_secgroups:
-
args:
security_group_count: 5
rules_per_security_group: 5
runner:
type: "constant"
times: 4
concurrency: 2
context:
users:
tenants: 2
users_per_tenant: 2
user_choice_method: "round_robin"
quotas:
nova:
security_groups: -1
security_group_rules: -1
sla:
failure_rate:
max: 0

NovaSecGroup.create_and_list_secgroups:
-
args:

+ 4
- 2
rally/plugins/openstack/cleanup/resources.py View File

@@ -78,7 +78,8 @@ class HeatStack(base.ResourceManager):
_nova_order = get_order(200)


@base.resource("nova", "servers", order=next(_nova_order))
@base.resource("nova", "servers", order=next(_nova_order),
tenant_resource=True)
class NovaServer(base.ResourceManager):
def list(self):
"""List all servers."""
@@ -123,7 +124,8 @@ class NovaKeypair(SynchronizedDeletion, base.ResourceManager):
pass


@base.resource("nova", "security_groups", order=next(_nova_order))
@base.resource("nova", "security_groups", order=next(_nova_order),
tenant_resource=True)
class NovaSecurityGroup(SynchronizedDeletion, base.ResourceManager):

def list(self):

Loading…
Cancel
Save