cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
544
Views
0
Helpful
2
Replies

ios xe yang restconf default interface commands

Austin Marsh
Level 1
Level 1

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.

2 Replies 2

troyperkins
Cisco Employee
Cisco Employee

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; 
    }
  }

 

 

Yea not quite what I'm looking for, thanks though.