cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
538
Views
0
Helpful
1
Replies

What is the REST API url and payload for the following Branch FP CLI

jonachin
Cisco Employee
Cisco Employee

Hi All,

I am looking for the REST API (POST) equivalent for the following 2 NSO Branch Core Function Pack CLIs:

 

admin@ncs% request pnp delete serial ?

Description: Serial of the device to delete

Possible completions:

  FGL210310NZ  FGL2103111W

 

admin@ncs% request branch-infra:branch-infra service-cleanup branchcpe FGL210310NZ

 

Thanks,

Jonathan

--

1 Reply 1

gschudel
Cisco Employee
Cisco Employee

hi jonathan

 

for the first one, if you check the YANG model (in cisco-pnp) you can see the list is called "map" and the key is "id" -- which is the serial number...

 

list map {
  key id;

  description
    "Map from device serial number to device name. This
    information is used when mounting the device into the
    NCS device tree.";

  leaf id {
    type string {
    tailf:info "WORD;;Serial number of device";
    length "1..32";
    }

  }

 

 

I've run a curl call on DELETE this way (based on above) -- say in your case you want to delete serial FGL210310NZ 

you should be able to do:

 

curl -v -X DELETE -u admin:admin \
http://127.0.0.1:8080/api/running/map/FGL210310NZ

 

or 

 

curl -v -X DELETE -u admin:admin \
-H "Accept: application/vnd.yang.data+json" \
http://127.0.0.1:8080/api/running/map/FGL210310NZ

 

*i did this awhile back prior to RESTCONF - but you should be able to convert it and should use RESTCONF preferably.

 

 

not sure about the branch one ( i don't have that running anywhere).

 

best,

gregg