summaryrefslogtreecommitdiff
path: root/meta-facebook/meta-yosemite4/recipes-phosphor/dbus/power-saving-policy/nic-3.yaml
blob: 7b207a80e46b58f713db8113dc93537655f4fd05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
- name: nic 3 current host state path group
  class: group
  group: path
  members:
      - meta: PATH
        path: /xyz/openbmc_project/state/host5
      - meta: PATH
        path: /xyz/openbmc_project/state/host6

- name: current host state property
  class: group
  group: property
  type: string
  members:
      - interface: xyz.openbmc_project.State.Host
        meta: PROPERTY
        property: CurrentHostState

- name: nic 3 main mode monitor
  class: watch
  watch: property
  paths: nic 3 current host state path group
  properties: current host state property
  callback: check if fulfill nic main mode requirement

- name: nic 3 aux mode monitor
  class: watch
  watch: property
  paths: nic 3 current host state path group
  properties: current host state property
  callback: check if fulfill nic aux mode requirement

- name: check if fulfill nic main mode requirement
  class: condition
  condition: count
  paths: nic 3 current host state path group
  properties: current host state property
  callback: switch nic 3 to main mode
  countop: ">="
  countbound: 1
  op: "=="
  bound: xyz.openbmc_project.State.Host.HostState.Running

- name: check if fulfill nic aux mode requirement
  class: condition
  condition: count
  paths: nic 3 current host state path group
  properties: current host state property
  callback: switch nic 3 to aux mode
  countop: "=="
  countbound: 2
  op: "=="
  bound: xyz.openbmc_project.State.Host.HostState.Off

- name: switch nic 3 to main mode
  class: callback
  callback: method
  service: org.freedesktop.systemd1
  path: /org/freedesktop/systemd1
  interface: org.freedesktop.systemd1.Manager
  method: StartUnit
  args:
      - value: switch-nic-to-main-mode@3.service
        type: string
      - value: replace
        type: string

- name: switch nic 3 to aux mode
  class: callback
  callback: method
  service: org.freedesktop.systemd1
  path: /org/freedesktop/systemd1
  interface: org.freedesktop.systemd1.Manager
  method: StartUnit
  args:
      - value: switch-nic-to-aux-mode@3.service
        type: string
      - value: replace
        type: string