diff options
author | Ido Barnea <ibarnea@cisco.com> | 2016-10-27 16:20:00 +0300 |
---|---|---|
committer | Ido Barnea <ibarnea@cisco.com> | 2016-10-27 16:20:20 +0300 |
commit | 68c71be224ffddc86ae12b9af97d8cadce56676a (patch) | |
tree | e552432ef592a69ca2dbbb2c3207c2559430979c /scripts/automation | |
parent | eae2df408b1042360d1f2428e11d4553f3220db4 (diff) |
Putting back MAC config in IPv6 regression tests
Signed-off-by: Ido Barnea <ibarnea@cisco.com>
Diffstat (limited to 'scripts/automation')
6 files changed, 36 insertions, 15 deletions
diff --git a/scripts/automation/regression/CPlatform.py b/scripts/automation/regression/CPlatform.py index bc9d3c4b..0017e7db 100755 --- a/scripts/automation/regression/CPlatform.py +++ b/scripts/automation/regression/CPlatform.py @@ -520,18 +520,18 @@ class CPlatform(object): p1 = 'p'+str(idx), p2 = 'p'+str(idx+1) ) ) # config global arp to interfaces net address and vrf - if dual_if.client_if.get_dest_mac(): + if dual_if.client_if.get_ipv6_dest_mac(): conf_t_command_set.append('{mode}ipv6 neighbor {next_hop} {intf} {dest_mac}'.format( mode = unconfig_str, next_hop = server_net_next_hop, intf = dual_if.client_if.get_name(), - dest_mac = dual_if.client_if.get_dest_mac())) - if dual_if.server_if.get_dest_mac(): + dest_mac = dual_if.client_if.get_ipv6_dest_mac())) + if dual_if.server_if.get_ipv6_dest_mac(): conf_t_command_set.append('{mode}ipv6 neighbor {next_hop} {intf} {dest_mac}'.format( mode = unconfig_str, next_hop = client_net_next_hop, intf = dual_if.server_if.get_name(), - dest_mac = dual_if.server_if.get_dest_mac())) + dest_mac = dual_if.server_if.get_ipv6_dest_mac())) conf_t_command_set.append('{mode}route-map {pre}_{p1}_to_{p2} permit 10'.format( mode = unconfig_str, diff --git a/scripts/automation/regression/platform_cmd_link.py b/scripts/automation/regression/platform_cmd_link.py index 8162e29d..275da656 100755 --- a/scripts/automation/regression/platform_cmd_link.py +++ b/scripts/automation/regression/platform_cmd_link.py @@ -189,12 +189,13 @@ class CDeviceCfg(object): class CIfObj(object): _obj_id = 0 - def __init__(self, if_name, ipv4_addr, ipv6_addr, src_mac_addr, dest_mac_addr, if_type): + def __init__(self, if_name, ipv4_addr, ipv6_addr, src_mac_addr, dest_mac_addr, dest_ipv6_mac_addr, if_type): self.__get_and_increment_id() self.if_name = if_name self.if_type = if_type self.src_mac_addr = src_mac_addr self.dest_mac_addr = dest_mac_addr + self.dest_ipv6_mac_addr = dest_ipv6_mac_addr self.ipv4_addr = ipv4_addr self.ipv6_addr = ipv6_addr self.pair_parent = None # a pointer to CDualIfObj which holds this interface and its pair-complement @@ -212,6 +213,12 @@ class CIfObj(object): def get_dest_mac (self): return self.dest_mac_addr + def get_ipv6_dest_mac (self): + if self.dest_mac_addr != 0: + return self.dest_mac_addr + else: + return self.dest_ipv6_mac_addr + def get_id (self): return self._obj_id @@ -312,11 +319,16 @@ class CIfManager(object): client_dest_mac = intf_pair['client']['dest_mac_addr'] else: client_dest_mac = 0 + if 'dest_ipv6_mac_addr' in intf_pair['client']: + client_dest_ipv6_mac = intf_pair['client']['dest_ipv6_mac_addr'] + else: + client_dest_ipv6_mac = 0 client_obj = CIfObj(if_name = intf_pair['client']['name'], ipv4_addr = tmp_ipv4_addr, ipv6_addr = tmp_ipv6_addr, src_mac_addr = intf_pair['client']['src_mac_addr'], dest_mac_addr = client_dest_mac, + dest_ipv6_mac_addr = client_dest_ipv6_mac, if_type = IFType.Client) # generate network addresses for server side, and initialize server if object @@ -327,11 +339,16 @@ class CIfManager(object): server_dest_mac = intf_pair['server']['dest_mac_addr'] else: server_dest_mac = 0 + if 'dest_ipv6_mac_addr' in intf_pair['server']: + server_dest_ipv6_mac = intf_pair['server']['dest_ipv6_mac_addr'] + else: + server_dest_ipv6_mac = 0 server_obj = CIfObj(if_name = intf_pair['server']['name'], ipv4_addr = tmp_ipv4_addr, ipv6_addr = tmp_ipv6_addr, src_mac_addr = intf_pair['server']['src_mac_addr'], dest_mac_addr = server_dest_mac, + dest_ipv6_mac_addr = server_dest_ipv6_mac, if_type = IFType.Server) dual_intf_obj = CDualIfObj(vrf_name = intf_pair['vrf_name'], diff --git a/scripts/automation/regression/setups/trex-dan/config.yaml b/scripts/automation/regression/setups/trex-dan/config.yaml index be972001..d147502f 100644 --- a/scripts/automation/regression/setups/trex-dan/config.yaml +++ b/scripts/automation/regression/setups/trex-dan/config.yaml @@ -54,11 +54,11 @@ router: - client : name : GigabitEthernet0/0/1 src_mac_addr : 0000.0001.0000 -# dest_mac_addr : 0000.0001.0000 + dest_ipv6_mac_addr : 0000.0001.0000 server : name : GigabitEthernet0/0/2 src_mac_addr : 0000.0001.0000 -# dest_mac_addr : 0000.0001.0000 + dest_ipv6_mac_addr : 0000.0001.0000 vrf_name : null tftp: diff --git a/scripts/automation/regression/setups/trex25/config.yaml b/scripts/automation/regression/setups/trex25/config.yaml index ac19f170..c4b3743d 100644 --- a/scripts/automation/regression/setups/trex25/config.yaml +++ b/scripts/automation/regression/setups/trex25/config.yaml @@ -52,38 +52,38 @@ router: - client : name : GigabitEthernet0/1/0 src_mac_addr : 0000.0001.0000 -# dest_mac_addr : 0000.0001.0000 + dest_ipv6_mac_addr : 0000.0001.0000 server : name : GigabitEthernet0/1/1 src_mac_addr : 0000.0001.0000 -# dest_mac_addr : 0000.0001.0000 + dest_ipv6_mac_addr : 0000.0001.0000 vrf_name : - client : name : GigabitEthernet0/1/2 src_mac_addr : 0000.0001.0000 -# dest_mac_addr : 0000.0001.0000 + dest_ipv6_mac_addr : 0000.0001.0000 server : name : GigabitEthernet0/1/4 src_mac_addr : 0000.0001.0000 -# dest_mac_addr : 0000.0001.0000 + dest_ipv6_mac_addr : 0000.0001.0000 vrf_name : - client : name : GigabitEthernet0/1/5 src_mac_addr : 0000.0001.0000 -# dest_mac_addr : 0000.0001.0000 + dest_ipv6_mac_addr : 0000.0001.0000 server : name : GigabitEthernet0/1/3 src_mac_addr : 0000.0001.0000 -# dest_mac_addr : 0000.0001.0000 + dest_ipv6_mac_addr : 0000.0001.0000 vrf_name : - client : name : GigabitEthernet0/1/6 src_mac_addr : 0000.0001.0000 -# dest_mac_addr : 0000.0001.0000 + dest_ipv6_mac_addr : 0000.0001.0000 server : name : GigabitEthernet0/1/7 src_mac_addr : 0000.0001.0000 -# dest_mac_addr : 0000.0001.0000 + dest_ipv6_mac_addr : 0000.0001.0000 vrf_name : tftp: diff --git a/scripts/automation/regression/stateful_tests/trex_ipv6_test.py b/scripts/automation/regression/stateful_tests/trex_ipv6_test.py index b03de0b4..4d6f7953 100755 --- a/scripts/automation/regression/stateful_tests/trex_ipv6_test.py +++ b/scripts/automation/regression/stateful_tests/trex_ipv6_test.py @@ -29,6 +29,7 @@ class CTRexIPv6_Test(CTRexGeneral_Test): core = self.get_benchmark_param('cores') ret = self.trex.start_trex( + cfg = '/etc/trex_cfg_mac.yaml', c = core, m = mult, p = True, @@ -66,6 +67,7 @@ class CTRexIPv6_Test(CTRexGeneral_Test): core = self.get_benchmark_param('cores', test_name = 'test_ipv6_simple') ret = self.trex.start_trex( + cfg = '/etc/trex_cfg_mac.yaml', c = core, m = mult, p = True, diff --git a/scripts/automation/regression/stateful_tests/trex_rx_test.py b/scripts/automation/regression/stateful_tests/trex_rx_test.py index 6c6c535a..161856b1 100755 --- a/scripts/automation/regression/stateful_tests/trex_rx_test.py +++ b/scripts/automation/regression/stateful_tests/trex_rx_test.py @@ -165,6 +165,7 @@ class CTRexRx_Test(CTRexGeneral_Test): sample_rate = self.get_benchmark_param('rx_sample_rate') ret = self.trex.start_trex( + cfg = '/etc/trex_cfg_mac.yaml', c = core, m = mult, p = True, @@ -199,6 +200,7 @@ class CTRexRx_Test(CTRexGeneral_Test): sample_rate = self.get_benchmark_param('rx_sample_rate') ret = self.trex.start_trex( + cfg = '/etc/trex_cfg_mac.yaml', c = core, m = mult, p = True, |