Create role mapping under ldap config object
Each ldap config object should be have its own
mapping object.
This is to align with the redfish.
https://redfish.dmtf.org/schemas/AccountService.v1_4_0.json
As per redfish, Each config will have it's own
"RemoteRoleMapping".
Mapping object should be persisted and restores
when the phosphor-ldap-conf restarts.
TestedBy:
Unit Tested.
Creation of privilege mapping.
Persist the priv-mapping.
Restores the priv-mapping.
Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
Change-Id: I5ab4aeffae61f9cc57c1338f94784d0fe5607cd3
diff --git a/phosphor-ldap-config/ldap_mapper_serialize.hpp b/phosphor-ldap-config/ldap_mapper_serialize.hpp
index 5ab71c0..371a556 100644
--- a/phosphor-ldap-config/ldap_mapper_serialize.hpp
+++ b/phosphor-ldap-config/ldap_mapper_serialize.hpp
@@ -1,26 +1,24 @@
#pragma once
-#include <experimental/filesystem>
+#include <filesystem>
#include "config.h"
#include "ldap_mapper_entry.hpp"
namespace phosphor
{
-namespace user
+namespace ldap
{
-namespace fs = std::experimental::filesystem;
+namespace fs = std::filesystem;
/** @brief Serialize and persist LDAP privilege mapper D-Bus object
*
* @param[in] entry - LDAP privilege mapper entry
- * @param[in] id - filename of the persisted LDAP mapper entry
- * @param[in] dir - pathname of directory where the serialized privilege
- * mappings are stored.
+ * @param[in] path - pathname of persisted LDAP mapper entry
*
* @return fs::path - pathname of persisted error file
*/
-fs::path serialize(const LDAPMapperEntry& entry, Id id, const fs::path& dir);
+fs::path serialize(const LDAPMapperEntry& entry, const fs::path& dir);
/** @brief Deserialize a persisted LDAP privilege mapper into a D-Bus object
*
@@ -32,5 +30,5 @@
*/
bool deserialize(const fs::path& path, LDAPMapperEntry& entry);
-} // namespace user
+} // namespace ldap
} // namespace phosphor