Red Hat Bugzilla – Bug 1262004
[Labels] > sub tab - Edit icon (pencil) is missing on labeled network after detaching it from NIC via Setup Networks
Last modified: 2016-03-28 03:31:17 EDT
Created attachment 1072242 [details]
Description of problem:
[Labels] > sub tab - Edit icon (pencil) is missing on labeled network after detaching it from NIC via Setup Networks.
After detaching a labeled network from a NIC on host via Setup Networks, the edit pencil icon is missing on the network on the labels sub tab in SN.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Attach labeled network to NIC via SN(icon pencil exist on network)
2. Detach the labeled network from NIC
On the labels sub tab, the edit icon (pencil) is missing on the network.
The edit icon (pencil) should remain on the network, like it was before
attaching to NIC, and like was on the attached NIC.
Does this also happen in your newly-refactored dialog?
Yes, it still happens.
But the bug is not the pencil is missing. The bug is there was a pencil in the first place.
A detached network, whether it has label or not, shouldn't be editable.
The edit dialog is used to edit the attachment. There is no attachment on detached network, so it doesn't make sense to edit it.
The scenario in the bug is not accurate. Most of the labeled detached networks don't have the edit pencil when they are detached in any stage (before attaching and after detaching). The problematic case is when a network is already attached to a nic (not via label). And also have a label (that is not on any host nic).
In this case the network is actually attached, that's why it is editable.
There are two panel that represent the same network, one attached to the nic and the other in the detached labels dialog.
The panel in the detached labels dialog shouldn't have the edit button.
The reason it disappears when attaching the label to a nic and then detaching it, is that the network is removed from the nic it was attached to before, and attaches just to the new nic with the label.
Now when detaching the label, the network is actually detached and not attached to any nic. That's why the edit icon disappears.
Given comment 2 I understand that currently the pencil shows up if-and-only-if the network is currently attached to a host nic. The network disappears from the unattached-labels pane when its label is attached to the host; when the label is detached, the network returns but now it is no longer attached to any nic.
In my opinion, the current logic (show pencil iff network is attached to host) is sane and simple and should be kept whereever the network is shown.