aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/contexts
diff options
context:
space:
mode:
authorKubi <jean.gaoliang@huawei.com>2017-04-23 10:41:27 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-04-23 10:41:27 +0000
commitbd877d6bd6928ac4bdebdd292c15dc94241542f3 (patch)
tree75f15e6220cadad75aac8bcdb35933c15c6e75f6 /yardstick/benchmark/contexts
parentbb365d411d88a71871993b4ed803c2ffbbcb79bf (diff)
parentf51ba41255d6ab2c03fd62a044d372b73b496459 (diff)
Merge "Add SRIOV support"
Diffstat (limited to 'yardstick/benchmark/contexts')
-rw-r--r--yardstick/benchmark/contexts/heat.py7
-rw-r--r--yardstick/benchmark/contexts/model.py5
2 files changed, 9 insertions, 3 deletions
diff --git a/yardstick/benchmark/contexts/heat.py b/yardstick/benchmark/contexts/heat.py
index 604df80d1..d5dccd2a2 100644
--- a/yardstick/benchmark/contexts/heat.py
+++ b/yardstick/benchmark/contexts/heat.py
@@ -133,8 +133,11 @@ class HeatContext(Context):
template.add_security_group(self.secgroup_name)
for network in self.networks:
- template.add_network(network.stack_name)
- template.add_subnet(network.subnet_stack_name, network.stack_name,
+ template.add_network(network.stack_name,
+ network.physical_network,
+ network.provider)
+ template.add_subnet(network.subnet_stack_name,
+ network.stack_name,
network.subnet_cidr)
if network.router:
diff --git a/yardstick/benchmark/contexts/model.py b/yardstick/benchmark/contexts/model.py
index 4873afde3..71ee1f3c2 100644
--- a/yardstick/benchmark/contexts/model.py
+++ b/yardstick/benchmark/contexts/model.py
@@ -105,6 +105,8 @@ class Network(Object):
self.subnet_stack_name = self.stack_name + "-subnet"
self.subnet_cidr = attrs.get('cidr', '10.0.1.0/24')
self.router = None
+ self.physical_network = attrs.get('physical_network', 'physnet1')
+ self.provider = attrs.get('provider', None)
if "external_network" in attrs:
self.router = Router("router", self.name,
@@ -226,7 +228,8 @@ class Server(Object): # pragma: no cover
self.ports[network.name] = {"stack_name": port_name}
template.add_port(port_name, network.stack_name,
network.subnet_stack_name,
- sec_group_id=self.secgroup_name)
+ sec_group_id=self.secgroup_name,
+ provider=network.provider)
port_name_list.append(port_name)
if self.floating_ip: