Joseph Fu | b93b36f | 2022-01-27 11:31:24 +0800 | [diff] [blame^] | 1 | - name: chassis capabilities path |
| 2 | class: group |
| 3 | group: path |
| 4 | members: |
| 5 | - meta: PATH |
| 6 | path: /xyz/openbmc_project/control/chassis_capabilities |
| 7 | |
| 8 | - name: intrusion property |
| 9 | class: group |
| 10 | group: property |
| 11 | type: boolean |
| 12 | members: |
| 13 | - interface: xyz.openbmc_project.Control.ChassisCapabilities |
| 14 | meta: PROPERTY |
| 15 | property: ChassisIntrusionEnabled |
| 16 | |
| 17 | - name: watch intrusionenable |
| 18 | class: watch |
| 19 | watch: property |
| 20 | paths: chassis capabilities path |
| 21 | properties: intrusion property |
| 22 | callback: intrusion enable |
| 23 | |
| 24 | - name: watch intrusiondisable |
| 25 | class: watch |
| 26 | watch: property |
| 27 | paths: chassis capabilities path |
| 28 | properties: intrusion property |
| 29 | callback: intrusion disable |
| 30 | |
| 31 | - name: intrusion enable |
| 32 | class: condition |
| 33 | condition: count |
| 34 | paths: chassis capabilities path |
| 35 | properties: intrusion property |
| 36 | callback: enable log and event |
| 37 | countop: '==' |
| 38 | countbound: 1 |
| 39 | op: '==' |
| 40 | bound: true |
| 41 | |
| 42 | - name: intrusion disable |
| 43 | class: condition |
| 44 | condition: count |
| 45 | paths: chassis capabilities path |
| 46 | properties: intrusion property |
| 47 | callback: disable log and event |
| 48 | countop: '==' |
| 49 | countbound: 1 |
| 50 | op: '==' |
| 51 | bound: false |
| 52 | |
| 53 | - name: enable log and event |
| 54 | class: callback |
| 55 | callback: group |
| 56 | members: |
| 57 | - journal callback enable value |
| 58 | - start intrusion sensor |
| 59 | |
| 60 | - name: disable log and event |
| 61 | class: callback |
| 62 | callback: group |
| 63 | members: |
| 64 | - journal callback disable value |
| 65 | - stop intrusion sensor |
| 66 | |
| 67 | - name: journal callback enable value |
| 68 | class: callback |
| 69 | callback: journal |
| 70 | paths: chassis capabilities path |
| 71 | properties: intrusion property |
| 72 | severity: INFO |
| 73 | message: chassis intrusion enable |
| 74 | |
| 75 | - name: journal callback disable value |
| 76 | class: callback |
| 77 | callback: journal |
| 78 | paths: chassis capabilities path |
| 79 | properties: intrusion property |
| 80 | severity: INFO |
| 81 | message: chassis intrusion disable |
| 82 | |
| 83 | - name: stop intrusion sensor |
| 84 | description: > |
| 85 | 'Stop intrusion sensor.' |
| 86 | class: callback |
| 87 | callback: method |
| 88 | service: org.freedesktop.systemd1 |
| 89 | path: /org/freedesktop/systemd1 |
| 90 | interface: org.freedesktop.systemd1.Manager |
| 91 | method: StopUnit |
| 92 | args: |
| 93 | - value: xyz.openbmc_project.intrusionsensor.service |
| 94 | type: string |
| 95 | - value: replace |
| 96 | type: string |
| 97 | |
| 98 | - name: start intrusion sensor |
| 99 | description: > |
| 100 | 'Start intrusion sensor.' |
| 101 | class: callback |
| 102 | callback: method |
| 103 | service: org.freedesktop.systemd1 |
| 104 | path: /org/freedesktop/systemd1 |
| 105 | interface: org.freedesktop.systemd1.Manager |
| 106 | method: StartUnit |
| 107 | args: |
| 108 | - value: xyz.openbmc_project.intrusionsensor.service |
| 109 | type: string |
| 110 | - value: replace |
| 111 | type: string |