rolekit.dbus man page

rolekit.dbus — rolekit D-Bus interface description

Object Paths

This is the basic rolekit object path structure. The used interfaces are explained below in the section called “Interfaces”.

/org/fedoraproject/rolekit1
  Interfaces
    org.fedoraproject.rolekit1
    org.freedesktop.DBus.Introspectable
    org.freedesktop.DBus.Properties

/org/fedoraproject/rolekit1/roles/$r
  Interfaces
    org.fedoraproject.rolekit1.role
    org.freedesktop.DBus.Introspectable
    org.freedesktop.DBus.Properties

/org/fedoraproject/rolekit1/roles/$r/$i
  Interfaces
    org.fedoraproject.rolekit1.role.instance
    org.freedesktop.DBus.Introspectable
    org.freedesktop.DBus.Properties

Where $r is the escaped name of the role and $i is the escaped name of the instance.

Interfaces

org.fedoraproject.rolekit1

This interface contains general operations, like getting roles and interfaces.

Methods

getAllRoleInstances() → ao
Return array of object paths o of all role instances. An instance object path is of the form /org/fedoraproject/rolekit1/roles/$r/$i. The returning array is empty if there are no role instances.

getAllRoleInstancesByState(s: state) → ao
Return array of object paths o of all role instances that are in state state. An instance object path is of the form /org/fedoraproject/rolekit1/roles/$r/$i. The returning array is empty if there are no role instances.

getNamedRole(s: name) → o
Return object path o of the role with the name name. The name can also be the excaped name. The role object path is of the form /org/fedoraproject/rolekit1/roles/$r.

Possible errors: INVALID_ROLE

Properties

roles - ao - (ro)
Array of object paths o of all roles. A role object path is of the form /org/fedoraproject/rolekit1/roles/$r. The array is empty if there are no roles.

version - s - (ro)
The rolekit version string.

org.fedoraproject.rolekit1.role

This interface provides methods to deploy a role and also to get instances of the role.

Methods

deploy(s: name, {sv}: settings) → Nothing
Deploy the role and create an instance at org.fedoraproject.rolekit1.role.instance with name name and settings.

If the name is empty, rolekit will use the next lowest unused instance number starting by 1 as the name. The first not named instance will be 1, the second 2 and so on. The name needs to be unique for all instances of a role. Note: this name-generation may be racy. It is always recommended to specify a name explicitly.

Settings are key value pairs. There are mandatory, optional and read only settings. Please have a look at the documentation of the role to get further information about settings in the role.

Possible errors: NAME_CONFLICT, TOO_MANY_INSTANCES

getInstances() → ao
Return array of object paths o of instances of this role. An instance object path is of the form /org/fedoraproject/rolekit1/roles/$r/$i.

getNamedInstance(s: name) → o
Return object path o of the instance with the name name if it exists. An instance object path is of the form /org/fedoraproject/rolekit1/roles/$r/$i.

Possible errors: INVALID_INSTANCE

Properties

DEFAULTS - {sv} - (ro)
Dict of key value pairs of the default role settings. These are version, services, packages, firewall, firewall_zones and custom_firewall. It also contains role specific settings. Please have a look at rolekit.roles(5) for descriptions of the generic role settings and also at the documentation of the role rolekit.roles.$rolename(5) to get information about role specific settings.

name - s - (ro)
The rolekit version in string format.

Signals

InstanceAdded(s: name)
Inform about a newly added instance with the name name.

InstanceRemoved(s: name)
Inform about the removal of the instance with the name name.

org.fedoraproject.rolekit1.role.instance

This interface provides methods for decommission, redeploy, start, stop, restart and update and to reset the error state of a role and also to get instances of the role.

Methods

decommission(b: force) → Nothing
Decommission the instance and remove the D-Bus interface. If the force parameter b is True, the decommision will be forced even in the error case.q

Only functional if the instance is in ready-to-start or error state.

redeploy({sv}: settings) → Nothing
Redeploy the instance.

A redeploy is only possible for an instance that is in the ready-to-start or error state.

Settings are key value pairs. There are mandatory, optional and read only settings. Please have a look at the documentation of the role to get further information about settings in the role.

After redeploy the instance will be in the ready-to-start state if there was no error while deploying, else in the error state.

Not functional yet.

sanitize() → Nothing
Sanitize settings of the role instance like passwords or other sensitive data.

Only functional if the instance is in ready-to-start, running or error state.

resetError() → Nothing
Reset the error state of the instance.

Only functional if the instance is in error state.

After resetting the error state the instance will be in the ready-to-start state.

restart() → Nothing
Stop and start the instance again if no error occured in stopping the instance.

Only functional if the instance is in running state.

start() → Nothing
Start the instance and configure it to start on boot.

Only functional if the instance is in ready-to-start state.

stop() → Nothing
Stop the instance and disable starting it on boot.

Only functional if the instance is in running state.

update() → Nothing
Update the instance.

Only functional if the instance is in ready-to-start state.

Not functional yet.

Properties

firewall_zones - as - (ro)
Array of firewall zones s.

packages - as - (ro)
Array of packages s.

services - as - (ro)
Array of services s.

custom_firewall - b - (ro)
Bool custom_firewall.

firewall - {sas} - (ro)
Dict of firewall.

version - i - (ro)
Role version.

lasterror - s - (ro)
Last occured error in the instance.

name - s - (ro)
Instance name.

state - s - (ro)
Instance state.

type - s - (ro)
Instance type and role name.

Additional properties for role specific settings.

See Also

rolekit(1), rolectl(1), roled(5), rolekit.dbus(5), rolekit.roles(5), rolekit.roles.databaseserver(5), rolekit.roles.domaincontroller(5)

Notes

rolekit home page at github.com:

Authors

Thomas Woerner <twoerner@redhat.com>

Developer

Stephen Gallagher <sgallagh@redhat.com>

Developer

Miloslav Trmač <mitr@redhat.com>

Developer

Nils Philippsen <nils@redhat.com>

Developer

Referenced By

rolectl(1), roled(1), rolekit(5), rolekit.roles(5), rolekit.roles.databaseserver(5), rolekit.roles.domaincontroller(5), rolekit.roles.memcache(5).

rolekit 0.5.1 rolekit.dbus