Skip to main content

Python library to manipulate The Foreman through the API

Project description

Usage

Load the code::
>>> from foreman import Foreman
>>> foreman = Foreman(login=args["admin"], password=args["password"], ip=args["ip"])
Manipulate hosts::
>>> foreman.hosts.keys()
dict_keys(['foreman.my.domain', 'server1.my.domain', 'server2.my.domain'])
>>> foreman.hosts['foreman.my.domain']
{'compute_resource_name': None, 'certname': 'foreman.my.domain', ...
>>> foreman.hosts['foreman.my.domain']['operatingsystem_name']
'Ubuntu 14.04.2 LTS'

List of managed objects

  • domains
  • smartProxies
  • puppetClasses
  • operatingSystems
  • architectures
  • subnets
  • hostgroups
  • hosts
  • computeResources
  • environments
  • configTemplates
  • smartClassParameters
  • settings
  • ptables
  • media

Debug the API calls

Explore the api foreman.api object, and the ‘history’ list, containing the last api calls

Project details


Release history Release notifications

This version
History Node

0.9.7

History Node

0.9.6

History Node

0.9.5

History Node

0.9.4

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
foreman-0.9.7.tar.gz (23.3 kB) Copy SHA256 hash SHA256 Source None Jul 31, 2015

Supported by

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