Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Tool to manage remote systems and services

Project description

Build Status Code Coverage Code Health


Remote Resources MaNaGeMeNT


This tool helps you manage remote machines and services running on that. It is targeted to Linux based machines. All is done via SSH connection, that means SSH server must be running there already.

from rrmngmnt import Host, RootUser

h = Host("")
exec = h.executor()
print exec.run_cmd(['echo', 'Hello World'])


List of provided interfaces to manage resources on machine, and examples.


Basic file operations, you can find there subset of python ‘os’ module related to files.

print h.fs.exists("/path/to/file")
h.fs.chown("/path/to/file", "root", "root")
h.fs.chmod("/path/to/file", "644")

In additional there are methods to fetch / put file from / to remote system to / from local system.

h.fs.get("/path/to/remote/file", "/path/to/local/file/or/target/dir")
h.fs.put("/path/to/local/file", "/path/to/remote/file/or/target/dir")

There is one special method which allows transfer file between hosts.

    h2, "/path/to/file/on/h2/or/target/dir",

You can also mount devices.

with h.fs.mount_point(
    '//', opts='ro,guest',
    fstype='cifs', target='/mnt/netdisk'
) as mp:
    h.fs.listdir( # list mounted directory
    mp.remount('rw,sync,guest') # remount with different options
    h.fs.touch('%s/new_file' % # touch file


Allows to manage firewall configurarion. Check which firewall service is running on host (firewalld/iptables) and make configure this service.

h.firewall.chain('OUTPUT').add_rule('', 'DROP')


It allows to manage network configuration.

print = ""

Package Management

It encapsulates various package managements. It is able to determine which package management to use. You can still specify package management explicitly.

Implemented managements:

  • APT
  • YUM
  • DNF
  • RPM
# install htop package using implicit management
# remove htop package using rpm explicitly

System Services

You can toggle system services, it encapsulates various service managements. It is able to determine which service management to use in most cases.

Implemented managements:

  • Systemd
  • SysVinit
  • InitCtl
if h.service('httpd').status():
if h.service('httpd').is_enabled():

Operating System Info

Host provide os attribute which allows obtain basic operating system info. Note that os.release_info depends on systemd init system.

print h.os.distribution
# Distribution(distname='Fedora', version='23', id='Twenty Three')

print h.os.release_info
# {'HOME_URL': '',
#  'ID': 'fedora',
#  'NAME': 'Fedora',
#  'PRETTY_NAME': 'Fedora 23 (Workstation Edition)',
#  'VARIANT': 'Workstation Edition',
#  'VARIANT_ID': 'workstation',
#  'VERSION': '23 (Workstation Edition)',
#  'VERSION_ID': '23',
#  ...
# }

print h.os.release_str
# Fedora release 23 (Twenty Three)

Storage Management

It is in PROGRESS state. Planed are NFS & LVM services.

Power Management

Give you possibility to control host power state, you can restart, poweron, poweroff host and get host power status.

Implemented managements:

  • SSH
  • IPMI
ipmi_user = User(pm_user, pm_password)
ipmi_params = {
    'pm_if_type': 'lan',
    'pm_address': 'test-mgmt.testdomain',
    'user': ipmi_user
    power_manager.IPMI_TYPE, **ipmi_params
# restart host via ipmitool


  • paramiko
  • netaddr
  • six


python devop



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for python-rrmngmnt, version 0.1.17
Filename, size File type Python version Upload date Hashes
Filename, size (66.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page