Set FEC to reed-solomon if the port speed is 100G (#1383)
* Set FEC to reed-solomon if the port speed is 100G
This commit is contained in:
parent
ecf5c8d311
commit
a145f2c08a
@ -418,6 +418,8 @@ def parse_xml(filename, platform=None, port_config_file=None):
|
||||
|
||||
for port_name in port_speeds:
|
||||
ports.setdefault(port_name, {})['speed'] = port_speeds[port_name]
|
||||
if port_speeds[port_name] == '100000':
|
||||
ports.setdefault(port_name, {})['fec'] = 'rs'
|
||||
for port_name in port_descriptions:
|
||||
ports.setdefault(port_name, {})['description'] = port_descriptions[port_name]
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
},
|
||||
{
|
||||
"PORT_TABLE:Ethernet12": {
|
||||
"speed": "1000000",
|
||||
"speed": "100000",
|
||||
"description": "Interface description"
|
||||
},
|
||||
"OP": "SET"
|
||||
|
@ -260,7 +260,7 @@
|
||||
<MultiPortsInterface>false</MultiPortsInterface>
|
||||
<PortName>0</PortName>
|
||||
<Priority>0</Priority>
|
||||
<Speed>1000000</Speed>
|
||||
<Speed>100000</Speed>
|
||||
<Description>Interface description</Description>
|
||||
</a:EthernetInterface>
|
||||
</EthernetInterfaces>
|
||||
|
@ -140,3 +140,6 @@ class TestCfgGen(TestCase):
|
||||
argument = '-m "' + self.sample_graph_simple + '" -p "' + self.port_config + '" -v "PORT[\'Ethernet8\']"'
|
||||
output = self.run_script(argument)
|
||||
self.assertEqual(output.strip(), "{'alias': 'fortyGigE0/8', 'lanes': '37,38,39,40', 'description': 'Interface description', 'speed': '40000'}")
|
||||
argument = '-m "' + self.sample_graph_simple + '" -p "' + self.port_config + '" -v "PORT[\'Ethernet12\']"'
|
||||
output = self.run_script(argument)
|
||||
self.assertEqual(output.strip(), "{'alias': 'fortyGigE0/12', 'lanes': '33,34,35,36', 'fec': 'rs', 'speed': '100000', 'description': 'Interface description'}")
|
||||
|
Reference in New Issue
Block a user