Skip to content

Python library to manipulate The Foreman through the API

License

Notifications You must be signed in to change notification settings

tindoge/foreman

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Foreman

Usage

Load the code::
>>> from foreman import Foreman
>>> foreman = Foreman(login=args["admin"], password=args["password"],
 ip=args["ip"], ca_cert=args['example.crt'])
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

About

Python library to manipulate The Foreman through the API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%