Change in vdsm[master]: net: api: split network/api.py

edwardh at redhat.com edwardh at redhat.com
Tue Feb 9 23:24:30 UTC 2016


Edward Haas has posted comments on this change.

Change subject: net: api: split network/api.py
......................................................................


Patch Set 2:

(2 comments)

https://gerrit.ovirt.org/#/c/53307/2/lib/vdsm/network/api.py
File lib/vdsm/network/api.py:

Line 177:         if not set(nics).issubset(currentNicsSet):
        :             raise ConfigNetworkError(ne.ERR_BAD_NIC,
        :                                      "Unknown nics in: %r" % list(nics))
This seems specific to the switch scope.
Looks like we may need to separate validations. between general network api and switch specific one.

But then one issue pops up: If we'll need to handle two switch in parallel (ovs & native), how will that be validated?
One option is to have netinfo collect nics (or other entities) from all switches.


Line 232:     options = results['request']['options']
Line 233:     return bondings, networks, options
Line 234: 
Line 235: 
Line 236: def setupNetworks(networks, bondings, **options):
What about just leaving here these actions:
- hooks
- rollback
- connectivity

And calling the 'foo' setup_networks.

I guess only the above are common to multiple switch types.
Line 237:     """Add/Edit/Remove configuration for networks and bondings.
Line 238: 
Line 239:     Params:
Line 240:         networks - dict of key=network, value=attributes


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id695a2a4bad3d97fcb307fb3a220c13412040b40
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list