Move to new association interface

A new association interface is defined in phosphor-dbus-interfaces
It would be nice to move the local version of the interface
to the new one.

The behavior of how association work is described here:
https://github.com/openbmc/docs/blob/master/object-mapper.md#associations

Partially resolves openbmc/openbmc#3584

Tested: See the org.openbmc.Associations interface has been replaced by the xyz
one in /xyz/openbmc_project/software/version_id object and only when the
version number is less than PNOR_MSL, "PNOR Minimum Ship Level NOT met"
is reported.

Signed-off-by: John Wang <wangzqbj@inspur.com>
Change-Id: If4afeb69a9bd8bc494b77826f2ec2854a71f56f5
diff --git a/Makefile.am b/Makefile.am
index 62cf622..11e5a96 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -34,21 +34,11 @@
 	image_verify.cpp
 endif
 
-nodist_openpower_update_manager_SOURCES = \
-	org/openbmc/Associations/server.cpp
 
 openpower_pnor_msl_SOURCES = \
 	msl_verify.cpp \
 	msl_verify_main.cpp
 
-CLEANFILES = \
-	org/openbmc/Associations/server.cpp \
-	org/openbmc/Associations/server.hpp
-
-BUILT_SOURCES = \
-	org/openbmc/Associations/server.cpp \
-	org/openbmc/Associations/server.hpp
-
 generic_cxxflags = \
 	$(SYSTEMD_CFLAGS) \
 	$(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
@@ -64,14 +54,6 @@
 	-lssl \
 	-lcrypto
 
-org/openbmc/Associations/server.cpp: org/openbmc/Associations.interface.yaml
-	@mkdir -p `dirname $@`
-	$(SDBUSPLUSPLUS) -r $(srcdir) interface server-cpp org.openbmc.Associations > $@
-
-org/openbmc/Associations/server.hpp: org/openbmc/Associations.interface.yaml
-	@mkdir -p `dirname $@`
-	$(SDBUSPLUSPLUS) -r $(srcdir) interface server-header org.openbmc.Associations > $@
-
 openpower_update_manager_CXXFLAGS = $(generic_cxxflags)
 openpower_update_manager_LDFLAGS = $(generic_ldflags)
 openpower_pnor_msl_CXXFLAGS = $(generic_cxxflags)
diff --git a/activation.hpp b/activation.hpp
index e3cff64..792e5d5 100644
--- a/activation.hpp
+++ b/activation.hpp
@@ -2,13 +2,13 @@
 
 #include "config.h"
 
-#include "org/openbmc/Associations/server.hpp"
 #include "utils.hpp"
 #include "xyz/openbmc_project/Software/ActivationProgress/server.hpp"
 #include "xyz/openbmc_project/Software/ExtendedVersion/server.hpp"
 #include "xyz/openbmc_project/Software/RedundancyPriority/server.hpp"
 
 #include <sdbusplus/server.hpp>
+#include <xyz/openbmc_project/Association/Definitions/server.hpp>
 #include <xyz/openbmc_project/Software/Activation/server.hpp>
 #include <xyz/openbmc_project/Software/ActivationBlocksTransition/server.hpp>
 
@@ -24,7 +24,7 @@
 using ActivationInherit = sdbusplus::server::object::object<
     sdbusplus::xyz::openbmc_project::Software::server::ExtendedVersion,
     sdbusplus::xyz::openbmc_project::Software::server::Activation,
-    sdbusplus::org::openbmc::server::Associations>;
+    sdbusplus::xyz::openbmc_project::Association::server::Definitions>;
 using ActivationBlocksTransitionInherit = sdbusplus::server::object::object<
     sdbusplus::xyz::openbmc_project::Software::server::
         ActivationBlocksTransition>;
diff --git a/configure.ac b/configure.ac
index 8b0ab79..b43e50d 100755
--- a/configure.ac
+++ b/configure.ac
@@ -138,7 +138,7 @@
     [systemd interface.])
 AC_DEFINE(SYSTEMD_PROPERTY_INTERFACE, "org.freedesktop.DBus.Properties",
     [systemd properties interface.])
-AC_DEFINE(ASSOCIATIONS_INTERFACE, "org.openbmc.Associations",
+AC_DEFINE(ASSOCIATIONS_INTERFACE, "xyz.openbmc_project.Association.Definitions",
     [The associations interface.])
 
 AC_DEFINE(PNOR_TOC_FILE, "pnor.toc",
diff --git a/item_updater.hpp b/item_updater.hpp
index 01466bb..3a00afe 100644
--- a/item_updater.hpp
+++ b/item_updater.hpp
@@ -1,11 +1,11 @@
 #pragma once
 
 #include "activation.hpp"
-#include "org/openbmc/Associations/server.hpp"
 #include "version.hpp"
 #include "xyz/openbmc_project/Collection/DeleteAll/server.hpp"
 
 #include <sdbusplus/server.hpp>
+#include <xyz/openbmc_project/Association/Definitions/server.hpp>
 #include <xyz/openbmc_project/Common/FactoryReset/server.hpp>
 #include <xyz/openbmc_project/Object/Enable/server.hpp>
 
@@ -18,7 +18,7 @@
 
 using ItemUpdaterInherit = sdbusplus::server::object::object<
     sdbusplus::xyz::openbmc_project::Common::server::FactoryReset,
-    sdbusplus::org::openbmc::server::Associations,
+    sdbusplus::xyz::openbmc_project::Association::server::Definitions,
     sdbusplus::xyz::openbmc_project::Collection::server::DeleteAll>;
 using GardResetInherit = sdbusplus::server::object::object<
     sdbusplus::xyz::openbmc_project::Common::server::FactoryReset>;
diff --git a/msl_verify.cpp b/msl_verify.cpp
index dc4238c..1d93613 100644
--- a/msl_verify.cpp
+++ b/msl_verify.cpp
@@ -85,7 +85,7 @@
     auto bus = sdbusplus::bus::new_default();
     auto method = bus.new_method_call(BUSNAME_UPDATER, SOFTWARE_OBJPATH,
                                       SYSTEMD_PROPERTY_INTERFACE, "Get");
-    method.append(ASSOCIATIONS_INTERFACE, "associations");
+    method.append(ASSOCIATIONS_INTERFACE, "Associations");
     auto response = bus.call(method);
 
     sdbusplus::message::variant<AssociationList> associations;
diff --git a/org/openbmc/Associations.interface.yaml b/org/openbmc/Associations.interface.yaml
deleted file mode 100644
index 9be60ce..0000000
--- a/org/openbmc/Associations.interface.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
-description: >
-    Implement to delegate org.openbmc.Association interface management
-    responsibilities to another application.
-properties:
-    - name: associations
-      type: array[struct[string,string,string]]
-      description: >
-          An array of forward, reverse, endpoint tuples where:
-              forward - The type of the association.
-              reverse - The type of the association to create for the endpoint.
-              endpoint - The association endpoint.
-
-# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
diff --git a/test/Makefile.am b/test/Makefile.am
index 86ff688..2026535 100755
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -31,7 +31,6 @@
 	../activation.cpp \
 	../version.cpp \
 	../item_updater.cpp \
-	../org/openbmc/Associations/server.cpp \
 	../image_verify.cpp \
 	../utils.cpp \
 	../msl_verify.cpp \