summaryrefslogtreecommitdiff
path: root/redfish-core/lib/event_service.hpp
diff options
context:
space:
mode:
authorAppaRao Puli <apparao.puli@linux.intel.com>2020-09-07 23:23:21 +0300
committerAppaRao Puli <apparao.puli@linux.intel.com>2020-09-09 05:18:54 +0300
commitdd28ba829972906cbe2d372cf4ec00fdf82fbb83 (patch)
tree155f77b8c23b4bedc3a326cd01a765c286ad907b /redfish-core/lib/event_service.hpp
parent029cc1f4106968f7e871d17a8bcb71a303a12ffa (diff)
downloadbmcweb-dd28ba829972906cbe2d372cf4ec00fdf82fbb83.tar.xz
Add MutualExclusiveProperties registry
Add MutualExclusiveProperties message registry entry and error message. As per redfish specification, "RegistryPrefixes" and "MessageIds" are mutually exclusive. So add check for same in EventService and return MutualExclusiveProperties error message. Tested: - Create subscription failed with error(bad request) when the request body contain both "RegistryPrefixes" and "MessageIds". Change-Id: I4c14f946977bce2ced8a7f96eb85855117fde9a8 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
Diffstat (limited to 'redfish-core/lib/event_service.hpp')
-rw-r--r--redfish-core/lib/event_service.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
index e1c06ec3f2..f7b76d1b22 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
@@ -250,6 +250,16 @@ class EventDestinationCollection : public Node
return;
}
+ if (regPrefixes && msgIds)
+ {
+ if (regPrefixes->size() && msgIds->size())
+ {
+ messages::mutualExclusiveProperties(
+ asyncResp->res, "RegistryPrefixes", "MessageIds");
+ return;
+ }
+ }
+
// Validate the URL using regex expression
// Format: <protocol>://<host>:<port>/<uri>
// protocol: http/https