From 28853b0f42f3110548e76bf376bf4794169c7a3a Mon Sep 17 00:00:00 2001 From: kong Date: Fri, 27 Jun 2014 14:53:32 +0800 Subject: [PATCH] Add Network Context Class Context for networking resources. Note: using this context in security_groups related scenarios will be added in another patch. Main changes: * the network context class * rally.benchmark.utils.RAMInt class that represents integer value in RAM, so we can make process safe sync of cluster-unique stuff (like CIDRs) * rally.benchmark.wrappers.network module, that unifies network service implementation, for usage both in context and scenarios * optimization in NovaScenario._boot_server Co-Authored-By: Lingxian Kong Co-Authored-By: Timur Nurlygayanov Co-Authored-By: Sergey Skripnick Co-Authored-By: Vadim Rovachev Co-Authored-By: Aleksandr Maretskiy Implements: blueprint benchmark-context-network Change-Id: Ia2c461ba3421dc9650c4bb7949c115fee08c6b7b --- rally-jobs/rally-neutron.yaml | 22 ++++++++++++++++++++++ rally-jobs/rally.yaml | 21 +++++++++++++++++++++ tests/unit/fakes.py | 1 + 3 files changed, 44 insertions(+) diff --git a/rally-jobs/rally-neutron.yaml b/rally-jobs/rally-neutron.yaml index 61318b37..47c59717 100644 --- a/rally-jobs/rally-neutron.yaml +++ b/rally-jobs/rally-neutron.yaml @@ -334,6 +334,28 @@ failure_rate: max: 0 + - + args: + auto_assign_nic: True + flavor: + name: "m1.tiny" + image: + name: "^cirros.*uec$" + runner: + type: "constant" + times: 4 + concurrency: 4 + context: + users: + tenants: 3 + users_per_tenant: 2 + network: + start_cidr: "100.1.0.0/26" + networks_per_tenant: 2 + sla: + failure_rate: + max: 0 + NovaServers.boot_and_list_server: - args: diff --git a/rally-jobs/rally.yaml b/rally-jobs/rally.yaml index 2c0d54c8..427f5465 100755 --- a/rally-jobs/rally.yaml +++ b/rally-jobs/rally.yaml @@ -922,6 +922,27 @@ failure_rate: max: 0 + - + args: + flavor: + name: "m1.tiny" + image: + name: "^cirros.*uec$" + runner: + type: "constant" + times: 3 + concurrency: 3 + context: + users: + tenants: 3 + users_per_tenant: 2 + network: + start_cidr: "100.100.0.0/24" + networks_per_tenant: 2 + sla: + failure_rate: + max: 0 + - args: flavor: diff --git a/tests/unit/fakes.py b/tests/unit/fakes.py index d4eb571a..301a97a8 100644 --- a/tests/unit/fakes.py +++ b/tests/unit/fakes.py @@ -1002,6 +1002,7 @@ class FakeNeutronClient(object): def create_router(self, data): router = setup_dict(data["router"], defaults={"name": generate_name("router_"), + "external_gateway_info": None, "admin_state_up": True}) router_id = generate_uuid() router.update({"id": router_id,