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


Download files

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

Source Distribution

foreman-0.9.4.tar.gz (22.8 kB view details)

Uploaded Source

File details

Details for the file foreman-0.9.4.tar.gz.

File metadata

  • Download URL: foreman-0.9.4.tar.gz
  • Upload date:
  • Size: 22.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for foreman-0.9.4.tar.gz
Algorithm Hash digest
SHA256 cd8dd2275a5ce17eab60e94c32c560ea8ce4c359ae6fab05cf63acb66436fc6f
MD5 6f0c3247bf3e930e7aa07019fc75d225
BLAKE2b-256 ca69f9dfb8e4dd214ac37ff30aa2caa7e09986890af6c04b9b121eddd629f301

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page