OpenPOWER: Add support for OpenPOWER dump policy

This commit introduces support for the system dump policy,
wherein 'system dump' refers to all OpenPOWER dumps.
This term encompasses all dumps from host subsystems on
OpenPOWER systems, which are collectively referred to
as system dumps. The currently supported policy is
'dump enable'. A dump will be created only if this
policy is enabled. If the policy is not enabled,
a 'dump disabled' error message will be returned.

In scenarios where the settings service is unavailable,
the system will default to considering the dump as enabled.

Tests:
- Create a dump with policy enabled
busctl --verbose call xyz.openbmc_project.Settings \
/xyz/openbmc_project/dump/system_dump_policy \
org.freedesktop.DBus.Properties \
Get ss "xyz.openbmc_project.Object.Enable" "Enabled"
MESSAGE "v" {
        VARIANT "b" {
                BOOLEAN true;
        };
};

busctl --verbose call xyz.openbmc_project.Dump.Manager \
/xyz/openbmc_project/dump/resource \
xyz.openbmc_project.Dump.Create CreateDump a{sv} 2 \
"com.ibm.Dump.Create.CreateParameters.VSPString" s \
"vsp" "com.ibm.Dump.Create.CreateParameters.Password" \
s "password"
MESSAGE "o" {
        OBJECT_PATH "/xyz/openbmc_project/dump/resource/entry/1";
};

Result: Dump created

- Create a dump with policy disabled
busctl --verbose call xyz.openbmc_project.Settings \
/xyz/openbmc_project/dump/system_dump_policy \
org.freedesktop.DBus.Properties Get ss \
"xyz.openbmc_project.Object.Enable" "Enabled"
MESSAGE "v" {
        VARIANT "b" {
                BOOLEAN false;
        };
};

busctl --verbose call xyz.openbmc_project.Dump.Manager \
/xyz/openbmc_project/dump/resource \
xyz.openbmc_project.Dump.Create CreateDump a{sv} 2 \
"com.ibm.Dump.Create.CreateParameters.VSPString" s "vsp" \
"com.ibm.Dump.Create.CreateParameters.Password" s "password"
Call failed: Dump is disabled on this system.

Result: Dump is not allowed

Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: I5dc609b1f4fd0f36df8520f8a75c18a4cd3d7c4c
diff --git a/dump-extensions/openpower-dumps/meson.build b/dump-extensions/openpower-dumps/meson.build
index abb9904..f4ef0cd 100644
--- a/dump-extensions/openpower-dumps/meson.build
+++ b/dump-extensions/openpower-dumps/meson.build
@@ -28,5 +28,6 @@
         'dump-extensions/openpower-dumps/dump_manager_system.cpp',
         'dump-extensions/openpower-dumps/system_dump_entry.cpp',
         'dump-extensions/openpower-dumps/dump_manager_resource.cpp',
-        'dump-extensions/openpower-dumps/resource_dump_entry.cpp'
+        'dump-extensions/openpower-dumps/resource_dump_entry.cpp',
+        'dump-extensions/openpower-dumps/op_dump_util.cpp'
     ]