Antoni Segura Puimedon has posted comments on this change.

Change subject: NetReload: netmodels for addNetwork
......................................................................


Patch Set 4: (2 inline comments)

....................................................
File lib/vdsm/netinfo.py
Line 189:     return addr
Line 190: 
Line 191: 
Line 192: def prefix2netmask(prefix):
Line 193:     if not 0 <= prefix <= 32:
Move into a previous patch.
Line 194:         raise ValueError('%s is not a valid prefix value. It must be 
between '
Line 195:                          '0 and 32')
Line 196:     return socket.inet_ntoa(
Line 197:         struct.pack("!I", int('1' * prefix + '0' * (32 - prefix), 2)))


Line 196:     return socket.inet_ntoa(
Line 197:         struct.pack("!I", int('1' * prefix + '0' * (32 - prefix), 2)))
Line 198: 
Line 199: 
Line 200: def netmask2prefix(netmask):
Keep out until a future patch.
Line 201:     try:
Line 202:         socket.inet_pton(socket.AF_INET, netmask)
Line 203:     except socket.error:
Line 204:         raise ValueError('%s is not a valid netmask.' % netmask)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iba5c5b84760e27245cbe34c3b290c54e51278e72
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegu...@redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegu...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Giuseppe Vallarelli <gvall...@redhat.com>
Gerrit-Reviewer: Mark Wu <wu...@linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to