Filter static ntp servers from  ntpservers

EthernetInterface::ntpServers contains both static and dynamic
ntpservers. EthernetInterface::ntpServers is returned as network
provided ntp servers in redfish response.

In bmcweb,
NTPServers = ntpServers = StaticNTPServers of networkd
NetworkSuppliedServers = dynamicNtpServers = NTPServers of networkd

This commit filter out static ntp servers from the ntpServers to have it
contain only network provided ntp servers.

Tested by:

1. Enable DHCP to fetch NTP servers list from the DHCP server. Do a
   GET on NetworkProtocol and verify the NetworkSuppliedServers contains
   NTP servers from DHCP only.

2. Verified it has not altered the behavior of static NTPServers list

"Id": "NetworkProtocol",
  "NTP": {
    "NTPServers": [<Static NTP Servers>],
    "NetworkSuppliedServers": [<NTP servers from DHCP>],
    "ProtocolEnabled": false
  },

Change-Id: I0cf186cae9159bd56a3166d5921d32d51216cf47
Signed-off-by: Jishnu CM <jishnunambiarcm@duck.com>
1 file changed
tree: 3f34ab2da724a38f711a8548bc08019c72aaeaea
  1. docs/
  2. gen/
  3. src/
  4. subprojects/
  5. test/
  6. yaml/
  7. .clang-format
  8. .clang-tidy
  9. .gitignore
  10. .shellcheck
  11. 60-phosphor-networkd-default.network.in
  12. LICENSE
  13. meson.build
  14. meson.options
  15. OWNERS
  16. README.md
  17. xyz.openbmc_project.Network.conf.in
  18. xyz.openbmc_project.Network.service.in
README.md

phosphor-networkd

To Build

To build this package, do the following steps:

1. meson build
2. ninja -C build