[node-patches] Change in ovirt-node[master]: update cpu_details to read full topology

fabiand at fedoraproject.org fabiand at fedoraproject.org
Wed May 15 13:53:13 UTC 2013


Fabian Deutsch has posted comments on this change.

Change subject: update cpu_details to read full topology
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(3 inline comments)

Basically fine, just a couple of syntax things.

....................................................
File src/ovirtnode/ovirtfunctions.py
Line 1561: 
Line 1562:         socketIds = []
Line 1563:         siblingsIds = []
Line 1564: 
Line 1565:         socketIds = [ proc.getAttribute('socket_id')
There must not be a whitespace between the opening bracket and the first char
Line 1566:               for proc in cells.getElementsByTagName('cpu')
Line 1567:               if proc.getAttribute('socket_id') not in socketIds ]
Line 1568: 
Line 1569:         siblingsIds = [ proc.getAttribute('siblings')


Line 1562:         socketIds = []
Line 1563:         siblingsIds = []
Line 1564: 
Line 1565:         socketIds = [ proc.getAttribute('socket_id')
Line 1566:               for proc in cells.getElementsByTagName('cpu')
indentation is incorrect
please use:

  foo = [bar
         for bar in bars
         if bar.is(green)]

so the first char of the next line should align with the first char in the brackets
Line 1567:               if proc.getAttribute('socket_id') not in socketIds ]
Line 1568: 
Line 1569:         siblingsIds = [ proc.getAttribute('siblings')
Line 1570:                 for proc in cells.getElementsByTagName('cpu')


Line 1565:         socketIds = [ proc.getAttribute('socket_id')
Line 1566:               for proc in cells.getElementsByTagName('cpu')
Line 1567:               if proc.getAttribute('socket_id') not in socketIds ]
Line 1568: 
Line 1569:         siblingsIds = [ proc.getAttribute('siblings')
same as above
Line 1570:                 for proc in cells.getElementsByTagName('cpu')
Line 1571:                 if proc.getAttribute('siblings') not in siblingsIds ]
Line 1572:         cpu_topology = "OK"
Line 1573:     except:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2cb086e119b4f5c5d430072883532c404a3bb652
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Michael Burns <mburns at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list