diff options
author | John Wang <wangzqbj@inspur.com> | 2019-09-11 15:18:15 +0800 |
---|---|---|
committer | John Wang <wangzqbj@inspur.com> | 2019-09-17 08:47:17 +0800 |
commit | d05d47254e0dcb7cfe8284ecb8a839c903262122 (patch) | |
tree | 6c271d05d5f9226346f65cdb40580bb55139d394 | |
parent | d23b5b74cfadea0618e5984e8d3565d2696d26b8 (diff) | |
download | openpower-pnor-code-mgmt-d05d47254e0dcb7cfe8284ecb8a839c903262122.tar.gz openpower-pnor-code-mgmt-d05d47254e0dcb7cfe8284ecb8a839c903262122.zip |
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
-rwxr-xr-x | Makefile.am | 18 | ||||
-rw-r--r-- | activation.hpp | 4 | ||||
-rwxr-xr-x | configure.ac | 2 | ||||
-rw-r--r-- | item_updater.hpp | 4 | ||||
-rw-r--r-- | msl_verify.cpp | 2 | ||||
-rw-r--r-- | org/openbmc/Associations.interface.yaml | 13 | ||||
-rwxr-xr-x | test/Makefile.am | 1 |
7 files changed, 6 insertions, 38 deletions
diff --git a/Makefile.am b/Makefile.am index 62cf62212..11e5a96b2 100755 --- a/Makefile.am +++ b/Makefile.am @@ -34,21 +34,11 @@ openpower_update_manager_SOURCES += \ 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 @@ generic_ldflags = \ -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 e3cff64bf..792e5d53f 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 AssociationList = 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 8b0ab7985..b43e50d2f 100755 --- a/configure.ac +++ b/configure.ac @@ -138,7 +138,7 @@ AC_DEFINE(SYSTEMD_INTERFACE, "org.freedesktop.systemd1.Manager", [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 01466bbd7..3a00afed3 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 @@ namespace updater 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 dc4238ce1..1d93613a9 100644 --- a/msl_verify.cpp +++ b/msl_verify.cpp @@ -85,7 +85,7 @@ std::string MinimumShipLevel::getFunctionalVersion() 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 9be60ceb7..000000000 --- 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 86ff68831..202653569 100755 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -31,7 +31,6 @@ utest_SOURCES = \ ../activation.cpp \ ../version.cpp \ ../item_updater.cpp \ - ../org/openbmc/Associations/server.cpp \ ../image_verify.cpp \ ../utils.cpp \ ../msl_verify.cpp \ |