summaryrefslogtreecommitdiffstats
path: root/test/test_chains.py
diff options
context:
space:
mode:
authorahothan <ahothan@cisco.com>2018-10-10 23:20:44 -0700
committerahothan <ahothan@cisco.com>2018-10-11 09:43:45 -0700
commitcd455c418173a978f89bdbb83f79d15c5fa53e03 (patch)
tree1a63ccfa078e316ea9df9e66aa8bb6397aa989fb /test/test_chains.py
parent391dcf76fefb747888a3411ae3b8df7b1ad26685 (diff)
Perform strict src mac check on ensure end to end
This is required when shared net is used and there are more VMs running than requested in the -scc Change-Id: I7599169739e6bb9b3e2377473377d5332ef2b68a Signed-off-by: ahothan <ahothan@cisco.com>
Diffstat (limited to 'test/test_chains.py')
-rw-r--r--test/test_chains.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_chains.py b/test/test_chains.py
index 14ed0b5..519748b 100644
--- a/test/test_chains.py
+++ b/test/test_chains.py
@@ -21,6 +21,7 @@ from mock import MagicMock
from mock import patch
from nfvbench.chain_runner import ChainRunner
+from nfvbench.chaining import ChainVnfPort
from nfvbench.compute import Compute
import nfvbench.credentials
from nfvbench.factory import BasicFactory
@@ -159,9 +160,18 @@ def _check_nfvbench_openstack(sc=ChainType.PVP, l2_loopback=False):
print res
assert res['status'] == 'OK'
+
+mac_seq = 0
+
+def _mock_get_mac(dummy):
+ global mac_seq
+ mac_seq += 1
+ return '01:00:00:00:00:%02x' % mac_seq
+
@patch.object(Compute, 'get_enabled_az_host_list', _mock_get_enabled_az_host_list)
@patch.object(Compute, 'find_image', _mock_find_image)
@patch.object(TrafficClient, 'skip_sleep', lambda x: True)
+@patch.object(ChainVnfPort, 'get_mac', _mock_get_mac)
@patch('nfvbench.chaining.Client')
@patch('nfvbench.chaining.neutronclient')
@patch('nfvbench.chaining.glanceclient')