rolekit D-Bus API v2

Thomas Woerner twoerner at redhat.com
Mon Jun 30 14:44:31 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:s)→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:s (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
   lasterror:s (ro)         # last error 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(a{sv})            # deploy role (i.e. running initial setup 
post-package-install, ipa-server-install)
                            # with the given parameters in key value 
pairs in a dictionary, these parameters should be
                            # saved in the role configuration setings by 
the role after successful deployment
   decommission()           # decommision (example: moved to another 
machine, ipa-server-install -u ), stop if started

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


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

NASCENT = "nascent"
DEPLOYED = "deployed"
READY_TO_START = "ready-to-start"
STARTED = "started"
RUNNING = "running"
STOPPED = "stopped"
DECOMISSIONED = decomissioned"
ERROR = "error"


----

Changes to previous version:

- status is of type string
- deploy method has argument
- renamed errorlog to lasterror


More information about the server mailing list