8. Layer python2¶
8.1. Overview¶
The layer1_python2
layer includes Python2 MFCOM packages and utilities.
8.2. Metadata¶
8.2.1. Layer Home¶
/opt/metwork-mfcom-0.8/opt/python2
8.2.2. Label¶
8.2.3. Dependencies¶
8.3. Utilities¶
8.3.1. get_ip_for_hostname¶
usage: get_ip_for_hostname [-h] [hostname]
returns the IP address of the given HOSTNAME (current real IP if no hostname
is given)
positional arguments:
hostname hostname to resolve as ip (can be empty)
optional arguments:
-h, --help show this help message and exit
8.3.2. get_simple_hostname¶
usage: get_simple_hostname [-h]
returns the 'simple' hostname (without network domain)
optional arguments:
-h, --help show this help message and exit
8.3.3. get_full_hostname¶
usage: get_full_hostname [-h]
returns the 'full' hostname (with network domain)
optional arguments:
-h, --help show this help message and exit
8.3.4. get_domainname¶
usage: get_domainname [-h]
returns the network domain
optional arguments:
-h, --help show this help message and exit
8.3.5. get_real_ip¶
usage: get_real_ip [-h]
returns the 'real' ip (not 127.0.0.1)
optional arguments:
-h, --help show this help message and exit
8.3.6. plugins.list¶
usage: plugins.list [-h] [--raw] [--json]
[--plugins-base-dir PLUGINS_BASE_DIR]
get the installed plugins list
optional arguments:
-h, --help show this help message and exit
--raw raw mode
--json json mode (not compatible with raw mode)
--plugins-base-dir PLUGINS_BASE_DIR
can be use to set an alternate plugins-base-dir, if
not set the value of MODULE_PLUGINS_BASE_DIR env var
is used (or a hardcoded standard value).
8.3.7. plugins.info¶
usage: plugins.info [-h] [--just-home] [--plugins-base-dir PLUGINS_BASE_DIR]
name_or_filepath
get some information about a plugin
positional arguments:
name_or_filepath installed plugin name (without version) or full plugin
filepath
optional arguments:
-h, --help show this help message and exit
--just-home if set, just return plugin home
--plugins-base-dir PLUGINS_BASE_DIR
can be use to set an alternate plugins-base-dir, if
not set the value of MODULE_PLUGINS_BASE_DIR env var
is used (or a hardcoded standard value).
8.3.8. plugins.hash¶
usage: plugins.hash [-h] name_or_filepath
get a hash of a plugin
positional arguments:
name_or_filepath installed plugin name (without version) or full plugin
filepath
optional arguments:
-h, --help show this help message and exit
8.3.9. plugins.install¶
usage: plugins.install [-h] [--force] [--plugins-base-dir PLUGINS_BASE_DIR]
plugin_filepath
install a plugin file
positional arguments:
plugin_filepath plugin filepath
optional arguments:
-h, --help show this help message and exit
--force ignore some errors
--plugins-base-dir PLUGINS_BASE_DIR
can be use to set an alternate plugins-base-dir, if
not set the value of MODULE_PLUGINS_BASE_DIR env var
is used (or a hardcoded standard value).
8.3.10. plugins.uninstall¶
usage: plugins.uninstall [-h] [--force] [--plugins-base-dir PLUGINS_BASE_DIR]
name
uninstall a plugin
positional arguments:
name plugin name
optional arguments:
-h, --help show this help message and exit
--force ignore some errors
--plugins-base-dir PLUGINS_BASE_DIR
can be use to set an alternate plugins-base-dir, if
not set the value of MODULE_PLUGINS_BASE_DIR env var
is used (or a hardcoded standard value).
8.3.11. ping_tcp_port¶
usage: ping_tcp_port [-h] [--timeout TIMEOUT] [--silent] host port
test if a tcp host/port is reachable, open and listened
positional arguments:
host hostname/ip to test
port tcp port to test
optional arguments:
-h, --help show this help message and exit
--timeout TIMEOUT timeout (in seconds)
--silent if set, nothing is sent on stdout
8.3.12. recursive_kill.py¶
usage: recursive_kill.py [-h] pid
recursively kill (SIGKILL) a whole process tree
positional arguments:
pid root process pid (to kill)
optional arguments:
-h, --help show this help message and exit