Change in vdsm[master]: net: move parse_bond_options to netinfo.bonding

2016-04-13 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: net: move parse_bond_options to netinfo.bonding
..


Patch Set 5:

* #1234867::Update tracker: OK
* Set MODIFIED::bug 1234867#1234867IGNORE, not all related patches are 
closed, check 55865

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4619dad642facfb2dc154251412fd434d934e817
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček 
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
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: net: move parse_bond_options to netinfo.bonding

2016-04-13 Thread danken
Dan Kenigsberg has submitted this change and it was merged.

Change subject: net: move parse_bond_options to netinfo.bonding
..


net: move parse_bond_options to netinfo.bonding

Move get_bond_options from ovs hook utils to
vdsm/lib/netinfo/bonding.py, so we can use it in other places.

Importing Vdsm code to a hook is not a good practise. However,
as long as we keep both Hook and Native OVS implementation, this
would make our lifes easier.

Bonding options handling is duplicated in many forms on many
places across Vdsm. We should do a refactoring and canonicalize
bond opts just once.

Change-Id: I4619dad642facfb2dc154251412fd434d934e817
Bug-Url: https://bugzilla.redhat.com/1234867
Signed-off-by: Petr Horáček 
Reviewed-on: https://gerrit.ovirt.org/55841
Continuous-Integration: Jenkins CI
Reviewed-by: Edward Haas 
Reviewed-by: Dan Kenigsberg 
---
M lib/vdsm/netinfo/bonding.py
M tests/network/netinfo_test.py
M vdsm_hooks/ovs/ovs_after_get_caps.py
M vdsm_hooks/ovs/ovs_before_network_setup_ovs.py
M vdsm_hooks/ovs/ovs_utils.py
5 files changed, 38 insertions(+), 30 deletions(-)

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



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4619dad642facfb2dc154251412fd434d934e817
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček 
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
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: net: move parse_bond_options to netinfo.bonding

2016-04-13 Thread danken
Dan Kenigsberg has posted comments on this change.

Change subject: net: move parse_bond_options to netinfo.bonding
..


Patch Set 4: Code-Review+2

raising score

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4619dad642facfb2dc154251412fd434d934e817
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Edward Haas 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Ondřej Svoboda 
Gerrit-Reviewer: Petr Horáček 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: net: move parse_bond_options to netinfo.bonding

2016-04-12 Thread edwardh
Edward Haas has posted comments on this change.

Change subject: net: move parse_bond_options to netinfo.bonding
..


Patch Set 4: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4619dad642facfb2dc154251412fd434d934e817
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček 
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
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: net: move parse_bond_options to netinfo.bonding

2016-04-12 Thread phoracek
Petr Horáček has posted comments on this change.

Change subject: net: move parse_bond_options to netinfo.bonding
..


Patch Set 4: Verified+1

Netinfo tests passed. OVS hook was able to create a network and report 
capabilities.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4619dad642facfb2dc154251412fd434d934e817
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček 
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
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: net: move parse_bond_options to netinfo.bonding

2016-04-12 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: net: move parse_bond_options to netinfo.bonding
..


Patch Set 4:

* #1234867::Update tracker: OK
* Check Bug-Url::OK
* Check Public Bug::#1234867::OK, public bug
* Check Product::#1234867::OK, Correct classification oVirt
* Check TM::SKIP, not in a monitored branch (ovirt-3.6)
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4619dad642facfb2dc154251412fd434d934e817
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček 
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
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: net: move parse_bond_options to netinfo.bonding

2016-04-11 Thread edwardh
Edward Haas has posted comments on this change.

Change subject: net: move parse_bond_options to netinfo.bonding
..


Patch Set 3: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4619dad642facfb2dc154251412fd434d934e817
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček 
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
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: net: move parse_bond_options to netinfo.bonding

2016-04-11 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: net: move parse_bond_options to netinfo.bonding
..


Patch Set 3:

