diff options
author | rexlee8776 <limingjiang@huawei.com> | 2018-02-06 07:30:37 +0000 |
---|---|---|
committer | rexlee8776 <limingjiang@huawei.com> | 2018-02-27 07:24:10 +0000 |
commit | 1e2ad3cbc8455972da45777301dcaf181d9e885d (patch) | |
tree | 0ddd5702be94b32e5ed21a54156a6890aea1c1af /yardstick/tests/unit/benchmark | |
parent | 639981d1a2c30a3501749dfe4a7a50609e05cb0b (diff) |
Enable heat context to support existing network
JIRA: YARDSTICK-970
Change-Id: I593af4b3a30e52521e3d77fd84bec16ab4733483
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
Diffstat (limited to 'yardstick/tests/unit/benchmark')
-rw-r--r-- | yardstick/tests/unit/benchmark/contexts/test_heat.py | 1 | ||||
-rw-r--r-- | yardstick/tests/unit/benchmark/contexts/test_model.py | 11 |
2 files changed, 6 insertions, 6 deletions
diff --git a/yardstick/tests/unit/benchmark/contexts/test_heat.py b/yardstick/tests/unit/benchmark/contexts/test_heat.py index 4348bb052..a87cf8120 100644 --- a/yardstick/tests/unit/benchmark/contexts/test_heat.py +++ b/yardstick/tests/unit/benchmark/contexts/test_heat.py @@ -192,6 +192,7 @@ class HeatContextTestCase(unittest.TestCase): u'e-network_id': u'net987', } server = mock.MagicMock() + server.private_ip = None server.ports = OrderedDict([ ('a', [{'stack_name': 'b', 'port': 'port_a'}]), ('c', [{'stack_name': 'd', 'port': 'port_c'}, diff --git a/yardstick/tests/unit/benchmark/contexts/test_model.py b/yardstick/tests/unit/benchmark/contexts/test_model.py index 28011d494..b5f5468ce 100644 --- a/yardstick/tests/unit/benchmark/contexts/test_model.py +++ b/yardstick/tests/unit/benchmark/contexts/test_model.py @@ -241,6 +241,7 @@ class ServerTestCase(unittest.TestCase): mock_network.vnic_type = 'normal' mock_network.subnet_stack_name = 'some-network-stack-subnet' mock_network.provider = 'sriov' + mock_network.net_flags = {} mock_network.external_network = 'ext_net' mock_network.router = model.Router('some-router', 'some-network', self.mock_context, 'ext_net') @@ -250,9 +251,7 @@ class ServerTestCase(unittest.TestCase): mock_template.add_port.assert_called_with( 'some-server-some-network-port', - mock_network.stack_name, - mock_network.subnet_stack_name, - mock_network.vnic_type, + mock_network, sec_group_id=self.mock_context.secgroup_name, provider=mock_network.provider, allowed_address_pairs=mock_network.allowed_address_pairs) @@ -513,6 +512,7 @@ class ServerTestCase(unittest.TestCase): mock_network = mock.Mock() mock_network.allowed_address_pairs = ["1", "2"] mock_network.vnic_type = 'normal' + mock_network.net_flags = {} mock_network.configure_mock(name='some-network', stack_name='some-network-stack', subnet_stack_name='some-network-stack-subnet', provider='some-provider') @@ -522,9 +522,7 @@ class ServerTestCase(unittest.TestCase): mock_template.add_port.assert_called_with( 'ServerFlavor-2-some-network-port', - mock_network.stack_name, - mock_network.subnet_stack_name, - mock_network.vnic_type, + mock_network, provider=mock_network.provider, sec_group_id=self.mock_context.secgroup_name, allowed_address_pairs=mock_network.allowed_address_pairs) @@ -556,6 +554,7 @@ class ServerTestCase(unittest.TestCase): mock_network.name = 'some-network' mock_network.stack_name = 'some-network-stack' mock_network.subnet_stack_name = 'some-network-stack-subnet' + mock_network.net_flags = {} test_server._add_instance(mock_template, 'ServerFlavor-3', [mock_network], 'hints') |