ncs.util Module
Utility module, low level abstrations
Functions
get_callpoint_model
get_callpoint_model()
Get configured callpoint model
get_self_assign_warning
get_self_assign_warning()
Return current self assign warning type.
get_setattr_fun
get_setattr_fun(obj, parent)
Return setattr fun to use for setting attributes, will use return a wrapped setattr function with sanity checks if enabled.
is_multiprocessing
is_multiprocessing()
Return True if the configured callpoint model is multiprocessing
mk_yang_date_and_time
mk_yang_date_and_time(dt=None)
Create a timezone aware datetime object in ISO8601 string format.
This method is used to convert a datetime object to its timezone aware counterpart and return a string useful for a 'yang:date-and-time' leaf. If 'dt' is None the current time will be used.
Arguments: dt -- a datetime object to be converted (optional)
set_callpoint_model
set_callpoint_model(model)
Update environment with provided callpoint model
set_kill_child_on_parent_exit
set_kill_child_on_parent_exit()
Multi OS variant of _ncs.set_kill_child_on_parent_exit falling back to kqueue if the OS supports it.
set_self_assign_warning
set_self_assign_warning(warning)
Set self assign warning type.
with_setattr_check
with_setattr_check(path)
Use as context manager enabling set attribute check for the current thread while in the manager.
Last updated
Was this helpful?