diff options
author | Ed Tanous <edtanous@google.com> | 2022-12-01 21:27:58 +0300 |
---|---|---|
committer | Ed Tanous <edtanous@google.com> | 2022-12-01 22:35:52 +0300 |
commit | fcd2682a23e3a66d1fee65d866d2b002e8424af6 (patch) | |
tree | ca2395968318e34307b1d5b936ed6cb5ff9db245 | |
parent | 2138483c183b367bb5657d3f4c7354708e67cc47 (diff) | |
download | bmcweb-fcd2682a23e3a66d1fee65d866d2b002e8424af6.tar.xz |
Fix NTPServers property in Redfish
Recent changes to phosphor-network have changed the NTPServers property
to be actually StaticNTPServers. This makes PATCH incorrect.
Tested: Redfish-protocol-validator passes the NTPServers property again.
```
curl -vvvv --insecure --user root:0penBmc https://192.168.7.2/redfish/v1/Managers/bmc/NetworkProtocol -X PATCH -d '{"NTP": {"NTPServers": ["time-a-b.nist.gov", "time-b-b.nist.gov"]}}'
```
Now succeeds.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ie4bcfa6190797dd250421d1a512677841a4319e4
-rw-r--r-- | redfish-core/lib/network_protocol.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/redfish-core/lib/network_protocol.hpp b/redfish-core/lib/network_protocol.hpp index 5c473a6ff3..c3165ee0da 100644 --- a/redfish-core/lib/network_protocol.hpp +++ b/redfish-core/lib/network_protocol.hpp @@ -60,7 +60,7 @@ inline void extractNTPServersAndDomainNamesData( for (const auto& propertyPair : ifacePair.second) { - if (propertyPair.first == "NTPServers") + if (propertyPair.first == "StaticNTPServers") { const std::vector<std::string>* ntpServers = std::get_if<std::vector<std::string>>( @@ -352,7 +352,7 @@ inline void } }, service, objectPath, "org.freedesktop.DBus.Properties", - "Set", interface, "NTPServers", + "Set", interface, "StaticNTPServers", dbus::utility::DbusVariantType{currentNtpServers}); } } |