* #1234867::Update tracker: OK
* Check Bug-Url::OK
* Check Public Bug::#1234867::OK, public bug
* Check Product::#1234867::OK, Correct classification oVirt
* Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-3.5 ovirt-3.4 
ovirt-3.3 ovirt-3.2)
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4619dad642facfb2dc154251412fd434d934e817
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček 
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
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: net: move parse_bond_options to netinfo.bonding

2016-04-11 Thread edwardh
Edward Haas has posted comments on this change.

Change subject: net: move parse_bond_options to netinfo.bonding
..


Patch Set 2:

(2 comments)

https://gerrit.ovirt.org/#/c/55841/2/lib/vdsm/netinfo/bonding.py
File lib/vdsm/netinfo/bonding.py:

Line 289: 
Line 290: return _bond_opts_read_elements(opt_path)
Line 291: 
Line 292: 
Line 293: def parse_bond_options(options, keep_custom=False):
> This seems to be now a duplication of what already exist, isn't it?
I just noticed that there is another patch that changed the custom separator to 
':' and that it does not collide with anything that already exists.
Line 294: """
Line 295: Parse bonding options into dictionary, if keep_custom is set to 
True,
Line 296: custom option will not be recursively parsed.
Line 297: 


https://gerrit.ovirt.org/#/c/55841/2/tests/network/netinfo_test.py
File tests/network/netinfo_test.py:

PS2, Line 396: :
> Why is this different from the functional test? (there we have '=')
I think you changed it somewhere already...


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4619dad642facfb2dc154251412fd434d934e817
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Edward Haas 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: net: move parse_bond_options to netinfo.bonding

2016-04-10 Thread danken
Dan Kenigsberg has posted comments on this change.

Change subject: net: move parse_bond_options to netinfo.bonding
..


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/55841/2/vdsm_hooks/ovs/ovs_utils.py
File vdsm_hooks/ovs/ovs_utils.py:

Line 21: 
Line 22: from hooking import execCmd
Line 23: import hooking
Line 24: 
Line 25: from vdsm.netinfo.bonding import parse_bond_options
> From what I understood (from Dan), we would like to pass all interactions b
Correct. I hate to add more dependencies than strictly required - it is a bad 
practice, as hooks are less tested, and may break due to unexpected change in 
internal vdsm structure.

However, ovs hook is entrenched into this practice, so with a good enough 
reason (which is still missing from the commit message) we can accept that.
Line 26: from vdsm.utils import CommandPath
Line 27: 
Line 28: EXT_IP = CommandPath('ip', '/sbin/ip').cmd
Line 29: EXT_OVS_VSCTL = CommandPath('ovs-vsctl',


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4619dad642facfb2dc154251412fd434d934e817
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Edward Haas 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: net: move parse_bond_options to netinfo.bonding

2016-04-10 Thread edwardh
Edward Haas has posted comments on this change.

Change subject: net: move parse_bond_options to netinfo.bonding
..


Patch Set 2: Code-Review-1

(3 comments)

I think we have two implementation here of the same thing.
We probably should generalize the existing.

https://gerrit.ovirt.org/#/c/55841/2/lib/vdsm/netinfo/bonding.py
File lib/vdsm/netinfo/bonding.py:

Line 289: 
Line 290: return _bond_opts_read_elements(opt_path)
Line 291: 
Line 292: 
Line 293: def parse_bond_options(options, keep_custom=False):
This seems to be now a duplication of what already exist, isn't it?
I mean, we already do parse custom bonding values.
They are even ordered to be able and persist them:
_reorderOptions()

The syntax of the custom content format is different from the one that is 
demonstrated with non ovs bonds, this is confusing.
Line 294: """
Line 295: Parse bonding options into dictionary, if keep_custom is set to 
True,
Line 296: custom option will not be recursively parsed.
Line 297: 


https://gerrit.ovirt.org/#/c/55841/2/tests/network/netinfo_test.py
File tests/network/netinfo_test.py:

PS2, Line 396: :
Why is this different from the functional test? (there we have '=')
See: test_setupNetworks_bond_with_custom_option


https://gerrit.ovirt.org/#/c/55841/2/vdsm_hooks/ovs/ovs_utils.py
File vdsm_hooks/ovs/ovs_utils.py:

Line 21: 
Line 22: from hooking import execCmd
Line 23: import hooking
Line 24: 
Line 25: from vdsm.netinfo.bonding import parse_bond_options
From what I understood (from Dan), we would like to pass all interactions 
between a hook and VDSM through the hooking api layer.
Line 26: from vdsm.utils import CommandPath
Line 27: 
Line 28: EXT_IP = CommandPath('ip', '/sbin/ip').cmd
Line 29: EXT_OVS_VSCTL = CommandPath('ovs-vsctl',


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4619dad642facfb2dc154251412fd434d934e817
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Edward Haas 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: net: move parse_bond_options to netinfo.bonding

2016-04-09 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: net: move parse_bond_options to netinfo.bonding
..


Patch Set 2:

* #1234867::Update tracker: OK
* Check Bug-Url::OK
* Check Public Bug::#1234867::OK, public bug
* Check Product::#1234867::OK, Correct classification oVirt
* Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-3.5 ovirt-3.4 
ovirt-3.3 ovirt-3.2)
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4619dad642facfb2dc154251412fd434d934e817
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček 
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
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: net: move parse_bond_options to netinfo.bonding

2016-04-08 Thread phoracek
Petr Horáček has posted comments on this change.

Change subject: net: move parse_bond_options to netinfo.bonding
..


Patch Set 1: Verified+1

Passed network test.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4619dad642facfb2dc154251412fd434d934e817
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček 
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
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: net: move parse_bond_options to netinfo.bonding

2016-04-07 Thread phoracek
Petr Horáček has uploaded a new change for review.

Change subject: net: move parse_bond_options to netinfo.bonding
..

net: move parse_bond_options to netinfo.bonding

Move get_bond_options from ovs hook utils to
vdsm/lib/netinfo/bonding.py, so we can use it in other places.

Change-Id: I4619dad642facfb2dc154251412fd434d934e817
Bug-Url: https://bugzilla.redhat.com/1234867
Signed-off-by: Petr Horáček 
---
M lib/vdsm/netinfo/bonding.py
M tests/network/netinfo_test.py
M vdsm_hooks/ovs/ovs_after_get_caps.py
M vdsm_hooks/ovs/ovs_before_network_setup_ovs.py
M vdsm_hooks/ovs/ovs_utils.py
5 files changed, 38 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/41/55841/1

diff --git a/lib/vdsm/netinfo/bonding.py b/lib/vdsm/netinfo/bonding.py
index 76d3115..75ef846 100644
--- a/lib/vdsm/netinfo/bonding.py
+++ b/lib/vdsm/netinfo/bonding.py
@@ -288,3 +288,26 @@
 raise
 
 return _bond_opts_read_elements(opt_path)
+
+
+def parse_bond_options(options, keep_custom=False):
+"""
+Parse bonding options into dictionary, if keep_custom is set to True,
+custom option will not be recursively parsed.
+
+>>> parse_bond_options('mode=4 custom=foo:yes,bar:no')
+{'custom': {'bar': 'no', 'foo': 'yes'}, 'mode': '4'}
+"""
+def _string_to_dict(str, div, eq):
+if options == '':
+return {}
+return dict(option.split(eq, 1)
+for option in str.strip(div).split(div))
+if options:
+d_options = _string_to_dict(options, ' ', '=')
+if d_options.get('custom') and not keep_custom:
+d_options['custom'] = _string_to_dict(d_options['custom'], ',',
+  ':')
+return d_options
+else:
+return {}
diff --git a/tests/network/netinfo_test.py b/tests/network/netinfo_test.py
index c8395dd..131d77c 100644
--- a/tests/network/netinfo_test.py
+++ b/tests/network/netinfo_test.py
@@ -392,6 +392,10 @@
 def _cidr_form(self, ip_addr, prefix_length):
 return '{}/{}'.format(ip_addr, prefix_length)
 
