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

NSO Python script using _ncs library with _ncs.UserInfo

Fantolino
Level 1
Level 1

_ncs library functions require a parameter of type _ncs.UserInfo (e.g. _ncs.dp.action_set_timeout ).

In NSO action this parameter can be derived from the context:

@Action.action
def cb_action(self, uinfo, name, kp, input, output):

uinfo is the this parameter.

How can have that parameter if I use a linux launched python script?

 

1 Reply 1

huayyang
Cisco Employee
Cisco Employee

the _ncs.dp.action_set_timeout is only supposed to be used to change the worker socket timeout for the ongoing action, so it's supposed to be invoked from within the action callback, in which you have a uinfo already

if this is not the case, can you explain what you're trying to do here in your python script?