common: Add emit_added for Software Update intf
The 'InterfacesAdded' signal is needed for the object mapper to know of
the dbus interface.
```
root@s8030-bmc-30303035c0c1:~# busctl tree xyz.openbmc_project.Software.BIOS
`- /xyz
`- /xyz/openbmc_project
`- /xyz/openbmc_project/software
`- /xyz/openbmc_project/software/HostSPIFlash_5592
```
But the object mapper does not find the object path
```
busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper GetSubTreePaths sias /xyz/openbmc_project 0 1 xyz.openbmc_project.Software.Update
as 2 "/xyz/openbmc_project/software/269f96b7" "/xyz/openbmc_project/software/bios_active"
```
meanwhile it finds the version interface, since there we already emit
the signal.
```
busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper GetSubTreePaths sias /xyz/openbmc_project 0 1 xyz.openbmc_project.Software.Version
as 7 "/xyz/openbmc_project/logging/entry/1" "/xyz/openbmc_project/logging/entry/2" "/xyz/openbmc_project/logging/entry/3" "/xyz/openbmc_project/logging/entry/4" "/xyz/openbmc_project/software/269f96b7" "/xyz/openbmc_project/software/HostSPIFlash_5592" "/xyz/openbmc_project/software/bios_active"
```
Tested: Since the interface is emitted, object mapper now knows of the
object path.
```
busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper GetSubTreePaths sias /xyz/openbmc_project 0 1 xyz.openbmc_project.Software.Update
as 3 "/xyz/openbmc_project/software/269f96b7" "/xyz/openbmc_project/software/HostSPIFlash_2523" "/xyz/openbmc_project/software/bios_active"
```
The software appears as updatable in the fw inventory.
```
curl --insecure --user root:root https://${bmc}/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_2523
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_2523",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Unknown image",
"Id": "HostSPIFlash_2523",
"Name": "Software Inventory",
"Status": {
"Health": "Warning",
"HealthRollup": "OK",
"State": "Disabled"
},
"Updateable": true,
"Version": "Unknown"
}
```
Change-Id: Ibb7f9a5d122e991048b3513c6b9448e105173ca5
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/common/include/software_update.hpp b/common/include/software_update.hpp
index 406c282..2e794af 100644
--- a/common/include/software_update.hpp
+++ b/common/include/software_update.hpp
@@ -19,10 +19,16 @@
SoftwareUpdate>
{
public:
+ SoftwareUpdate(const SoftwareUpdate&) = delete;
+ SoftwareUpdate(SoftwareUpdate&&) = delete;
+ SoftwareUpdate& operator=(const SoftwareUpdate&) = delete;
+ SoftwareUpdate& operator=(SoftwareUpdate&&) = delete;
SoftwareUpdate(sdbusplus::async::context& ctx, const char* path,
Software& software,
const std::set<RequestedApplyTimes>& allowedApplyTimes);
+ ~SoftwareUpdate();
+
auto method_call(start_update_t su, auto image, auto applyTime)
-> sdbusplus::async::task<start_update_t::return_type>;