Change in vdsm[master]: network: drop pyroute_two configurator

2017-01-06 Thread Code Review
From Dan Kenigsberg :

Dan Kenigsberg has posted comments on this change.

Change subject: network: drop pyroute_two configurator
..


Patch Set 3: Verified+1

passes (new) functional tests

-- 
To view, visit https://gerrit.ovirt.org/69748
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I615590cd86eefd89dc433b1e73ccfbb8fc244305
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Edward Haas 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: network: drop pyroute_two configurator

2017-01-06 Thread Code Review
From Dan Kenigsberg :

Dan Kenigsberg has submitted this change and it was merged.

Change subject: network: drop pyroute_two configurator
..


network: drop pyroute_two configurator

Few years back, we had a nice idea, to configure networking via the
pyroute2 package. The work was never completed, never used, and is not
currently needed. There is no point to carry and maintain that code
anymore.

Change-Id: I615590cd86eefd89dc433b1e73ccfbb8fc244305
Signed-off-by: Dan Kenigsberg 
---
M lib/vdsm/config.py.in
M lib/vdsm/network/configurators/Makefile.am
D lib/vdsm/network/configurators/pyroute_two.py
M lib/vdsm/network/legacy_switch.py
M vdsm.spec.in
5 files changed, 2 insertions(+), 188 deletions(-)

Approvals:
  Jenkins CI: Passed CI tests
  Petr Horáček: Looks good to me, but someone else must approve
  Dan Kenigsberg: Verified; Looks good to me, approved
  Edward Haas: Looks good to me, but someone else must approve



-- 
To view, visit https://gerrit.ovirt.org/69748
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I615590cd86eefd89dc433b1e73ccfbb8fc244305
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Edward Haas 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček 
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: network: drop pyroute_two configurator

2017-01-06 Thread Code Review
From Dan Kenigsberg :

Dan Kenigsberg has posted comments on this change.

Change subject: network: drop pyroute_two configurator
..


Patch Set 3: Code-Review+2

-- 
To view, visit https://gerrit.ovirt.org/69748
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I615590cd86eefd89dc433b1e73ccfbb8fc244305
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Edward Haas 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: network: drop pyroute_two configurator

2017-01-06 Thread Code Review
From Dan Kenigsberg :

Dan Kenigsberg has uploaded a new change for review.

Change subject: network: drop pyroute_two configurator
..

network: drop pyroute_two configurator

Few years back, we had a nice idea, to configure networking via the
pyroute2 package. The work was never completed, never used, and is not
currently needed. There is no point to carry and maintain that code
anymore.

Change-Id: I615590cd86eefd89dc433b1e73ccfbb8fc244305
---
M lib/vdsm/config.py.in
M lib/vdsm/network/configurators/Makefile.am
D lib/vdsm/network/configurators/pyroute_two.py
M lib/vdsm/network/legacy_switch.py
M vdsm.spec.in
5 files changed, 2 insertions(+), 188 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/48/69748/1

diff --git a/lib/vdsm/config.py.in b/lib/vdsm/config.py.in
index 8a28f88..b445b9a 100644
--- a/lib/vdsm/config.py.in
+++ b/lib/vdsm/config.py.in
@@ -68,8 +68,8 @@
 'be shown to vdsm.'),
 
 ('net_configurator', 'ifcfg',
-'Whether to use "ifcfg", "pyroute2" or "iproute2" to configure '
-'networks. pyroute2 and iproute2 configurators are not ready '
+'Whether to use "ifcfg" or "iproute2" to configure '
+'networks. iproute2 configurator is not ready '
 'yet for general usage.'),
 
 ('net_persistence', 'unified',
diff --git a/lib/vdsm/network/configurators/Makefile.am 
b/lib/vdsm/network/configurators/Makefile.am
index f16b5ea..252189f 100644
--- a/lib/vdsm/network/configurators/Makefile.am
+++ b/lib/vdsm/network/configurators/Makefile.am
@@ -26,6 +26,5 @@
ifcfg.py \
ifcfg_acquire.py \
iproute2.py \
-   pyroute_two.py \
qos.py \
$(NULL)
diff --git a/lib/vdsm/network/configurators/pyroute_two.py 
b/lib/vdsm/network/configurators/pyroute_two.py
deleted file mode 100644
index 8aece53..000
--- a/lib/vdsm/network/configurators/pyroute_two.py
+++ /dev/null
@@ -1,174 +0,0 @@
-# Copyright 2014 Robert Cernak
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#
-# Refer to the README and COPYING files for full details of the license
-#
-
-from __future__ import absolute_import
-import logging
-
-from vdsm.network import ipwrapper
-from vdsm.network import libvirt
-from vdsm.network import netinfo
-from vdsm.network.ip import dhclient
-from vdsm.network.netconfpersistence import RunningConfig
-
-from .iproute2 import Iproute2
-from ..utils import remove_custom_bond_option
-
-try:
-from pyroute2 import IPDB
-except ImportError as ie:
-_OPTIONAL_AVAILABLE = False
-else:
-_OPTIONAL_AVAILABLE = True
-
-
-def is_available():
-return _OPTIONAL_AVAILABLE
-
-
-class PyrouteTwo(Iproute2):
-def __init__(self, inRollback=False):
-self.unifiedPersistence = True
-super(Iproute2, self).__init__(ConfigApplier(), inRollback)
-self.runningConfig = RunningConfig()
-
-def commit(self):
-self.configApplier.releaseSocket()
-self.configApplier = None
-self.runningConfig.save()
-self.runningConfig = None
-
-
-class ConfigApplier(object):
-def __init__(self):
-self.ip = IPDB()
-
-def _setIpConfig(self, iface):
-ipv4 = iface.ipv4
-ipv6 = iface.ipv6
-if ipv4.address or ipv6.address:
-self.removeIpConfig(iface)
-if ipv4.address:
-with self.ip.interfaces[iface.name] as i:
-i.add_ip(ipv4.address + '/' + ipv4.netmask)
-if ipv4.gateway and ipv4.defaultRoute:
-self.ip.routes.add({'dst': 'default',
-'gateway': ipv4.gateway}).commit()
-if ipv6.address:
-with self.ip.interfaces[iface.name] as i:
-i.add_ip(ipv6.address)
-if ipv6.gateway:
-self.ip.routes.add({'dst': 'default',
-'gateway': ipv6.gateway}).commit()
-if ipv6.ipv6autoconf is not None:
-with open('/proc/sys/net/ipv6/conf/%s/autoconf' % iface.name,
-  'w') as ipv6_autoconf:
-ipv6_autoconf.write('1' if ipv6.ipv6autoconf else '0')
-
-def removeIpConfig(self, iface):
-ipwrapper.addrFlush(iface.name)
-
-