aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/benchmark
diff options
context:
space:
mode:
authorJack Chan <chenjiankun1@huawei.com>2018-03-06 01:30:13 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-03-06 01:30:13 +0000
commit8544a361f831f324eae33f8a48b94bf2a34f5ab0 (patch)
tree9aa7e9c4de086d0d536191c1ed9c952479bde906 /yardstick/tests/unit/benchmark
parentb770a2891b6bd9cde38f4062abf700280c5cc4f0 (diff)
parent1e2ad3cbc8455972da45777301dcaf181d9e885d (diff)
Merge "Enable heat context to support existing network"
Diffstat (limited to 'yardstick/tests/unit/benchmark')
-rw-r--r--yardstick/tests/unit/benchmark/contexts/test_heat.py1
-rw-r--r--yardstick/tests/unit/benchmark/contexts/test_model.py11
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 f48d6f32c..2cb6ef824 100644
--- a/yardstick/tests/unit/benchmark/contexts/test_heat.py
+++ b/yardstick/tests/unit/benchmark/contexts/test_heat.py
@@ -326,6 +326,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 76c4da533..20cc00b4e 100644
--- a/yardstick/tests/unit/benchmark/contexts/test_model.py
+++ b/yardstick/tests/unit/benchmark/contexts/test_model.py
@@ -239,6 +239,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')
@@ -248,9 +249,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)
@@ -511,6 +510,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')
@@ -520,9 +520,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)
@@ -554,6 +552,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')