07-24-2019 10:30 AM
I see ways to setup an interface via the ios-xe api, but it doesn't look like there is a way to set an interface back to defaults. I want to do the equivalent of "default interface g0/0/1". It seems like there are ways if I choose to use the cli module for python or ssh with netconf to accomplish this. I'm trying to do this on a catalyst 9k switches.
07-24-2019 11:05 AM - edited 07-24-2019 11:09 AM
Edit: Sorry, I read netconf instead of restconf. I haven't had much luck with restconf but if you are willing to try netconf this will probably work.
Take a look at Cisco-IOS-XE-rpc as I believe this is what you are looking for (haven't tried it yet, just looked it up):
rpc default {
description
"Set a command to its defaults";
input {
choice default-choice {
mandatory true;
case interface-case {
leaf interface {
description
"Select an interface to configure";
type string {
pattern "[A-Za-z]([\w/.-]+)";
}
}
}
}
}
output {
uses cisco-xe-rpc-output;
}
}
07-24-2019 11:55 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide