Skip to content

"show switch stack-ports detail" not accounting for No Cable Scenario #996

Description

@aknopper

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions