Change in vdsm[master]: net: Removing cfg entry from get capabilities
mmirecki at redhat.com
mmirecki at redhat.com
Fri Feb 19 12:40:09 UTC 2016
Marcin Mirecki has uploaded a new change for review.
Change subject: net: Removing cfg entry from get capabilities
......................................................................
net: Removing cfg entry from get capabilities
Cfg entry in capabilities report is no longer needed as of 3.6,
so it needs to be removed.
Change-Id: I71742512e82f6009c4d1a50e7122c18a6961a908
Signed-off-by: mirecki <mmirecki at redhat.com>
---
M lib/vdsm/netinfo/bonding.py
M lib/vdsm/netinfo/cache.py
M lib/vdsm/netinfo/dhcp.py
3 files changed, 0 insertions(+), 20 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/46/53746/1
diff --git a/lib/vdsm/netinfo/bonding.py b/lib/vdsm/netinfo/bonding.py
index 49c0f29..a462335 100644
--- a/lib/vdsm/netinfo/bonding.py
+++ b/lib/vdsm/netinfo/bonding.py
@@ -174,12 +174,6 @@
in sorted(opts.iteritems())))
-def bondOptsCompat(info):
- """Add legacy ifcfg option if missing."""
- if info['opts'] and 'BONDING_OPTS' not in info['cfg']:
- info['cfg']['BONDING_OPTS'] = bondOptsForIfcfg(info['opts'])
-
-
def permanent_address():
paddr = {}
for b in bondings():
diff --git a/lib/vdsm/netinfo/cache.py b/lib/vdsm/netinfo/cache.py
index 2e7833f..4435562 100644
--- a/lib/vdsm/netinfo/cache.py
+++ b/lib/vdsm/netinfo/cache.py
@@ -77,12 +77,8 @@
else:
continue
devinfo.update(_devinfo(dev, routes, ipaddrs))
- if dev.isBOND():
- bonding.bondOptsCompat(devinfo)
for network_name, network_info in six.iteritems(networking['networks']):
- if network_info['bridged']:
- network_info['cfg'] = networking['bridges'][network_name]['cfg']
updates = propose_updates_to_reported_dhcp(network_info, networking)
update_reported_dhcp(updates, networking)
@@ -136,7 +132,6 @@
is_dhcpv4, is_dhcpv6 = dhcp_status(link.name, ipaddrs)
info = {'addr': ipv4addr,
- 'cfg': getIfaceCfg(link.name),
'ipv4addrs': ipv4addrs,
'ipv6addrs': ipv6addrs,
'gateway': gateway,
@@ -145,8 +140,6 @@
'dhcpv6': is_dhcpv6,
'mtu': link.mtu,
'netmask': ipv4netmask}
- if 'BOOTPROTO' not in info['cfg']:
- info['cfg']['BOOTPROTO'] = 'dhcp' if info['dhcpv4'] else 'none'
return info
diff --git a/lib/vdsm/netinfo/dhcp.py b/lib/vdsm/netinfo/dhcp.py
index 830de7f..7fb0dee 100644
--- a/lib/vdsm/netinfo/dhcp.py
+++ b/lib/vdsm/netinfo/dhcp.py
@@ -41,13 +41,10 @@
for devices in ('bridges', 'vlans', 'bondings', 'nics'):
dev_info = networking[devices].get(network_device)
if dev_info:
- cfg = {}
updated_networking[devices][network_device] = {
'dhcpv4': network_info['dhcpv4'],
'dhcpv6': network_info['dhcpv6'],
- 'cfg': cfg,
}
- cfg['BOOTPROTO'] = 'dhcp' if network_info['dhcpv4'] else 'none'
break
return updated_networking
@@ -63,10 +60,6 @@
device_info = networking[device_type][device_name]
device_info['dhcpv4'] = replacement_device_info['dhcpv4']
device_info['dhcpv6'] = replacement_device_info['dhcpv6']
- # Remove when cluster level < 3.6 is no longer supported and thus
- # it is not necessary to report ifcfg-like BOOTPROTO field.
- if replacement_device_info['cfg']:
- device_info['cfg'].update(replacement_device_info['cfg'])
def dhcp_status(iface, ipaddrs):
--
To view, visit https://gerrit.ovirt.org/53746
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I71742512e82f6009c4d1a50e7122c18a6961a908
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Marcin Mirecki <mmirecki at redhat.com>
More information about the vdsm-patches
mailing list