rolekit D-Bus API

Thomas Woerner twoerner at redhat.com
Fri Jun 20 19:10:17 UTC 2014


rolekit D-Bus API
=================

org.fedoraproject.rolekit1
--------------------------

Properties

   version:i                   # server role manager version
   roles:ao                    # role objects list

Methods

   getNamedRole(name:s)→o      # get role by name
   getRolesByState(state:i)→ao # get all roles with the given state


org.fedoraproject.rolekit1.roles.$name
--------------------------------------

Properties (general)       # role settings

   name:s (ro)              # role name
   version:i (ro)           # role implementation version
   state:i (ro)             # deployed/started/inactive/dead?
   packages:as (ro)         # package list: packages and @groups 
(similar to kickstart)
   services:as (ro)         # service list: services to be enabled and 
started
   firewall:a{sas} (ro)     # firewall settings: ports and services
                              dict {
                                "ports" => array ( 
portid:s["-"portid:s]"/"protocol:s ),
                                "services" => array( name:s ),
                              }
                              ports are similar to firewalld port 
definitions
   firewall_zones:as (rw)   # firewall zones to apply the firewall 
settings to
   custom_firewall:b (rw)   # custom firewall: firewall settings will 
not be applied if set to true
   errorlog:s (ro)          # errorlog string

   #backup_paths:as (ro)    # backup paths (files and directories)
   # ...                    # role specific settings

Methods

   start()                  # start the role (startServices, 
installFirewall), fails if not deployed
   stop()                   # stop the role (stopServices, 
uninstallFirewall), fails if not started
   restart()                # stop and start
   deploy()                 # deploy role (i.e. running initial setup 
post-package-install, ipa-server-install)
   decommission()           # decommision (example: moved to another 
machine, ipa-server-install -u ), stop if started

   updateRole()             # update role: yum update; restartServices; 
updateFirewall

   getFirewallZones()       # get firewall zone list from firewalld, add 
used ones to firewall_zones


Role States
===========

Nascent             0
Deploying           1
ReadyToStart        2
Starting            3
Running             4
Stopping            5
Decomissioning      6
Error             255


More information about the server mailing list