# ncs.util Module

Utility module, low level abstrations

## Functions

### get\_callpoint\_model

```python
get_callpoint_model()
```

Get configured callpoint model

### get\_self\_assign\_warning

```python
get_self_assign_warning()
```

Return current self assign warning type.

### get\_setattr\_fun

```python
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

```python
is_multiprocessing()
```

Return True if the configured callpoint model is multiprocessing

### mk\_yang\_date\_and\_time

```python
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

```python
set_callpoint_model(model)
```

Update environment with provided callpoint model

### set\_kill\_child\_on\_parent\_exit

```python
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

```python
set_self_assign_warning(warning)
```

Set self assign warning type.

### with\_setattr\_check

```python
with_setattr_check(path)
```

Use as context manager enabling set attribute check for the current thread while in the manager.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nso-docs.cisco.com/guides/nso-6.6/developer-reference/pyapi/ncs.util.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
