From 99b5aaa499c2f1a71a031051136744ad1e7df869 Mon Sep 17 00:00:00 2001 From: AppaRao Puli Date: Tue, 25 Sep 2018 15:18:17 +0530 Subject: D-Bus interface to configure service properties. D-Bus interface exposing properties for service (RMCP+, web, SSH) like state, port to configure the same. Common interface to support both systemctl or iptables implementation. Service manager daemon (new daemon) will expose objects with these interfaces. Change-Id: I96941cf3c762fe069f13c1895fd840d7ab87e95c Signed-off-by: AppaRao Puli Signed-off-by: Richard Marian Thomaiyar --- .../Control/Service/Attributes.interface.yaml | 36 ++++++++++++++++++++++ xyz/openbmc_project/Control/Service/README.md | 36 ++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 xyz/openbmc_project/Control/Service/Attributes.interface.yaml create mode 100644 xyz/openbmc_project/Control/Service/README.md (limited to 'xyz') diff --git a/xyz/openbmc_project/Control/Service/Attributes.interface.yaml b/xyz/openbmc_project/Control/Service/Attributes.interface.yaml new file mode 100644 index 0000000..e9bfc92 --- /dev/null +++ b/xyz/openbmc_project/Control/Service/Attributes.interface.yaml @@ -0,0 +1,36 @@ +description: > + This interface exposes properties for service objects like + SSH, web, RMCP+ etc. under the service configuration manager. + This interface can be used to get/set of service properties. + +properties: + - name: State + type: enum[self.SupportedStates] + description: > + Specifies the state of the service. + - name: Port + type: uint32 + description: > + Specifies the listening port number of service. + This property is used to get or set the service + listening port number. + - name: Channel + type: array[string] + description: > + Specifies the channel on which service allows client + connections. This property is used to get or set the + allowed channel interfaces in array of strings. It accepts + the interface names, which are created as objects in + network service and returns error if not found. + +enumerations: + - name: SupportedStates + description: > + State values. + values: + - name: 'enabled' + description: > + Service is enabled. + - name: 'disabled' + description: > + Service is disabled. diff --git a/xyz/openbmc_project/Control/Service/README.md b/xyz/openbmc_project/Control/Service/README.md new file mode 100644 index 0000000..fd9f92c --- /dev/null +++ b/xyz/openbmc_project/Control/Service/README.md @@ -0,0 +1,36 @@ +# Service Management + +## Overview +Applications must use service manager daemon to configure services like +phosphor-ipmi-net, web, SSH etc. service in the system, instead of +directly controlling the same using 'systemd' or 'iptables'. This way client +applications doesn't need to change to configure services, when the +implementations differ. + +### Attributes Interface +Service manager daemon, will create objects for configurable service +in the system under object path `/xyz/openbmc_project/Control/Service/`. +Each service object can be handled through 'org.freedesktop.DBus.ObjectManager'. +Service object will expose following properties. + +#### xyz.openbmc_project.Control.Service.Attributes interface +##### properties +* State - State of the service. Enabled / Disabled. +* Port - Port number to which the service is configured to listen. +* Channel - Supported network interface objects, to which port has to bind. + +## Note +Implementations can elect to implement service manager daemon either through +'systemctl' (override.conf) or implement the same through 'iptables' logic, of +disabling the port, updating the port etc. + +## Example usage: +Webserver can update the RMCP+ port number from default 623 to different one, +by updating the `Port` property value under path `/xyz/openbmc_project/Control/ +Service/netipmid` through interface `xyz.openbmc_project.Control.Service. +Attributes`. + +## Systemd (override.conf) implementation +In order to update the property value, `override.conf` file under `/etc/systemd +/system//` has to be updated and service unit has to be +restarted through `org.freedesktop.systemd1`. -- cgit v1.2.1