5. MFUTIL API¶
which are note in current modules, during documentation build.
Generic utility classes and functions. |
|
Utility functions around network. |
|
Utility classes and functions for managing Metwork plugins. |
|
Utility functions to build CLI. |
|
|
|
Utility functions around layerapi2. |
5.1. mfutil Package¶
Generic utility classes and functions.
5.1.1. Functions¶
|
Register recursively directories to watch. |
|
Create and return a temporary directory inside a father tempory directory. |
|
Translate a host name to IPv4 address format. |
|
Get the latest mtime recursivly on a directory. |
|
Return a tmp (complete) filepath. |
Return an unique hexa identifier on 32 bytes. |
|
Return the current unix UTC timestamp on all platforms. |
|
|
Generate a hash from a variable number of arguments as a safe string. |
Kill recursively a complete tree of processes. |
|
|
Make a directory recursively (clone of mkdir -p). |
|
Make a directory recursively (clone of mkdir -p). |
5.1.2. Classes¶
|
Bash command/output wrapper. |
|
Specific exception class for BashWrapper objects. |
|
BashWrapper subclass which raise an exception if status_code != 0. |
Just a custom exception object dedicated for mfutil package. |
5.1.3. Class Inheritance Diagram¶
5.2. mfutil.net Module¶
Utility functions around network.
5.2.1. Functions¶
|
Get the domain name of the server. |
|
Return the “full” hostname of the server. |
|
Get the IP of a given hostname. |
Try to find and return the real IP of the server. |
|
Return the “simple” hostname of the server. |
|
|
Ping a TCP host/port with a configurable timeout. |
5.3. mfutil.plugins Module¶
Utility classes and functions for managing Metwork plugins.
5.3.1. Functions¶
|
Build a plugin. |
|
Install a plugin as dev build. |
|
Get a detailed list (formatted text) of installed plugins. |
|
Get the home layer of a plugin. |
|
Get detailed information about a plugin. |
|
Get detailed information about a plugin. |
Return the default plugins base directory path. |
|
|
Initialize the plugins base. |
Return True if we are inside a plugin_env. |
|
|
Install a plugin from a |
|
Display is_dangerous_plugin command. |
|
Return True is the plugins base is already initialized for the module. |
|
Get the plugin name from the layerapi2 label file. |
Get the plugin name from the layerapi2 label. |
|
|
Get a layerapi2 label from a plugin name. |
|
Uninstall a plugin. |
|
Validate a plugin name. |
5.3.2. Classes¶
Exception class raised when a plugin is already installed. |
|
Exception class raised when the plugin base is not initialized. |
|
|
Exception class raised when we can’t build a plugin. |
|
Exception class raised when we can’t init the plugin base. |
|
Exception class raised when we can’t install a plugin. |
|
Exception class raised when we can’t uninstall a plugin. |
Exception class raised when we can’t find the plugin file. |
|
Exception class raised when the plugin is invalid. |
|
Exception class raised when a plugin is not installed. |
|
|
5.3.3. Variables¶
str(object=’‘) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str |
|
str(object=’‘) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str |
|
str(object=’‘) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str |
|
str(object=’‘) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str |
|
str(object=’‘) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str |
|
str(object=’‘) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str |
5.3.4. Class Inheritance Diagram¶
5.4. mfutil.cli Module¶
Utility functions to build CLI.
5.4.1. Functions¶
|
Write a message in bold (if supported). |
Clean waiting status. |
|
|
Write [ERROR] with colors if supported a little optional message. |
|
Write [OK] with colors if supported a little optional message. |
|
Write [RUNNING] with colors if supported. |
|
Write [WARNING] with colors if supported a little optional message. |