Redfish: Correct PATCH for IPv6 static addresses
Manipulating IPv6 static addresses works the same way as IPv4 static
addresses. Keep the IPv6StaticAddresses collection, and remove write
access from the read-only IPv6Addresses collection.
Change-Id: If58c858c676f7ae843e0642800a4083c5df79d1d
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index a47c637..3c509af 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -1752,10 +1752,10 @@
if (!json_util::readJson(
req, res, "HostName", hostname, "IPv4Addresses", ipv4Addresses,
- "IPv6Addresses", ipv6Addresses, "MACAddress", macAddress,
- "StaticNameServers", staticNameServers, "IPv6DefaultGateway",
- ipv6DefaultGateway, "IPv6StaticAddresses", ipv6StaticAddresses,
- "NameServers", nameServers, "DHCPv4", dhcpv4))
+ "MACAddress", macAddress, "StaticNameServers",
+ staticNameServers, "IPv6DefaultGateway", ipv6DefaultGateway,
+ "IPv6StaticAddresses", ipv6StaticAddresses, "NameServers",
+ nameServers, "DHCPv4", dhcpv4))
{
return;
}
@@ -1772,7 +1772,6 @@
[this, asyncResp, iface_id, hostname = std::move(hostname),
macAddress = std::move(macAddress),
ipv4Addresses = std::move(ipv4Addresses),
- ipv6Addresses = std::move(ipv6Addresses),
ipv6DefaultGateway = std::move(ipv6DefaultGateway),
ipv6StaticAddresses = std::move(ipv6StaticAddresses),
staticNameServers = std::move(staticNameServers),
@@ -1824,13 +1823,6 @@
"NameServers");
}
- if (ipv6Addresses)
- {
- // TODO(kkowalsk) IPv6 Not supported on D-Bus yet
- messages::propertyNotWritable(asyncResp->res,
- "IPv6Addresses");
- }
-
if (staticNameServers)
{
handleStaticNameServersPatch(iface_id, *staticNameServers,