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

Add more commands to CLI

u.avsec
Spotlight
Spotlight

Hi,

packages package NAME redeploy we all know this one.

I would like to augment CLI to add more options where redeploy is.

Tried the plug-and-play command scripting but I can't figure out how to daisy chain command and params together in correct hierarchy

begin command
  modes: oper
  styles: c i j
  cmdpath: packages
end

begin param
 name: package
 type: void
 presence: mandatory
 flag: -p
 words: one
end

1. I have presence: mandatory and words: one - I would expect that cli would require me to input something after 'packages package'
but that is not the case, hitting enter makes things run

2. How to define that after 'packages package WORD', and only then, another param can be visible in CLI?

Is this scripting powerful enough for something like that? If no, are there other ways to make what I would like to do without messing with NSO source files?

Thanks

1 Reply 1

hniska
Cisco Employee
Cisco Employee

I would recommend that you take a look at actions, re-deploy, check-sync etc are all actions 

https://developer.cisco.com/docs/nso/guides/#!applications-in-nso/actions