NSO Python script using _ncs library with _ncs.UserInfo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2023 08:29 AM
_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?
- Labels:
-
Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2023 02:43 AM
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?
