CA-135187: Filter out restricted device_config keys

A commit fixing SCTX-1616 now causes PBD create to throw an error if given
a device_config with the SRmaster key in (internal use only).

However, if this happened to exist from a time when this was not forbidden then
pool join will fail since the slave uses the device_config from the master's
PBD record which might contain this key.

This commit filters this key out in the pool join code-path.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CA-135189: Remove restricted device_config on upgrade

The SRmaster key is restricted for internal use only. There are precautions
taken against creating PBDs with such a key in the device config now but we
should purge the database of any such keys created before these measures were
in place.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Merge pull request #1734 from simonjbeaumont/sctx-1616

CA-135187: Filter out restricted device_config keys
Merge pull request #1736 from simonjbeaumont/ca-135189

CA-135189: Remove restricted device_config on upgrade
Add a test for event inject

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Fix a defect where event.from can go into a tight loop

This puts the subscription check into the inner loop
of the event.from rather than when gathering the
snapshots. This fixes a problem where xapi would go into
a tight loop when subscribed to a particular objects
events and a different object of the same class was
updated. This tight loop also wouldn't perform the
session check so logging out the session wouldn't cause
the call to return.

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
If we're not using the message switch, there can be only one xenopsd.

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Ignore new artifacts of OUnit2 test runs

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Merge pull request #1748 from jonludlam/event-problems

Event problems
Merge pull request #1749 from simonjbeaumont/ignore-ounit-cruft

Ignore new artifacts of OUnit2 test runs