Fix Association interface

Mapper changed to only allow the new interface, update
to it.

Tested: Mapper showed all associations

Change-Id: I8b252c70e9f27b083a438393c731fbeb3e2ca0e5
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/include/Utils.hpp b/include/Utils.hpp
index abe5e7a..37b5a85 100644
--- a/include/Utils.hpp
+++ b/include/Utils.hpp
@@ -98,6 +98,12 @@
 const static constexpr char* property = "OperatingSystemState";
 } // namespace post
 
+namespace association
+{
+const static constexpr char* interface =
+    "xyz.openbmc_project.Association.Definitions";
+} // namespace association
+
 template <typename T>
 inline T loadVariant(
     const boost::container::flat_map<std::string, BasicVariantType>& data,
diff --git a/src/ADCSensor.cpp b/src/ADCSensor.cpp
index ec3efdb..4aa8cc1 100644
--- a/src/ADCSensor.cpp
+++ b/src/ADCSensor.cpp
@@ -70,8 +70,7 @@
             "xyz.openbmc_project.Sensor.Threshold.Critical");
     }
     association = objectServer.add_interface(
-        "/xyz/openbmc_project/sensors/voltage/" + name,
-        "org.openbmc.Associations");
+        "/xyz/openbmc_project/sensors/voltage/" + name, association::interface);
     setInitialProperties(conn);
     setupRead();
 
diff --git a/src/CPUSensor.cpp b/src/CPUSensor.cpp
index 7654fde..1b04299 100644
--- a/src/CPUSensor.cpp
+++ b/src/CPUSensor.cpp
@@ -63,7 +63,7 @@
         }
         association = objectServer.add_interface(
             "/xyz/openbmc_project/sensors/temperature/" + name,
-            "org.openbmc.Associations");
+            association::interface);
 
         setInitialProperties(conn);
     }
diff --git a/src/ExitAirTempSensor.cpp b/src/ExitAirTempSensor.cpp
index 972b42b..ca1cc9e 100644
--- a/src/ExitAirTempSensor.cpp
+++ b/src/ExitAirTempSensor.cpp
@@ -175,7 +175,7 @@
     }
 
     association = objectServer.add_interface(
-        "/xyz/openbmc_project/sensors/cfm/" + name, "org.openbmc.Associations");
+        "/xyz/openbmc_project/sensors/cfm/" + name, association::interface);
 
     setInitialProperties(conn);
     setupSensorMatch(
@@ -493,7 +493,7 @@
     }
     association = objectServer.add_interface(
         "/xyz/openbmc_project/sensors/temperature/" + name,
-        "org.openbmc.Associations");
+        association::interface);
     setInitialProperties(conn);
     setupMatches();
     setupPowerMatch(conn);
diff --git a/src/HwmonTempSensor.cpp b/src/HwmonTempSensor.cpp
index 16742ce..52ad8fe 100644
--- a/src/HwmonTempSensor.cpp
+++ b/src/HwmonTempSensor.cpp
@@ -64,7 +64,7 @@
     }
     association = objectServer.add_interface(
         "/xyz/openbmc_project/sensors/temperature/" + name,
-        "org.openbmc.Associations");
+        association::interface);
     setInitialProperties(conn);
     setupRead();
 }
diff --git a/src/IpmbSensor.cpp b/src/IpmbSensor.cpp
index 946c060..cb7b705 100644
--- a/src/IpmbSensor.cpp
+++ b/src/IpmbSensor.cpp
@@ -80,8 +80,7 @@
         thresholdInterfaceCritical = objectServer.add_interface(
             dbusPath, "xyz.openbmc_project.Sensor.Threshold.Critical");
     }
-    association =
-        objectServer.add_interface(dbusPath, "org.openbmc.Associations");
+    association = objectServer.add_interface(dbusPath, association::interface);
     setupPowerMatch(conn);
 }
 
diff --git a/src/MCUTempSensor.cpp b/src/MCUTempSensor.cpp
index 0b621d0..bf6c2c6 100644
--- a/src/MCUTempSensor.cpp
+++ b/src/MCUTempSensor.cpp
@@ -78,7 +78,7 @@
     }
     association = objectServer.add_interface(
         "/xyz/openbmc_project/sensors/temperature/" + name,
-        "org.openbmc.Associations");
+        association::interface);
 }
 
 MCUTempSensor::~MCUTempSensor()
diff --git a/src/PSUSensor.cpp b/src/PSUSensor.cpp
index 015a367..a7156a7 100644
--- a/src/PSUSensor.cpp
+++ b/src/PSUSensor.cpp
@@ -59,8 +59,7 @@
     }
     setInitialProperties(conn);
 
-    association =
-        objectServer.add_interface(dbusPath, "org.openbmc.Associations");
+    association = objectServer.add_interface(dbusPath, association::interface);
 
     createInventoryAssoc(conn, association, configurationPath);
     setupRead();
diff --git a/src/PwmSensor.cpp b/src/PwmSensor.cpp
index c33f05c..063c359 100644
--- a/src/PwmSensor.cpp
+++ b/src/PwmSensor.cpp
@@ -115,8 +115,7 @@
     controlInterface->initialize();
 
     association = objectServer.add_interface(
-        "/xyz/openbmc_project/sensors/fan_pwm/" + name,
-        "org.openbmc.Associations");
+        "/xyz/openbmc_project/sensors/fan_pwm/" + name, association::interface);
     createAssociation(association, sensorConfiguration);
 }
 PwmSensor::~PwmSensor()
diff --git a/src/TachSensor.cpp b/src/TachSensor.cpp
index 23ae477..e000780 100644
--- a/src/TachSensor.cpp
+++ b/src/TachSensor.cpp
@@ -66,7 +66,7 @@
     }
     association = objectServer.add_interface(
         "/xyz/openbmc_project/sensors/fan_tach/" + name,
-        "org.openbmc.Associations");
+        association::interface);
 
     if (presence)
     {
@@ -77,9 +77,8 @@
                                      std::string()); // unused property
         itemIface->register_property("Present", true);
         itemIface->initialize();
-        itemAssoc =
-            objectServer.add_interface("/xyz/openbmc_project/inventory/" + name,
-                                       "org.openbmc.Associations");
+        itemAssoc = objectServer.add_interface(
+            "/xyz/openbmc_project/inventory/" + name, association::interface);
         itemAssoc->register_property(
             "associations",
             std::vector<Association>{
@@ -315,7 +314,7 @@
         "xyz.openbmc_project.Control.FanRedundancy")),
     association(objectServer.add_interface(
         "/xyz/openbmc_project/control/FanRedundancy/Tach",
-        "org.openbmc.Associations")),
+        association::interface)),
     objectServer(objectServer)
 {
     createAssociation(association, sensorConfiguration);
diff --git a/src/Utils.cpp b/src/Utils.cpp
index a9c2398..2d75d9d 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -254,7 +254,7 @@
         std::vector<Association> associations;
         associations.push_back(
             Association("chassis", "all_sensors", p.parent_path().string()));
-        association->register_property("associations", associations);
+        association->register_property("Associations", associations);
         association->initialize();
     }
 }
@@ -272,7 +272,7 @@
             Association("inventory", "sensors", p.parent_path().string()));
         associations.push_back(
             Association("chassis", "all_sensors", chassisPath));
-        association->register_property("associations", associations);
+        association->register_property("Associations", associations);
         association->initialize();
     }
 }