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:
Prince Sunny 2018-02-08 21:26:19 -08:00 committed by GitHub
parent ecf5c8d311
commit a145f2c08a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 2 deletions

View File

@ -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]

View File

@ -22,7 +22,7 @@
},
{
"PORT_TABLE:Ethernet12": {
"speed": "1000000",
"speed": "100000",
"description": "Interface description"
},
"OP": "SET"

View File

@ -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>

View File

@ -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'}")