summaryrefslogtreecommitdiff
path: root/redfish-core/lib
diff options
context:
space:
mode:
authorSunitha Harish <sunharis@in.ibm.com>2020-08-21 09:16:28 +0300
committerSunitha Harish <sunithaharish04@gmail.com>2020-08-21 19:15:17 +0300
commit93ee9ca0c5d36204007dd0a8d44c4349dc531cb5 (patch)
tree163c82c94b18b1434a65b3da59603539ce16e140 /redfish-core/lib
parentbafb82b220a201704b65da555cb78e7925b48c26 (diff)
downloadbmcweb-93ee9ca0c5d36204007dd0a8d44c4349dc531cb5.tar.xz
Redfish : Fix setting the Hypervisor interface prefixlength
The static IPv4 configuration on the Hypervisor interface was failing. The user setting value for the prefixlength was not getting set to the DBus property. This commit fixes the async DBus interface call to set the user setting value of the prefixlength property at the DBus interface xyz.openbmc_project.Network.IP Tested by : PATCH -D patch.txt -d '{ "IPv4StaticAddresses": [{"Address": <>,"SubnetMask": <>,"Gateway":<>}]}' https://${bmc}/redfish/v1/Systems/hypervisor/EthernetInterfaces/eth0 Verify the DBus property gets set by the values patched. Signed-off-by: Sunitha Harish <sunharis@in.ibm.com> Change-Id: Ife6283ba491ec421a95803b841d8c73a35aea9f2
Diffstat (limited to 'redfish-core/lib')
-rw-r--r--redfish-core/lib/hypervisor_ethernet.hpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/redfish-core/lib/hypervisor_ethernet.hpp b/redfish-core/lib/hypervisor_ethernet.hpp
index 3266069055..192b3bd7c5 100644
--- a/redfish-core/lib/hypervisor_ethernet.hpp
+++ b/redfish-core/lib/hypervisor_ethernet.hpp
@@ -382,10 +382,9 @@ inline void setHypervisorIPv4Subnet(std::shared_ptr<AsyncResp> aResp,
BMCWEB_LOG_DEBUG << "SubnetMask is Set";
},
"xyz.openbmc_project.Settings",
- "/xyz/openbmc_project/network/hypervisor/" + ethIfaceId +
- "/ipv4/addr0"
- "org.freedesktop.DBus.Properties",
- "Set", "xyz.openbmc_project.Network.IP", "PrefixLength",
+ "/xyz/openbmc_project/network/hypervisor/" + ethIfaceId + "/ipv4/addr0",
+ "org.freedesktop.DBus.Properties", "Set",
+ "xyz.openbmc_project.Network.IP", "PrefixLength",
std::variant<uint8_t>(subnet));
}