diff options
author | JingLu5 <lvjing5@huawei.com> | 2017-07-24 02:44:26 +0000 |
---|---|---|
committer | Jing Lu <lvjing5@huawei.com> | 2017-07-29 04:51:47 +0000 |
commit | 5abe4fe013a14c528bfb1e0ff4c8bcb9b8817551 (patch) | |
tree | 61209faeb003c4eb2e4bc6fb40c22a97712a8e53 /yardstick/orchestrator | |
parent | f089a528c30b8163f52db9e5ff09f8632bc9078e (diff) |
Heat: support vnic_type in heat type context
JIRA: YARDSTICK-757
Some test scenarios require VM with specific vnic type.
This work is about supporting using different vnic types in heat type context.
context:
name: demo
image: cirros-0.3.5
flavor: yardstick-flavor
user: cirros
placement_groups:
pgrp1:
policy: "availability"
servers:
athena:
floating_ip: true
placement: "pgrp1"
ares:
placement: "pgrp1"
networks:
test:
cidr: '10.0.1.0/24'
vnic_type: "normal"
Change-Id: Ia229fda72f47b04288ea107e2d58fd3e8ac91dd9
Signed-off-by: JingLu5 <lvjing5@huawei.com>
Diffstat (limited to 'yardstick/orchestrator')
-rw-r--r-- | yardstick/orchestrator/heat.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/yardstick/orchestrator/heat.py b/yardstick/orchestrator/heat.py index 05e359717..beb63b421 100644 --- a/yardstick/orchestrator/heat.py +++ b/yardstick/orchestrator/heat.py @@ -359,17 +359,18 @@ name (i.e. %s).\ } } - def add_port(self, name, network_name, subnet_name, sec_group_id=None, provider=None, - allowed_address_pairs=None): + def add_port(self, name, network_name, subnet_name, vnic_type, sec_group_id=None, + provider=None, allowed_address_pairs=None): """add to the template a named Neutron Port """ - log.debug("adding Neutron::Port '%s', network:'%s', subnet:'%s', " - "secgroup:%s", name, network_name, subnet_name, sec_group_id) + log.debug("adding Neutron::Port '%s', network:'%s', subnet:'%s', vnic_type:'%s', " + "secgroup:%s", name, network_name, subnet_name, vnic_type, sec_group_id) self.resources[name] = { 'type': 'OS::Neutron::Port', 'depends_on': [subnet_name], 'properties': { 'name': name, + 'binding:vnic_type': vnic_type, 'fixed_ips': [{'subnet': {'get_resource': subnet_name}}], 'network_id': {'get_resource': network_name}, 'replacement_policy': 'AUTO', |