[PATCH rhel7-branch 1/2] network: add support for vlan tag in iBFT (#804511)
Martin Kolman
mkolman at redhat.com
Fri Sep 26 09:56:51 UTC 2014
On Fri, 2014-09-26 at 11:24 +0200, Radek Vykydal wrote:
> Resolves: rhbz#804511
>
> Implementation the feature, NM now creates read-only temporary in-memory
> connection for iBFT configurations. Don't show the connection in installer GUI.
> ---
> pyanaconda/nm.py | 4 ++++
> pyanaconda/ui/gui/spokes/network.py | 7 +++++++
> 2 files changed, 11 insertions(+)
>
> diff --git a/pyanaconda/nm.py b/pyanaconda/nm.py
> index 0fca6ac..c56f610 100644
> --- a/pyanaconda/nm.py
> +++ b/pyanaconda/nm.py
> @@ -509,6 +509,10 @@ def _device_settings(name):
> settings = _find_settings(name, 'bond', 'interface-name')
> elif devtype == NetworkManager.DeviceType.VLAN:
> settings = _find_settings(name, 'vlan', 'interface-name')
> + if not settings:
> + # connections generated by NM from iBFT
> + parent, _sep, vlanid = name.partition(".")
> + settings = _find_settings(int(vlanid), 'vlan', 'id')
> else:
> settings = _find_settings(name, 'connection', 'interface-name')
> if not settings:
> diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
> index 355756f..dbc15d9 100644
> --- a/pyanaconda/ui/gui/spokes/network.py
> +++ b/pyanaconda/ui/gui/spokes/network.py
> @@ -426,6 +426,9 @@ class NetworkControlBox(GObject.GObject):
> log.debug("network: GUI, connection %s found", uuid)
> if self.dev_cfg(uuid=uuid):
> continue
> + if setting["connection"]["read-only"]:
> + log.debug("network: GUI, not adding read-only connection %s", uuid)
> + continue
> dev_cfg = DeviceConfiguration(con_uuid=uuid)
> if dev_cfg.device_type in self.supported_device_types:
> # Configs for ethernet has been already added,
> @@ -670,6 +673,10 @@ class NetworkControlBox(GObject.GObject):
> return
>
> try:
> + read_only = nm.nm_device_setting_value(device.get_iface(), "connection", "read-only")
> + if read_only:
> + log.debug("network: not adding read-only connection for device %s", device.get_iface())
> + return
> con_uuid = nm.nm_device_setting_value(device.get_iface(), "connection", "uuid")
> dev_cfg = self.dev_cfg(uuid=con_uuid)
> except nm.UnknownDeviceError as e:
Looks good, ACK!
More information about the anaconda-patches
mailing list