Change in vdsm[master]: netinfo: Read default bonding options

2014-05-20 Thread danken
Dan Kenigsberg has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 5: Code-Review-1

(3 comments)

http://gerrit.ovirt.org/#/c/27680/5//COMMIT_MSG
Commit Message:

Line 12: Some sysfs entries are ignored as they are not actually
Line 13: options, e.g. 'active_slave', 'ad_partner_mac'.
Line 14: 
Line 15: Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Line 16: Bug-Url: https://bugzilla.redhat.com/987813
this patch solves nothing, hence it is only

 Related-To:


http://gerrit.ovirt.org/#/c/27680/5/lib/vdsm/netinfo.py
File lib/vdsm/netinfo.py:

Line 183: el for el in optFile.read().rstrip().split(' ') if el]
Line 184: return opts
Line 185: 
Line 186: 
Line 187: def realBondOpts(bond, keys=None):
please keep this function module-private
Line 188: 
Line 189: Returns a dictionary in the same format as bondOpts(). Values 
that are not
Line 190: actually options are excluded, e.g. 'ad_num_ports' or 'slaves'.
Line 191: 


Line 188: 
Line 189: Returns a dictionary in the same format as bondOpts(). Values 
that are not
Line 190: actually options are excluded, e.g. 'ad_num_ports' or 'slaves'.
Line 191: 
Line 192: EXCLUDED = frozenset(('slaves',  'active_slave', 'mii_status', 
'queue_id',
Please define this out of the function.
Line 193:   'ad_aggregator', 'ad_num_ports', 
'ad_actor_key',
Line 194:   'ad_partner_key', 'ad_partner_mac'))
Line 195: 
Line 196: return dict(((opt, val) for (opt, val) in bondOpts(bond, 
keys).iteritems()


-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-20 Thread osvoboda
Ondřej Svoboda has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 6:

Changes applied.

-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-20 Thread osvoboda
Ondřej Svoboda has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 5:

(3 comments)

http://gerrit.ovirt.org/#/c/27680/5//COMMIT_MSG
Commit Message:

Line 12: Some sysfs entries are ignored as they are not actually
Line 13: options, e.g. 'active_slave', 'ad_partner_mac'.
Line 14: 
Line 15: Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Line 16: Bug-Url: https://bugzilla.redhat.com/987813
 this patch solves nothing, hence it is only
Done


http://gerrit.ovirt.org/#/c/27680/5/lib/vdsm/netinfo.py
File lib/vdsm/netinfo.py:

Line 183: el for el in optFile.read().rstrip().split(' ') if el]
Line 184: return opts
Line 185: 
Line 186: 
Line 187: def realBondOpts(bond, keys=None):
 please keep this function module-private
Done
Line 188: 
Line 189: Returns a dictionary in the same format as bondOpts(). Values 
that are not
Line 190: actually options are excluded, e.g. 'ad_num_ports' or 'slaves'.
Line 191: 


Line 188: 
Line 189: Returns a dictionary in the same format as bondOpts(). Values 
that are not
Line 190: actually options are excluded, e.g. 'ad_num_ports' or 'slaves'.
Line 191: 
Line 192: EXCLUDED = frozenset(('slaves',  'active_slave', 'mii_status', 
'queue_id',
 Please define this out of the function.
Done
Line 193:   'ad_aggregator', 'ad_num_ports', 
'ad_actor_key',
Line 194:   'ad_partner_key', 'ad_partner_mac'))
Line 195: 
Line 196: return dict(((opt, val) for (opt, val) in bondOpts(bond, 
keys).iteritems()


-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-20 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 6:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_master_network_functional_tests_gerrit/1368/ 
: SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/9054/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/9195/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/8266/ : SUCCESS

-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-20 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 7:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_master_network_functional_tests_gerrit/1371/ 
: SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/9077/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/9218/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/8289/ : SUCCESS

-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-20 Thread osvoboda
Ondřej Svoboda has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 8: Verified+1

(1 comment)

The patch passes all unit tests, including a new one. The patchset as a whole 
passes functional tests which now always check that after changing of bonding 
options, no other (pre-existing) options are set.

http://gerrit.ovirt.org/#/c/27680/8/lib/vdsm/netinfo.py
File lib/vdsm/netinfo.py:

Line 623: Return non-empty options differing from defaults, excluding not 
actual or
Line 624: not applicable options, e.g. 'ad_num_ports' or 'slaves'.
Line 625: 
Line 626: opts = _realBondOpts(bond)
Line 627: mode = opts['mode'][-1] if 'mode' in opts else None
This function is called even before a bond exists hence the condition is 
necessary. 'if opts' should be enough though as 'mode' is presumed to always 
exist.
Line 628: defaults = _getDefaultBondingOptions(mode)
Line 629: 
Line 630: return dict(((opt, val) for (opt, val) in opts.iteritems()
Line 631:  if val and val != defaults.get(opt)))


-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-20 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 8:

Build Failed 

http://jenkins.ovirt.org/job/vdsm_master_network_functional_tests_gerrit/1374/ 
: SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/9082/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/9223/ : FAILURE

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/8294/ : SUCCESS

-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-20 Thread osvoboda
Ondřej Svoboda has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 8:

(2 comments)

Some final proposals.

http://gerrit.ovirt.org/#/c/27680/8/lib/vdsm/netinfo.py
File lib/vdsm/netinfo.py:

Line 170: 
Line 171: def slaves(bonding):
Line 172: return open(BONDING_SLAVES % bonding).readline().split()
Line 173: 
Line 174: 
Outside netinfo.py, it is only used by areOptionsApplied in models.py and by 
getBondMode in tests/functional/utils.py.

Both mean to access just bonding options, not other entries in 
/sys/class/net/[bond]/bonding.

I prefer to keep the usage of bondOpts over replacing it with _realBondOpts 
because both callers explicitly state the options to retrieve.

Due to its general functionality I would rename bondOpts to 'bondingEntries' or 
the like.
Line 175: def bondOpts(bond, keys=None):
Line 176:  Returns a dictionary of bond option name and a values 
iterable. E.g.,
Line 177: {'mode': ('balance-rr', '0'), 'xmit_hash_policy': ('layer2', '0')}
Line 178: 


Line 187: el for el in optFile.read().rstrip().split(' ') if el]
Line 188: return opts
Line 189: 
Line 190: 
Line 191: def _realBondOpts(bond, keys=None):
The optional parameter should be dropped. If the list of options to retrieve is 
known, bondOpts is the function to use.

As this is the function returning only bonding options, I would like it to take 
bondOpts’ name.
Line 192: 
Line 193: Return a dictionary in the same format as bondOpts(). Exclude 
entries that
Line 194: are not bonding options, e.g. 'ad_num_ports' or 'slaves'.
Line 195: 


-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-20 Thread danken
Dan Kenigsberg has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 8: Code-Review-1

(2 comments)

http://gerrit.ovirt.org/#/c/27680/8/lib/vdsm/netinfo.py
File lib/vdsm/netinfo.py:

Line 187: el for el in optFile.read().rstrip().split(' ') if el]
Line 188: return opts
Line 189: 
Line 190: 
Line 191: def _realBondOpts(bond, keys=None):
 The optional parameter should be dropped. If the list of options to retriev
you are perfectly right. Please drop that arg!
Line 192: 
Line 193: Return a dictionary in the same format as bondOpts(). Exclude 
entries that
Line 194: are not bonding options, e.g. 'ad_num_ports' or 'slaves'.
Line 195: 


Line 623: Return non-empty options differing from defaults, excluding not 
actual or
Line 624: not applicable options, e.g. 'ad_num_ports' or 'slaves'.
Line 625: 
Line 626: opts = _realBondOpts(bond)
Line 627: mode = opts['mode'][-1] if 'mode' in opts else None
 This function is called even before a bond exists hence the condition is ne
who calls _getBondingOptions() on a non-existing bond? I see no such caller in 
this patch, and I believe that no one should.
Line 628: defaults = _getDefaultBondingOptions(mode)
Line 629: 
Line 630: return dict(((opt, val) for (opt, val) in opts.iteritems()
Line 631:  if val and val != defaults.get(opt)))


-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-20 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 9:

Build Failed 

http://jenkins.ovirt.org/job/vdsm_master_network_functional_tests_gerrit/1377/ 
: SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/9086/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/9227/ : FAILURE

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/8298/ : SUCCESS

-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-20 Thread danken
Dan Kenigsberg has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 9: Code-Review-1

(2 comments)

http://gerrit.ovirt.org/#/c/27680/9/lib/vdsm/netinfo.py
File lib/vdsm/netinfo.py:

Line 604: return opts
Line 605: 
Line 606: 
Line 607: @memoized
Line 608: def _getDefaultBondingOptions(mode=None):
this method should be declared public, if we ever intend to call it out of this 
module.
Line 609: 
Line 610: Return default options for the given mode. If it is None, return 
options
Line 611: for the default mode (usually '0').
Line 612: 


Line 617: 
Line 618: return defaults[mode]
Line 619: 
Line 620: 
Line 621: def _getBondingOptions(bond):
I think that this method should be public, too.
Line 622: 
Line 623: Return non-empty options differing from defaults, excluding not 
actual or
Line 624: not applicable options, e.g. 'ad_num_ports' or 'slaves'.
Line 625: 


-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-20 Thread osvoboda
Ondřej Svoboda has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 10: Verified+1

Verified again:

The patch passes all unit tests, including a new one. The patchset as a whole 
passes functional tests, too.

-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-20 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 10:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_master_network_functional_tests_gerrit/1380/ 
: SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/9097/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/9238/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/8309/ : SUCCESS

-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-20 Thread danken
Dan Kenigsberg has submitted this change and it was merged.

Change subject: netinfo: Read default bonding options
..


netinfo: Read default bonding options

A randomly-named reference bond is created once to obtain
the defaults for all bonding modes.

Some sysfs entries are ignored as they are not actually
options, e.g. 'active_slave', 'ad_partner_mac'.

Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Related-To: https://bugzilla.redhat.com/987813
Signed-off-by: Ondřej Svoboda osvob...@redhat.com
Reviewed-on: http://gerrit.ovirt.org/27680
Reviewed-by: Dan Kenigsberg dan...@redhat.com
---
M configure.ac
M lib/vdsm/constants.py.in
M lib/vdsm/netinfo.py
M tests/netinfoTests.py
M vdsm/sudoers.vdsm.in
5 files changed, 117 insertions(+), 2 deletions(-)

Approvals:
  Ondřej Svoboda: Verified
  Dan Kenigsberg: Looks good to me, approved



-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-20 Thread danken
Dan Kenigsberg has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 10: Code-Review+2

-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-20 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 11:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_master_create-rpms_merged/1320/ : SUCCESS

-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-19 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 4:

Build Failed 

http://jenkins.ovirt.org/job/vdsm_master_network_functional_tests_gerrit/1360/ 
: SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/9023/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/9164/ : FAILURE

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/8235/ : SUCCESS

-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-19 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 5:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_master_network_functional_tests_gerrit/1363/ 
: SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/9031/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/9172/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/8243/ : SUCCESS

-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-15 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 3: Code-Review+1

-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-14 Thread osvoboda
Ondřej Svoboda has uploaded a new change for review.

Change subject: netinfo: Read default bonding options
..

netinfo: Read default bonding options

A randomly-named reference bond is created once to obtain
the same values as defined in kernel configuration.

Some sysfs entries are ignored as they are not actually
options, e.g. 'active_slave', 'ad_partner_mac'.

Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Bug-Url: https://bugzilla.redhat.com/987813
Signed-off-by: Ondřej Svoboda osvob...@redhat.com
---
M configure.ac
M lib/vdsm/constants.py.in
M lib/vdsm/netinfo.py
M vdsm/sudoers.vdsm.in
4 files changed, 92 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/80/27680/1

diff --git a/configure.ac b/configure.ac
index 8e157a7..fdc4edc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -242,6 +242,7 @@
 AC_PATH_PROG([SYSTEMCTL_PATH], [systemctl], [/bin/systemctl])
 AC_PATH_PROG([TAR_PATH], [tar], [/bin/tar])
 AC_PATH_PROG([TC_PATH], [tc], [/sbin/tc])
+AC_PATH_PROG([TEE_PATH], [tee], [/usr/bin/tee])
 AC_PATH_PROG([TOUCH_PATH], [touch], [/bin/touch])
 AC_PATH_PROG([TUNE2FS_PATH], [tune2fs], [/sbin/tune2fs])
 AC_PATH_PROG([UDEVADM_PATH], [udevadm], [/sbin/udevadm])
diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in
index 4ddfe84..afd6f68 100644
--- a/lib/vdsm/constants.py.in
+++ b/lib/vdsm/constants.py.in
@@ -137,6 +137,7 @@
 EXT_SUDO = '@SUDO_PATH@'
 
 EXT_TAR = '@TAR_PATH@'
+EXT_TEE = '@TEE_PATH@'
 EXT_TUNE2FS = '@TUNE2FS_PATH@'
 
 EXT_UDEVADM = '@UDEVADM_PATH@'
diff --git a/lib/vdsm/netinfo.py b/lib/vdsm/netinfo.py
index 1734966..7b27122 100644
--- a/lib/vdsm/netinfo.py
+++ b/lib/vdsm/netinfo.py
@@ -26,8 +26,10 @@
 from itertools import chain
 import logging
 import os
+import random
 import shlex
 import socket
+import string
 import struct
 from xml.dom import minidom
 
@@ -44,6 +46,7 @@
 from . import libvirtconnection
 from .netconfpersistence import RunningConfig
 from .netlink import iter_addrs, iter_links
+from .utils import execCmd, memoized, CommandPath
 
 
 NET_CONF_DIR = '/etc/sysconfig/network-scripts/'
@@ -70,6 +73,7 @@
 _BONDING_LOADBALANCE_MODES = frozenset(('0', '2', '4', '5', '6'))
 _IFCFG_ZERO_SUFFIXED = frozenset(
 ('IPADDR0', 'GATEWAY0', 'PREFIX0', 'NETMASK0'))
+_TEE_BINARY = CommandPath('tee', constants.EXT_TEE)
 
 LIBVIRT_NET_PREFIX = 'vdsm-'
 DEFAULT_MTU = '1500'
@@ -178,6 +182,21 @@
 opts[os.path.basename(path)] = [
 el for el in optFile.read().rstrip().split(' ') if el]
 return opts
+
+
+def realBondOpts(bond, keys=None):
+'''
+Returns a dictionary in the same format as bondOpts(). Values that are not
+actually options are excluded, e.g. 'ad_num_ports' or 'slaves'.
+'''
+EXCLUDED = frozenset(('slaves',  'active_slave', 'mii_status', 'queue_id',
+  'ad_aggregator', 'ad_num_ports', 'ad_actor_key',
+  'ad_partner_key', 'ad_partner_mac'))
+
+opts = ((opt, val) for (opt, val) in bondOpts(bond, keys).iteritems()
+if opt not in EXCLUDED)
+
+return dict(opts)
 
 
 def bridgeOpts(bridge, keys=None):
@@ -544,6 +563,73 @@
 return info
 
 
+def _randomIfaceName():
+MAX_LENGTH = 15
+CHARS = string.ascii_lowercase + string.ascii_uppercase + string.digits
+
+return ''.join(random.choice(CHARS) for _ in range(MAX_LENGTH))
+
+
+@memoized
+def _getAllDefaultBondingOptions():
+'''
+Returns default options per mode, in a dictionary of dictionaries. All keys
+are strings.
+'''
+teeCmd = _TEE_BINARY.cmd
+MAX_MODE = 6
+
+bondName = _randomIfaceName()
+rc, _, err = execCmd([teeCmd, BONDING_MASTERS],
+ data='+' + bondName, sudo=True)
+if rc:
+raise RuntimeError('Creating a reference bond failed', '\n'.join(err))
+
+opts = {}
+try:
+defaultMode = bondOpts(bondName, keys=['mode'])['mode']
+
+# read default values for all modes
+for mode in range(0, MAX_MODE + 1):
+mode = str(mode)
+rc, _, err = execCmd([teeCmd, BONDING_OPT % (bondName, 'mode')],
+ data=mode, sudo=True)
+
+# only read non-empty options
+opts[mode] = dict(((opt, val) for (opt, val) in
+   realBondOpts(bondName).iteritems() if val))
+opts[mode]['mode'] = defaultMode
+
+finally:
+execCmd([teeCmd, BONDING_MASTERS], data='-' + bondName, sudo=True)
+
+return opts
+
+
+@memoized
+def _getDefaultBondingOptions(mode=None):
+'''
+Returns default options for the given mode. If it is None, options for
+the default mode (usually '0') are returned.
+'''
+defaults = _getAllDefaultBondingOptions()
+
+if mode is None:
+mode = defaults['0']['mode'][-1]
+
+return defaults[mode]
+
+
+def _bondOptsForIfcfg(opts):
+'''
+Options 

Change in vdsm[master]: netinfo: Read default bonding options

2014-05-14 Thread osvoboda
Ondřej Svoboda has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 1:

(1 comment)

About the (original) choice of a numerical value from sysfs. E.g. the mode is 
presented as 'balance-rr 0' and currently, we return the number as the bonding 
option value.

http://gerrit.ovirt.org/#/c/27680/1/lib/vdsm/netinfo.py
File lib/vdsm/netinfo.py:

Line 623: def _bondOptsForIfcfg(opts):
Line 624: '''
Line 625: Options having symbolic values, e.g. 'mode', are presented by 
sysfs in
Line 626: the order symbolic name, numeric value, e.g. 'balance-rr 0'.
Line 627: From a list given by bondOpts(), the numeric value is chosen.
In functional tests in the last patch, to be able to compare requested values 
to resulting ones we have to stick either to numeric values or symbolic values. 
For readability we might want to switch to symbolic values.
Line 628: '''
Line 629: return ' '.join((opt + '=' + val[-1] for (opt, val)
Line 630:  in sorted(opts.iteritems(
Line 631: 


-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-14 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 1:

Build Failed 

http://jenkins.ovirt.org/job/vdsm_master_network_functional_tests_gerrit/1345/ 
: SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/8833/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/8969/ : FAILURE

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/8043/ : SUCCESS

-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-14 Thread asegurap
Antoni Segura Puimedon has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 1:

(4 comments)

Some suggestions

http://gerrit.ovirt.org/#/c/27680/1/lib/vdsm/netinfo.py
File lib/vdsm/netinfo.py:

Line 184: return opts
Line 185: 
Line 186: 
Line 187: def realBondOpts(bond, keys=None):
Line 188: '''
s/'''// for docstrings
Line 189: Returns a dictionary in the same format as bondOpts(). Values 
that are not
Line 190: actually options are excluded, e.g. 'ad_num_ports' or 'slaves'.
Line 191: '''
Line 192: EXCLUDED = frozenset(('slaves',  'active_slave', 'mii_status', 
'queue_id',


Line 193:   'ad_aggregator', 'ad_num_ports', 
'ad_actor_key',
Line 194:   'ad_partner_key', 'ad_partner_mac'))
Line 195: 
Line 196: opts = ((opt, val) for (opt, val) in bondOpts(bond, 
keys).iteritems()
Line 197: if opt not in EXCLUDED)
I'd prefer:

return dict((opt, val) for (opt, val) in bondOpts(bond, keys).iteritems()
if opt not in EXCLUDED)
Line 198: 
Line 199: return dict(opts)
Line 200: 
Line 201: 


Line 571: 
Line 572: 
Line 573: @memoized
Line 574: def _getAllDefaultBondingOptions():
Line 575: '''
again, s/'''//
Line 576: Returns default options per mode, in a dictionary of 
dictionaries. All keys
Line 577: are strings.
Line 578: '''
Line 579: teeCmd = _TEE_BINARY.cmd


Line 574: def _getAllDefaultBondingOptions():
Line 575: '''
Line 576: Returns default options per mode, in a dictionary of 
dictionaries. All keys
Line 577: are strings.
Line 578: '''
what about to have the dictionary have integers as keys and only cast mode to 
string in line 596:
data=str(mode), sudo=True)
?
Line 579: teeCmd = _TEE_BINARY.cmd
Line 580: MAX_MODE = 6
Line 581: 
Line 582: bondName = _randomIfaceName()


-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-14 Thread osvoboda
Ondřej Svoboda has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 1:

(4 comments)

Addressed in a follow-up iteration.

http://gerrit.ovirt.org/#/c/27680/1/lib/vdsm/netinfo.py
File lib/vdsm/netinfo.py:

Line 184: return opts
Line 185: 
Line 186: 
Line 187: def realBondOpts(bond, keys=None):
Line 188: '''
 s/'''// for docstrings
Done
Line 189: Returns a dictionary in the same format as bondOpts(). Values 
that are not
Line 190: actually options are excluded, e.g. 'ad_num_ports' or 'slaves'.
Line 191: '''
Line 192: EXCLUDED = frozenset(('slaves',  'active_slave', 'mii_status', 
'queue_id',


Line 193:   'ad_aggregator', 'ad_num_ports', 
'ad_actor_key',
Line 194:   'ad_partner_key', 'ad_partner_mac'))
Line 195: 
Line 196: opts = ((opt, val) for (opt, val) in bondOpts(bond, 
keys).iteritems()
Line 197: if opt not in EXCLUDED)
 I'd prefer:
Done
Line 198: 
Line 199: return dict(opts)
Line 200: 
Line 201: 


Line 571: 
Line 572: 
Line 573: @memoized
Line 574: def _getAllDefaultBondingOptions():
Line 575: '''
 again, s/'''//
Done
Line 576: Returns default options per mode, in a dictionary of 
dictionaries. All keys
Line 577: are strings.
Line 578: '''
Line 579: teeCmd = _TEE_BINARY.cmd


Line 574: def _getAllDefaultBondingOptions():
Line 575: '''
Line 576: Returns default options per mode, in a dictionary of 
dictionaries. All keys
Line 577: are strings.
Line 578: '''
 what about to have the dictionary have integers as keys and only cast mode 
To stay in line with bondOpts() which never casts numerical values to integers 
I would keep this. The expression in the next function 
(defaults['0']['mode'][-1]) would become even more complicated, as well 
as_getBondingOptions() in a later patch (which reads the mode from bondOpts 
again as a string).

The dictionary is queried at most once per mode thanks to memoization.
Line 579: teeCmd = _TEE_BINARY.cmd
Line 580: MAX_MODE = 6
Line 581: 
Line 582: bondName = _randomIfaceName()


-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-14 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 2: Code-Review-1 Verified-1

Build Failed 

http://jenkins.ovirt.org/job/vdsm_master_network_functional_tests_gerrit/1348/ 
: There was an infra issue, please contact in...@ovirt.org

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/8851/ : UNSTABLE

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/8987/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/8061/ : SUCCESS

-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: netinfo: Read default bonding options

2014-05-14 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: netinfo: Read default bonding options
..


Patch Set 3:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_master_network_functional_tests_gerrit/1352/ 
: SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/8855/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/8991/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/8065/ : SUCCESS

-- 
To view, visit http://gerrit.ovirt.org/27680
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8109feeef02b71c1d74dc6303839c6f45175915
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com
Gerrit-Reviewer: Ondřej Svoboda osvob...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches