1- name: OS state path group
2  class: group
3  group: path
4  members:
5      - meta: PATH
6        path: /xyz/openbmc_project/state/host0
7
8- name: Chassis power state path group
9  class: group
10  group: path
11  members:
12      - meta: PATH
13        path: /xyz/openbmc_project/state/chassis0
14
15- name: OS state property group
16  class: group
17  group: property
18  type: string
19  members:
20      - interface: xyz.openbmc_project.State.OperatingSystem.Status
21        meta: PROPERTY
22        property: OperatingSystemState
23
24- name: Chassis power state property group
25  class: group
26  group: property
27  type: string
28  members:
29      - interface: xyz.openbmc_project.State.Chassis
30        meta: PROPERTY
31        property: CurrentPowerState
32
33- name: watch OS state
34  class: watch
35  watch: property
36  paths: OS state path group
37  properties: OS state property group
38  callback: OS state callback group
39  ignore_start_callback: true
40
41- name: watch power state
42  class: watch
43  watch: property
44  paths: Chassis power state path group
45  properties: Chassis power state property group
46  callback: Chassis power state callback group
47  ignore_start_callback: true
48
49- name: OS BootComplete condition
50  class: condition
51  condition: count
52  paths: OS state path group
53  properties: OS state property group
54  callback: turn on boot status led callback
55  countop: ">="
56  countbound: 1
57  op: "=="
58  bound: "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.BootComplete"
59
60- name: OS Inactive condition
61  class: condition
62  condition: count
63  paths: OS state path group
64  properties: OS state property group
65  callback: blink boot status led callback
66  countop: ">="
67  countbound: 1
68  op: "=="
69  bound: "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive"
70
71- name: OS state callback group
72  class: callback
73  callback: group
74  members:
75      - OS BootComplete condition
76      - OS Inactive condition
77      - OS journal callback
78
79- name: Chassis power on condition
80  class: condition
81  condition: count
82  paths: Chassis power state path group
83  properties: Chassis power state property group
84  callback: OS Inactive condition
85  countop: ">="
86  countbound: 1
87  op: "=="
88  bound: "xyz.openbmc_project.State.Chassis.PowerState.On"
89
90- name: Chassis power off condition
91  class: condition
92  condition: count
93  paths: Chassis power state path group
94  properties: Chassis power state property group
95  callback: turn off boot status led callback
96  countop: ">="
97  countbound: 1
98  op: "=="
99  bound: "xyz.openbmc_project.State.Chassis.PowerState.Off"
100
101- name: Chassis power state callback group
102  class: callback
103  callback: group
104  members:
105      - Chassis power on condition
106      - Chassis power off condition
107
108- name: turn on boot status led callback
109  class: callback
110  callback: method
111  service: org.freedesktop.systemd1
112  path: /org/freedesktop/systemd1
113  interface: org.freedesktop.systemd1.Manager
114  method: StartUnit
115  args:
116      - value: boot_status_led_on.service
117        type: string
118      - value: replace
119        type: string
120
121- name: turn off boot status led callback
122  class: callback
123  callback: method
124  service: org.freedesktop.systemd1
125  path: /org/freedesktop/systemd1
126  interface: org.freedesktop.systemd1.Manager
127  method: StartUnit
128  args:
129      - value: boot_status_led_off.service
130        type: string
131      - value: replace
132        type: string
133
134- name: blink boot status led callback
135  class: callback
136  callback: method
137  service: org.freedesktop.systemd1
138  path: /org/freedesktop/systemd1
139  interface: org.freedesktop.systemd1.Manager
140  method: StartUnit
141  args:
142      - value: boot_status_led_blink.service
143        type: string
144      - value: replace
145        type: string
146
147- name: OS journal callback
148  class: callback
149  callback: journal
150  paths: OS state path group
151  properties: OS state property group
152  severity: INFO
153  message: OS state change received!
154