Return an error when assigning static values to a DHCP enabled NIC
Return an error when assigning static values to a DHCP enabled NIC

Assigning static IP addresses, subnet masks, and gateway values to a
DHCP enabled NIC should be flagged with an error response to indicate
the operation was not completed successfully.

Tested:
Used some raw commands to witness the return code directly
-- Enable DHCP for NIC 3
ipmitool lan set 3 ipsrc dhcp
-- Assign a static IPv4 Address, expect a failure
ipmitool raw 0xc 1 3 3 192 168 20 12 # returns 0xd5 error message
-- Assign a static IPv4 Subnet mask, expect a failure
ipmitool raw 0xc 1 3 6 255 255 255 0 # returns 0xd5 error message
-- Assign a static IPv4 Gateway, expect a failure
ipmitool raw 0xc 1 3 12 192 168 20 1 # returns 0xd5 error message
-- Enable Static address assignment for NIC 3
ipmitool lan set 3 ipsrc static
-- Assign a static IPv4 Address, expect success
ipmitool raw 0xc 1 3 3 192 168 20 12 # returns successfully
-- Assign a static IPv4 Subnet mask, expect success
ipmitool raw 0xc 1 3 6 255 255 255 0 # returns successfully
-- Assign a static IPv4 Gateway, expect success
ipmitool raw 0xc 1 3 12 192 168 20 1 # returns successfully
IPv4 settings have been updated.

Change-Id: I807ec45a0c86b33dd46bfeb64724b91d5afad408
Signed-off-by: Johnathan Mantey <0048b8e2f791bacb0830da233adbf1612889167c@intel.com>

openbmc/phosphor-host-ipmid,openbmc/phosphor-host-ipmid,openbmc/phosphor-host-ipmid