Skip to content

Template Preview option still deploys the template to target device #5

@miarond

Description

@miarond

I was demonstrating this script to a Cisco customer recently (part of a Customer Success engagement) and we discovered that even when we specified the --preview command line option, the script still deployed the specified template to the target device.

Here is an example of the command line options we used:

py template.py --device "10.7.84.244" --template "Onboarding Configuration/CSV_Import_Interface_Loop" --paramsfile "9300_interface_info.csv" -v --preview

After some troubleshooting I identified a missing line of code at Line 241 in the template.py script (link below). I recommend adding sys.exit(0) on this line, in order to stop the script after displaying the Preview output and prevent it from continuing on to the deployment stage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions