On IOSXE, it's possible to have a line of output that says:
"Cable Length No cable Neighbor NONE"
however, the regex in show_platform.py is not accounting for this and is strictly expecting just one word after cable length, such as 50 cm.
So this command is breaking when there is not a cable connected.
Could possible change regex to
p2 = re.compile(r'^Cable Length (?P<cable_length>.+)\s+Neighbor (?P<neighbor>\S+)$')
so that it captures everything in between Length and Neighbor
On IOSXE, it's possible to have a line of output that says:
"Cable Length No cable Neighbor NONE"
however, the regex in show_platform.py is not accounting for this and is strictly expecting just one word after cable length, such as 50 cm.
So this command is breaking when there is not a cable connected.
Could possible change regex to
p2 = re.compile(r'^Cable Length (?P<cable_length>.+)\s+Neighbor (?P<neighbor>\S+)$')so that it captures everything in between Length and Neighbor