Hello,
here is the proposal for the Server Role API:
* Plugin architecture
* Daemon must exit, when not in use (all D-Bus clients exited)
D-Bus server API:
org.fedoraproject.ServerRoleManager1
------------------------------------
Properties
version:s # server role manager version
state:s # active/inactive/dead?
roles:ao # role objects list
Methods
getRole(role:o)→o # get role by object
getNamedRole(name:s)→o # get role by name
getActiveRoles()→ao # get active role object list
org.fedoraproject.ServerRoleManager1.roles.$n
---------------------------------------------
Properties (general) # role settings
name:s (ro) # role name
version:s (ro) # role version
state:s (ro) # deployed/started/inactive/dead?
activate_time:i (ro) # time of activation
deploy_time:i (ro) # time of deployment
is_configured:b (ro) # is this role configured?
packages:as (ro) # packages and @groups
services:a{sas} (ro) # services to be enabled and/or started:
"enable": [s] and "start": [s]
firewall:a{sas} (ro) # firewall dict ports: [s] and service: [s]
#backup_paths:as # backup files and directories (directory
trailing slash it means "everything below here")
# ... # custom settings, passwords as key value pairs
Methods
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
start() # start the role (startServices,
installFirewall), fails if not deployed
stop() # stop the role (stopServices,
uninstallFirewall), fails if not started
updateRole() # update role: yum update; restartServices;
updateFirewall
reconfigureRole(a{sv}) # reconfgure role with new config settings
as key value pairs
installPackages() # install packages and groups
#uninstallPackages() # uninstall packages and groups, fails if
deployed - not initially
startServices() # start the services
restartServices() # restart the services
stopServices() # stop the services
installFirewall() # install firewall ports/services
updateFirewall() # update firewall ports/services
uninstallFirewall() # uninstall firewall ports/services