Layer python2

Overview

Metadata

Layer Home

/opt/metwork-mfcom-0.4/opt/python2

Utilities

log

usage: log a message with standard metworklogging system [-h]
                                                         [--application-name APPLICATION_NAME]
                                                         {ERROR,CRITICAL,WARNING,INFO,DEBUG}
                                                         MESSAGE

positional arguments:
  {ERROR,CRITICAL,WARNING,INFO,DEBUG}
                        Niveau de log
  MESSAGE               message to log

optional arguments:
  -h, --help            show this help message and exit
  --application-name APPLICATION_NAME, -a APPLICATION_NAME
                        application name

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

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

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

get_domainname

usage: get_domainname [-h]

returns the network domain

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

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

plugins.list

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

get the installed plugins list

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

plugins.info

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

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

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

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

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

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