summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJishnu CM <jishnunabiarcm@duck.com>2023-05-11 08:04:40 +0300
committerJishnu C M <jishnunambiarcm@duck.com>2024-02-16 17:57:35 +0300
commite4588158c0ccc2b3b7af459b262e8eaefaf8f985 (patch)
treefc244eee2b3ff1fd831435a450718111df5f9e2c /test
parentb66551019cf3c31186877c30a91ff8622454f342 (diff)
downloadbmcweb-e4588158c0ccc2b3b7af459b262e8eaefaf8f985.tar.xz
Configure DHCP4 and DHCP6 parameters independently
At present, DHCP parameters like DNSEnabled, NTPEnabled and HostNameEnabled are at the system level at the network backend. It is common across both IPv4 and IPv6 network types. Thus when a redfish command is sent to enable the DNSEnabled property for IPv4 on eth0 interface, it internally sets the DNSEnabled to true for both IPv4 and IPv6 on eth0 and eth1. Here the change in parameter value for a non-requested network type in the non-requested interface might be an unexpected behaviour for the user. Also, with the current implementation in bmcweb and networkd, the user has no option to configure DHCP parameters differently for different interfaces and network types though it is supported by the redfish. With this change, the Redfish query for updating DHCP parameters will only modify the requested parameter for the specified network type and interface. User must make separate requests to modify the DHCP parameters as per the DMTF schema Current behavior: Request: curl -k -H "X-Auth-Token: $bmc_token" -X PATCH -d '{"DHCPv4":{"UseDNSServers":false}}' https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0 Result: UseDNSServers value is set to false for DHCPv4 and DHCPv6 for all interfaces. After this commit: Request: curl -k -H "X-Auth-Token: $bmc_token" -X PATCH -d '{"DHCPv4":{"UseDNSServers":false}}' https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0 Result: UseDNSServers value is set to false only for DHCPv4 only in eth0 as mentioned in the redfish request. The DHCP configuration was in the network manager level earlier, it has been moved to interface level with https://gerrit.openbmc.org/c/openbmc/phosphor-networkd/+/63124. This bmcweb change is to separate out the values for IPv4 and IPv6 and to move the dbus object to the interface level. Tested by: Patching the DHCP parameters with redfish request: curl -k -H "X-Auth-Token: $bmc_token" -X PATCH -d '{"<network_type>":{"<DHCP_param>":<value>}}' https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/<interface_id> Verify the value is updated in the network configuration. Retrieve the DHCP parametrer value with the Get Request: curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/<interface_id> Change-Id: I5db29b6dfc8966ff5af51041da11e5b79da7d1dd Signed-off-by: Jishnu CM <jishnunambiarcm@duck.com>
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions