Voq Chassis: Add the Recirc ports to the INTERFACES table to make it routed intf (#13779)
* VOQ: Add the Recirc ports to the INTERFACES table to make it routed intf * Add a test to cover Recir port generation in INTERFACE table
This commit is contained in:
parent
18bc044179
commit
16e3a72925
@ -1749,12 +1749,15 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw
|
|||||||
if inband_port in ports.keys():
|
if inband_port in ports.keys():
|
||||||
ports[inband_port]['admin_status'] = 'up'
|
ports[inband_port]['admin_status'] = 'up'
|
||||||
|
|
||||||
# bring up the recirc port for voq chassis
|
# bring up the recirc port for voq chassis, Set it as routed interface
|
||||||
for port, port_attributes in ports.items():
|
for port, port_attributes in ports.items():
|
||||||
port_role = port_attributes.get('role', None)
|
port_role = port_attributes.get('role', None)
|
||||||
if port_role == 'Rec':
|
if port_role == 'Rec':
|
||||||
ports[port]['admin_status'] = 'up'
|
ports[port]['admin_status'] = 'up'
|
||||||
|
|
||||||
|
#Add the Recirc ports to the INTERFACES table to make it routed intf
|
||||||
|
results['INTERFACE'].update({port : {}})
|
||||||
|
|
||||||
results['PORT'] = ports
|
results['PORT'] = ports
|
||||||
results['CONSOLE_PORT'] = console_ports
|
results['CONSOLE_PORT'] = console_ports
|
||||||
|
|
||||||
|
@ -959,6 +959,14 @@ class TestCfgGen(TestCase):
|
|||||||
"admin_status": "up"
|
"admin_status": "up"
|
||||||
})
|
})
|
||||||
|
|
||||||
|
argument = ["-j", self.macsec_profile, "-m", self.sample_graph_voq, "-p", self.voq_port_config, "--var-json", "INTERFACE"]
|
||||||
|
output = self.run_script(argument)
|
||||||
|
output_dict = utils.to_dict(output.strip())
|
||||||
|
self.assertDictEqual(
|
||||||
|
output_dict['Ethernet-Rec0'],
|
||||||
|
{}
|
||||||
|
)
|
||||||
|
|
||||||
def test_minigraph_dhcp(self):
|
def test_minigraph_dhcp(self):
|
||||||
argument = ['-m', self.sample_graph_simple_case, '-p', self.port_config, '-v', 'DHCP_RELAY']
|
argument = ['-m', self.sample_graph_simple_case, '-p', self.port_config, '-v', 'DHCP_RELAY']
|
||||||
output = self.run_script(argument)
|
output = self.run_script(argument)
|
||||||
|
Reference in New Issue
Block a user