+def test_parse_bond_options(self):
+self.assertEqual(bonding.parse_bond_options('mode=4 custom=foo:bar'),
+ {'custom': {'foo': 'bar'}, 'mode': '4'})
+
 
 @attr(type='integration')
 class TestIPv6Addresses(TestCaseBase):
diff --git a/vdsm_hooks/ovs/ovs_after_get_caps.py 
b/vdsm_hooks/ovs/ovs_after_get_caps.py
index 616a87d..9be00ed 100755
--- a/vdsm_hooks/ovs/ovs_after_get_caps.py
+++ b/vdsm_hooks/ovs/ovs_after_get_caps.py
@@ -23,12 +23,13 @@
 
 from vdsm.netconfpersistence import RunningConfig
 from vdsm.netinfo import dhcp, routes as netinfo_routes, addresses, mtus
+from vdsm.netinfo.bonding import parse_bond_options
 
 from hooking import execCmd
 import hooking
 
-from ovs_utils import (get_bond_options, iter_ovs_nets, iter_ovs_bonds,
-   EXT_OVS_APPCTL, EXT_OVS_VSCTL, BRIDGE_NAME)
+from ovs_utils import (iter_ovs_nets, iter_ovs_bonds, EXT_OVS_APPCTL,
+   EXT_OVS_VSCTL, BRIDGE_NAME)
 
 
 def _get_stp(iface):
@@ -158,7 +159,7 @@
 ovs_bonding_caps = {}
 routes = netinfo_routes.get_routes()
 for bonding, attrs in iter_ovs_bonds(running_config.bonds):
-options = get_bond_options(attrs.get('options'), keep_custom=True)
+options = parse_bond_options(attrs.get('options'), keep_custom=True)
 net_info = _get_net_info(bonding, routes)
 net_info['slaves'] = attrs.get('nics')
 net_info['active_slave'] = _get_active_slave(bonding)
diff --git a/vdsm_hooks/ovs/ovs_before_network_setup_ovs.py 
b/vdsm_hooks/ovs/ovs_before_network_setup_ovs.py
index 98b74bc..57098f1 100644
--- a/vdsm_hooks/ovs/ovs_before_network_setup_ovs.py
+++ b/vdsm_hooks/ovs/ovs_before_network_setup_ovs.py
@@ -23,13 +23,13 @@
 
 from vdsm.compat import suppress
 from vdsm.netinfo.cache import CachingNetInfo
+from vdsm.netinfo.bonding import parse_bond_options
 from vdsm.network.configurators import libvirt
 
 import hooking
 
-from ovs_utils import (get_bond_options, is_ovs_bond, iter_ovs_nets,
-   iter_ovs_bonds, rget, destroy_ovs_bridge,
-   BRIDGE_NAME, EXT_OVS_VSCTL)
+from ovs_utils import (is_ovs_bond, iter_ovs_nets, iter_ovs_bonds, rget,
+   destroy_ovs_bridge, BRIDGE_NAME, EXT_OVS_VSCTL)
 import ovs_utils
 
 log = partial(ovs_utils.log, tag='ovs_before_network_setup_ovs: ')
@@ -223,7 +223,7 @@
 commands.extend(['--', '--fake-iface', '--may-exist', 'add-bond',
  BRIDGE_NAME, bond] + attrs.get('nics'))
 
-bond_options = get_bond_options(attrs.get('options'))
+bond_options = parse_bond_options(attrs.get('options'))
 mode = rget(bond_options, ('custom', 'ovs_mode')) or 'active-backup'
 lacp = rget(bond_options, ('custom', 'ovs_lacp')) or 'off'
 

Change in vdsm[master]: net: move parse_bond_options to netinfo.bonding

2016-04-07 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: net: move parse_bond_options to netinfo.bonding
..


Patch Set 1:

* #1234867::Update tracker: OK
* Check Bug-Url::OK
* Check Public Bug::#1234867::OK, public bug
* Check Product::#1234867::OK, Correct classification oVirt
* Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-3.5 ovirt-3.4 
ovirt-3.3 ovirt-3.2)
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4619dad642facfb2dc154251412fd434d934e817
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches