Skip to content

ConfigInvalidException should include the error produced by the invalid configΒ #3682

@alextremblay

Description

@alextremblay

Currently, when you try to send config to a switch with, for example:

<netmiko BaseConnection instance>.send_config_set(
    config.splitlines(),
    error_pattern=r"%.*",
)

if one of those lines of config is invalid and produces output on the switch like % Invalid input or Vlan ### is not configured, it would be really nice if netmiko were to raise an error like ConfigInvalidException("Invalid input detected at command: {cmd}, error message: {matched_error}")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions