From 8ba961d5cded6a0993ef00e8f9b5e0a7cd32d216 Mon Sep 17 00:00:00 2001 From: Ross Brattain Date: Fri, 8 Sep 2017 11:34:48 -0700 Subject: Heat: support non-mesh network toplogy Previsouly we added all servers to every network in Heat in a full mesh. To more closely replicate test topology and to limit then number of ports we need to all each server to specify which ports should be connected to each network. This should also allow for some kind of multiport setup. Add optional network_ports dict to each server with network to port_list mapping match inteface based on port name or vld_id replace vld_id matching with network name matching, since network_name == vld_id Change-Id: I5de46b8f673949e3c17d8df6fa96f055c43886ce Signed-off-by: Ross Brattain --- yardstick/benchmark/core/task.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'yardstick/benchmark/core/task.py') diff --git a/yardstick/benchmark/core/task.py b/yardstick/benchmark/core/task.py index a49a2cb71..29295537a 100644 --- a/yardstick/benchmark/core/task.py +++ b/yardstick/benchmark/core/task.py @@ -377,8 +377,6 @@ class Task(object): # pragma: no cover target_attr: either a name for a server created by yardstick or a dict with attribute name mapping when using external heat templates """ - host = None - target = None for context in self.contexts: if context.__context_type__ != "Heat": continue @@ -628,11 +626,11 @@ def get_networks_from_nodes(nodes): continue interfaces = node.get('interfaces', {}) for interface in interfaces.values(): - vld_id = interface.get('vld_id') - # mgmt network doesn't have vld_id - if not vld_id: + # vld_id is network_name + network_name = interface.get('network_name') + if not network_name: continue - network = Context.get_network({"vld_id": vld_id}) + network = Context.get_network(network_name) if network: networks[network['name']] = network return networks -- cgit 1.2.3-korg