hyp-nw-mgr: Add support for hypervisor nw config #186
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this commit, ip address dbus objects are created under the hypervisor network service.
busctl tree xyz.openbmc_project.Network.Hypervisor └─/xyz
└─/xyz/openbmc_project
└─/xyz/openbmc_project/network
└─/xyz/openbmc_project/network/hypervisor
├─/xyz/openbmc_project/network/hypervisor/config
├─/xyz/openbmc_project/network/hypervisor/eth0
│ └─/xyz/openbmc_project/network/hypervisor/eth0/ipv4
│ └─/xyz/openbmc_project/network/hypervisor/eth0/ipv4/addr0
└─/xyz/openbmc_project/network/hypervisor/eth1
└─/xyz/openbmc_project/network/hypervisor/eth1/ipv4
└─/xyz/openbmc_project/network/hypervisor/eth1/ipv4/addr0
The values for the properties of IP interfaces will be initialized by parsing the bios table.
This commit adds:
This change would listen on the properties changed signal on BaseBIOSTable property of bios config manager. Whenever there is a signal, the change would be updated on the corresponding ethernet and ip address dbus objects.
The "Enabled" property of xyz.openbmc_project.Object.Enable interface of the ip address object
(eg: /xyz/openbmc_project/network/hypervisor/eth<0/1>/ipv4/addr0) will be set by pldm once the host consumes the ip address set by the user. When the system reboots, this value is not persisted and is defaulted to false.
Pldm will not be updating this value on reboot, it only sets it when phyp sends the sensor event when the ip is consumed and pldm receives this and sets the "Enabled" property.
Currently, there is no support for ipv6 in the hypervisor application.
This commit adds ipv6 support, and the changes mainly includes creation of ipv4 & ipv6 dbus objects when the application starts; adding support in watch method where ipv6 property changes are also monitored; setting default values for ipv6 properties in the bios.
This commit adds "StatelessAddressAutoConfig" support in the hypervisor app. Earlier there were only 4 values - none, both, v4, v6. Now with the latest dbus interfaces change, there are 2 more values introduced - v6Stateless, v4v6Stateless.
v4v6stateless: Enable IPv4 DHCP and IPv6 SLAAC
v6stateless: Enable IPv6 SLAAC
The hypervisor app depends on the bios service currently, that comes up with the bios table. But it is pldm that populates the bios table values.
There are cases, where hypervisor app comes up first before pldm populates the bios table, causing the app to have default values (0.0.0.0 ip) in the dbus even when hypervisor network ip has been configured.
This commit adds a dependency on pldm service for the hypervisor app to start.
bmcweb commit: ibm-openbmc/bmcweb#1232
Tested By:
busctl tree xyz.openbmc_project.Network.Hypervisor
'''
PATCH -D patch.txt -d '{"IPv4StaticAddresses":[{"Address": "10.6.6.2", "SubnetMask": "255.255.252.0","Gateway":"10.6.6.1"}]}' https://${bmc}/redfish/v1/Systems/hypervisor/EthernetInterfaces/eth0 '''