diff options
author | Gunnar Mills <gmills@us.ibm.com> | 2020-02-20 19:40:18 +0300 |
---|---|---|
committer | Gunnar Mills <gmills@us.ibm.com> | 2020-02-22 00:13:52 +0300 |
commit | ba9dd4a85ab15f63d85e04dd8c79026685c2ffe5 (patch) | |
tree | 1426c3e1627ea0b8e32851d29d01441b5af23574 /redfish-core/lib/account_service.hpp | |
parent | aa9bb6b1115c79b795f4c1f79154e1f2f00613c5 (diff) | |
download | bmcweb-ba9dd4a85ab15f63d85e04dd8c79026685c2ffe5.tar.xz |
Validator Warning: Remove AccountProviderType
AccountProviderType was deprecated in AccountService.v1_5_0.
The latest AccountService is 1.7.0. Move from 1.4.0 to 1.5.0.
Fixes validator warnings:
WARNING - LDAP.AccountProviderType: The given property is deprecated
by revision: This property is deprecated because the account provider
type is known when used in the LDAP and ActiveDirectory objects.
WARNING - ActiveDirectory.AccountProviderType: The given property is
deprecated by revision: This property is deprecated because the
account provider type is known when used in the LDAP and
ActiveDirectory objects.
Although not sure if the validator should have thrown a
warning since the version of AccountService in bmcweb still
allowed this property.
AccountProviderType is not used in the GUI or other places.
Resolves openbmc/bmcweb#118
Tested: Passed validator.
Change-Id: Ifa15cdd2dfd0d740e42add778f30d00e7885ed4b
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Diffstat (limited to 'redfish-core/lib/account_service.hpp')
-rw-r--r-- | redfish-core/lib/account_service.hpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp index 055a37b9fc..7028260327 100644 --- a/redfish-core/lib/account_service.hpp +++ b/redfish-core/lib/account_service.hpp @@ -171,7 +171,6 @@ void parseLDAPConfigData(nlohmann::json& json_response, std::string service = (ldapType == "LDAP") ? "LDAPService" : "ActiveDirectoryService"; nlohmann::json ldap = { - {"AccountProviderType", service}, {"ServiceEnabled", confData.serviceEnabled}, {"ServiceAddresses", nlohmann::json::array({confData.uri})}, {"Authentication", @@ -982,7 +981,6 @@ class AccountService : public Node std::optional<nlohmann::json> authentication; std::optional<nlohmann::json> ldapService; - std::optional<std::string> accountProviderType; std::optional<std::vector<std::string>> serviceAddressList; std::optional<bool> serviceEnabled; std::optional<std::vector<std::string>> baseDNList; @@ -995,7 +993,6 @@ class AccountService : public Node if (!json_util::readJson(input, asyncResp->res, "Authentication", authentication, "LDAPService", ldapService, "ServiceAddresses", serviceAddressList, - "AccountProviderType", accountProviderType, "ServiceEnabled", serviceEnabled, "RemoteRoleMapping", remoteRoleMapData)) { @@ -1012,11 +1009,6 @@ class AccountService : public Node parseLDAPServiceJson(*ldapService, asyncResp, baseDNList, userNameAttribute, groupsAttribute); } - if (accountProviderType) - { - messages::propertyNotWritable(asyncResp->res, - "AccountProviderType"); - } if (serviceAddressList) { if ((*serviceAddressList).size() == 0) @@ -1048,9 +1040,9 @@ class AccountService : public Node // whenever any property gets updated. getLDAPConfigData(serverType, [this, asyncResp, userName, password, baseDNList, userNameAttribute, - groupsAttribute, accountProviderType, - serviceAddressList, serviceEnabled, - dbusObjectPath, remoteRoleMapData]( + groupsAttribute, serviceAddressList, + serviceEnabled, dbusObjectPath, + remoteRoleMapData]( bool success, LDAPConfigData confData, const std::string& serverType) { if (!success) @@ -1140,7 +1132,7 @@ class AccountService : public Node res.jsonValue = { {"@odata.id", "/redfish/v1/AccountService"}, {"@odata.type", "#AccountService." - "v1_4_0.AccountService"}, + "v1_5_0.AccountService"}, {"Id", "AccountService"}, {"Name", "Account Service"}, {"Description", "Account Service"}, |