Fabian Deutsch has uploaded a new change for review. Change subject: tui: More detailed info about connection state ......................................................................
tui: More detailed info about connection state Previously the informations about the network state in the TUi were not correct. The logic was updated to display correct informations about the link and ip configuration state in the tui. Change-Id: Iaecb0dc31f0d20f23cc101045527f8d25fea9856 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1227569 Signed-off-by: Fabian Deutsch <[email protected]> --- M src/ovirt/node/utils/network.py 1 file changed, 12 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/72/41872/1 diff --git a/src/ovirt/node/utils/network.py b/src/ovirt/node/utils/network.py index 3fc7811..a50034b 100644 --- a/src/ovirt/node/utils/network.py +++ b/src/ovirt/node/utils/network.py @@ -712,11 +712,19 @@ if nic: ifname = nic.ifname addresses = nic.ip_addresses() - has_address = any(a is not None for a in addresses.values()) + has_address = any(a.address is not None + for a in addresses.values() if a) + details =[] - if nic.has_link(): - status = "Connected (Link only, no IP)" - if has_address: + if not nic.has_link(): + details.append("no link") + + if not has_address: + details.append("no IP") + + if details: + status += " (%s)" % ", ".join(details) + else: status = "Connected" except UnknownNicError: LOGGER.exception("Assume broken nic configuration") -- To view, visit https://gerrit.ovirt.org/41872 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaecb0dc31f0d20f23cc101045527f8d25fea9856 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-node Gerrit-Branch: master Gerrit-Owner: Fabian Deutsch <[email protected]> _______________________________________________ node-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/node-patches
