Exemple #1
0
 def test_backend_asic_portchannel_intf(self):
     argument = "-m {} -p {} -n asic3 -v \"PORTCHANNEL_INTERFACE.keys()|list\"".format(self.sample_graph, self.port_config[3])
     output = self.run_script(argument)
     self.assertEqual(
         utils.liststr_to_dict(output.strip()),
         utils.liststr_to_dict("['PortChannel4013', 'PortChannel4013|10.1.0.2/31', 'PortChannel4014', 'PortChannel4014|10.1.0.6/31']")
     )
Exemple #2
0
 def test_frontend_asic_portchannel_intf(self):
     argument = "-m {} -p {} -n asic0 -v \"PORTCHANNEL_INTERFACE.keys()|list\"".format(self.sample_graph, self.port_config[0])
     output = self.run_script(argument)
     self.assertEqual(
         utils.liststr_to_dict(output.strip()),
         utils.liststr_to_dict("['PortChannel4001|10.1.0.1/31', 'PortChannel0002|FC00::1/126', 'PortChannel4002|10.1.0.3/31', 'PortChannel0002', 'PortChannel0002|10.0.0.0/31', 'PortChannel4001', 'PortChannel4002']")
     )
Exemple #3
0
 def test_frontend_asic_routerport_intf(self):
     argument = "-m {} -p {} -n asic0 -v \"INTERFACE.keys()|list\"".format(self.sample_graph1, self.port_config[0])
     output = self.run_script(argument)
     self.assertEqual(
         utils.liststr_to_dict(output.strip()),
         utils.liststr_to_dict("['Ethernet0', ('Ethernet0', '10.0.0.0/31'), 'Ethernet4', ('Ethernet0', 'FC00::1/126'), ('Ethernet4', 'FC00::2/126'), ('Ethernet4', '10.0.0.2/31')]")
     )
Exemple #4
0
 def test_backend_asic_portchannels_mem(self):
     argument = "-m {} -p {} -n asic3 -v \"PORTCHANNEL_MEMBER.keys()|list\"".format(self.sample_graph, self.port_config[3])
     output = self.run_script(argument)
     self.assertEqual(
         utils.liststr_to_dict(output.strip()),
         utils.liststr_to_dict("['PortChannel4013|Ethernet-BP384', 'PortChannel4014|Ethernet-BP392', 'PortChannel4014|Ethernet-BP396', 'PortChannel4013|Ethernet-BP388']")
     )
Exemple #5
0
 def test_frontend_asic_portchannel_mem(self):
     argument = "-m {} -p {} -n asic0 -v \"PORTCHANNEL_MEMBER.keys()|list\"".format(self.sample_graph, self.port_config[0])
     output = self.run_script(argument)
     self.assertEqual(
         utils.liststr_to_dict(output.strip()),
         utils.liststr_to_dict("['PortChannel4002|Ethernet-BP8', 'PortChannel0002|Ethernet0', 'PortChannel0002|Ethernet4', 'PortChannel4002|Ethernet-BP12', 'PortChannel4001|Ethernet-BP0', 'PortChannel4001|Ethernet-BP4']")
     )
Exemple #6
0
 def test_minigraph_peers_with_range(self):
     argument = "-m " + self.sample_graph_bgp_speaker + " -p " + self.port_config + " -v \"BGP_PEER_RANGE.values()|list\""
     output = self.run_script(argument)
     self.assertEqual(
         utils.liststr_to_dict(output.strip()),
         utils.liststr_to_dict("[{'src_address': '10.1.0.32', 'name': 'BGPSLBPassive', 'ip_range': ['10.10.10.10/26', '100.100.100.100/26']}]")
     )
Exemple #7
0
 def test_minigraph_portchannel_interfaces(self):
     argument = '-m "' + self.sample_graph_simple + '" -p "' + self.port_config + '" -v "PORTCHANNEL_INTERFACE.keys()|list"'
     output = self.run_script(argument)
     self.assertEqual(
         utils.liststr_to_dict(output.strip()),
         utils.liststr_to_dict("['PortChannel01', ('PortChannel01', '10.0.0.56/31'), ('PortChannel01', 'FC00::71/126')]")
     )
Exemple #8
0
 def test_minigraph_portchannel_members(self):
     argument = '-m "' + self.sample_graph_pc_test + '" -p "' + self.port_config + '" -v "PORTCHANNEL_MEMBER.keys()|list"'
     output = self.run_script(argument)
     self.assertEqual(
         utils.liststr_to_dict(output.strip()),
         utils.liststr_to_dict("[('PortChannel01', 'Ethernet120'), ('PortChannel01', 'Ethernet116'), ('PortChannel01', 'Ethernet124'), ('PortChannel01', 'Ethernet112')]")
     )