updater: Add activations after versions

When the interfaces added signal is created, it contains all the
interfaces on that path. That means that when the activations map is
created, there's a interfaces added signal with the Activation property
in it. Then if versions is added after that, the interfaces added signal
will list the new properties such as ExtendedVersion, plus the existing
ones like Activation. This causes bmcweb to create 2 tasks for the
update Redfish call because it watches for the Activation property in
the interfaces added signal.

By adding versions first to d-bus, the Version properties are exposed to
d-bus first, then adding activations triggers interfaces added with the
Version properties plus the new Activation ones, so the Activation
property only appears once.

By coincidence, processBMCImage() inserts versions first, then
activations. It was likely not done on purpose but works out and there's
no need to change it there.

Tested: Verified Activation only showed up once in interfaces added with
busctl monitor and verified only one task
(GET https://$bmc/redfish/v1/TaskService/Tasks/) was created when
calling the UpdateService Redfish API.

Change-Id: I3a9e0c109b19ad7ad8d8041404b899a988e14368
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
1 file changed