helpers

Helper Functions.

Submodules

Classes

RpcResult

RPC Reply Result Model.

SchemaResult

Get Schema Result.

Functions

check_file(→ bool)

Check file_name exists based on input.

create_folder(→ None)

Create a directory.

write_output(→ None)

Take input and path and write a file.

check_capability(→ bool)

Evaluate capabilities and return True if capability is available.

Package Contents

helpers.check_file(file_name: str) bool

Check file_name exists based on input.

Parameters:

file_name (str) – file name to check

helpers.create_folder(directory: str) None

Create a directory.

Parameters:

directory (str) – Directory path to create

helpers.write_output(text: str, path: str, filename: str, ext: str = 'txt') None

Take input and path and write a file.

Parameters:
  • text (str) – text to write

  • path (str) – directory path

  • filename (str) – filename

class helpers.RpcResult

RPC Reply Result Model.

rpc: ncclient.operations.rpc.RPCReply | None
manager: ncclient.manager.Manager | None
class helpers.SchemaResult

Get Schema Result.

directory: str
errors: List[str]
files: List[str]
helpers.check_capability(capabilities: List[str], capability: str) bool

Evaluate capabilities and return True if capability is available.