control:p10bmc: OCC inactive fan floor event

Set and hold a fan floor unless all OCCs are active.

Example of a boot with just this floor event:
zone-floor0: count_state_floor-2 is setting floor hold to 10000",
zone-floor0: Setting new floor to 10000",
zone-floor0: count_state_floor-2 is removing floor hold",
zone-floor0: No set floor exists, using default floor"

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ia4521764130822c0962b8e2c7570f87bddf77b7e
diff --git a/control/config_files/p10bmc/ibm,everest/events.json b/control/config_files/p10bmc/ibm,everest/events.json
index 25d4b54..b52d0bd 100644
--- a/control/config_files/p10bmc/ibm,everest/events.json
+++ b/control/config_files/p10bmc/ibm,everest/events.json
@@ -125,5 +125,40 @@
          ]
        }
      ]
-   }
+   },
+   {
+    // Set a fan floor if an OCC isn't active
+    "name": "Non-active OCC(s)",
+    "groups": [
+      {
+        "name": "occ objects",
+        "interface": "org.open_power.OCC.Status",
+        "property": {
+          "name": "OccActive"
+        }
+      }
+    ],
+    "triggers": [
+      {
+        "class": "signal",
+        "signal": "properties_changed"
+      },
+      {
+        "class": "signal",
+        "signal": "interfaces_added"
+      },
+      {
+        "class": "init",
+        "method": "get_properties"
+      }
+    ],
+    "actions": [
+      {
+        "name": "count_state_floor",
+        "count": 1,
+        "state": false,
+        "floor": 10700
+      }
+    ]
+  }
 ]
diff --git a/control/config_files/p10bmc/ibm,rainier-1s4u/events.json b/control/config_files/p10bmc/ibm,rainier-1s4u/events.json
index 461fc7b..5f273f9 100644
--- a/control/config_files/p10bmc/ibm,rainier-1s4u/events.json
+++ b/control/config_files/p10bmc/ibm,rainier-1s4u/events.json
@@ -125,5 +125,40 @@
          ]
        }
      ]
-   }
+   },
+   {
+    // Set a fan floor if an OCC isn't active
+    "name": "Non-active OCC(s)",
+    "groups": [
+      {
+        "name": "occ objects",
+        "interface": "org.open_power.OCC.Status",
+        "property": {
+          "name": "OccActive"
+        }
+      }
+    ],
+    "triggers": [
+      {
+        "class": "signal",
+        "signal": "properties_changed"
+      },
+      {
+        "class": "signal",
+        "signal": "interfaces_added"
+      },
+      {
+        "class": "init",
+        "method": "get_properties"
+      }
+    ],
+    "actions": [
+      {
+        "name": "count_state_floor",
+        "count": 1,
+        "state": false,
+        "floor": 10000
+      }
+    ]
+  }
 ]
diff --git a/control/config_files/p10bmc/ibm,rainier-2u/events.json b/control/config_files/p10bmc/ibm,rainier-2u/events.json
index 4620a1c..a65b778 100644
--- a/control/config_files/p10bmc/ibm,rainier-2u/events.json
+++ b/control/config_files/p10bmc/ibm,rainier-2u/events.json
@@ -135,5 +135,40 @@
          ]
        }
      ]
-   }
+   },
+   {
+    // Set a fan floor if an OCC isn't active
+    "name": "Non-active OCCs",
+    "groups": [
+      {
+        "name": "occ objects",
+        "interface": "org.open_power.OCC.Status",
+        "property": {
+          "name": "OccActive"
+        }
+      }
+    ],
+    "triggers": [
+      {
+        "class": "signal",
+        "signal": "properties_changed"
+      },
+      {
+        "class": "signal",
+        "signal": "interfaces_added"
+      },
+      {
+        "class": "init",
+        "method": "get_properties"
+      }
+    ],
+    "actions": [
+      {
+        "name": "count_state_floor",
+        "count": 1,
+        "state": false,
+        "floor": 11200
+      }
+    ]
+  }
 ]
diff --git a/control/config_files/p10bmc/ibm,rainier-4u/events.json b/control/config_files/p10bmc/ibm,rainier-4u/events.json
index d3c0712..70d0b7d 100644
--- a/control/config_files/p10bmc/ibm,rainier-4u/events.json
+++ b/control/config_files/p10bmc/ibm,rainier-4u/events.json
@@ -135,5 +135,40 @@
          ]
        }
      ]
-   }
+   },
+   {
+    // Set a fan floor if an OCC isn't active
+    "name": "Non-active OCCs",
+    "groups": [
+      {
+        "name": "occ objects",
+        "interface": "org.open_power.OCC.Status",
+        "property": {
+          "name": "OccActive"
+        }
+      }
+    ],
+    "triggers": [
+      {
+        "class": "signal",
+        "signal": "properties_changed"
+      },
+      {
+        "class": "signal",
+        "signal": "interfaces_added"
+      },
+      {
+        "class": "init",
+        "method": "get_properties"
+      }
+    ],
+    "actions": [
+      {
+        "name": "count_state_floor",
+        "count": 1,
+        "state": false,
+        "floor": 10000
+      }
+    ]
+  }
 ]