From 5abe4fe013a14c528bfb1e0ff4c8bcb9b8817551 Mon Sep 17 00:00:00 2001 From: JingLu5 Date: Mon, 24 Jul 2017 02:44:26 +0000 Subject: 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 --- tests/unit/benchmark/contexts/test_model.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/unit/benchmark/contexts') diff --git a/tests/unit/benchmark/contexts/test_model.py b/tests/unit/benchmark/contexts/test_model.py index 1ce550306..5444c2bc8 100644 --- a/tests/unit/benchmark/contexts/test_model.py +++ b/tests/unit/benchmark/contexts/test_model.py @@ -237,6 +237,7 @@ class ServerTestCase(unittest.TestCase): mock_network.name = 'some-network' mock_network.stack_name = 'some-network-stack' mock_network.allowed_address_pairs = ["1", "2"] + mock_network.vnic_type = 'normal' mock_network.subnet_stack_name = 'some-network-stack-subnet' mock_network.provider = 'sriov' mock_network.external_network = 'ext_net' @@ -249,6 +250,7 @@ class ServerTestCase(unittest.TestCase): 'some-server-some-network-port', mock_network.stack_name, mock_network.subnet_stack_name, + mock_network.vnic_type, sec_group_id=self.mock_context.secgroup_name, provider=mock_network.provider, allowed_address_pairs=mock_network.allowed_address_pairs) @@ -312,6 +314,7 @@ class ServerTestCase(unittest.TestCase): self.mock_context.flavors = ['flavor2'] mock_network = mock.Mock() mock_network.allowed_address_pairs = ["1", "2"] + mock_network.vnic_type = 'normal' mock_network.configure_mock(name='some-network', stack_name='some-network-stack', subnet_stack_name='some-network-stack-subnet', provider='some-provider') @@ -323,6 +326,7 @@ class ServerTestCase(unittest.TestCase): 'ServerFlavor-2-some-network-port', mock_network.stack_name, mock_network.subnet_stack_name, + mock_network.vnic_type, provider=mock_network.provider, sec_group_id=self.mock_context.secgroup_name, allowed_address_pairs=mock_network.allowed_address_pairs) -- cgit 1.2.3-korg