9. Layer python3

9.1. Overview

The layer1_python3 layer includes Python3 MFCOM packages and utilities.

9.2. Metadata

9.2.1. Layer Home

/opt/metwork-mfcom-0.7/opt/python3

9.2.2. Label

python3@mfcom

9.2.3. Dependencies

9.3. Utilities

9.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

9.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

9.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

9.3.4. get_domainname

usage: get_domainname [-h]

returns the network domain

optional arguments:
  -h, --help  show this help message and exit

9.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

9.3.6. plugins.list

usage: plugins.list [-h] [--raw] [--json]

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)

9.3.7. plugins.info

usage: plugins.info [-h] [--just-home] 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

9.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

9.3.9. plugins.install

usage: plugins.install [-h] [--force] 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

9.3.10. plugins.uninstall

usage: plugins.uninstall [-h] [--force] name

uninstall a plugin

positional arguments:
  name        plugin name

optional arguments:
  -h, --help  show this help message and exit
  --force     ignore some errors

9.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

9.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