Martin Polednik has posted comments on this change.

Change subject: hostdev: report totalvfs
......................................................................


Patch Set 4:

(2 comments)

http://gerrit.ovirt.org/#/c/35891/4/vdsm/hostdev.py
File vdsm/hostdev.py:

Line 32: 
Line 33: def _sriov_totalvfs(device_name):
Line 34:     with open('/sys/bus/pci/devices/{}/sriov_totalvfs'.format(
Line 35:             _name_to_pci_path(device_name))) as f:
Line 36:         return str(int(f.read()))
> why this str(int()) dance?
actually might not be needed anymore since it is reported as str anyway, I've 
used that as "trim possible whitespace"
Line 37: 
Line 38: 
Line 39: def _parse_device_params(device_xml):
Line 40:     """


http://gerrit.ovirt.org/#/c/35891/4/vdsm/rpc/vdsmapi-schema.json
File vdsm/rpc/vdsmapi-schema.json:

Line 3760: #
Line 3761: # @vendor:          String representation of the vendor
Line 3762: #
Line 3763: # @totalvfs:        Number of available virtual functions (if sriov
Line 3764: #                   capable)
> but there is a code path that would make this key absent,
do we use #optional tag even for reporting actually? if yes, it's apparently 
missing from quite a few fields here
Line 3765: #
Line 3766: # Since: 4.17.0
Line 3767: ##
Line 3768: {'type': 'HostDeviceParams',


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic54228deb64db200615ef8e2ba8f51e449e68022
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpoled...@redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Martin Betak <mbe...@redhat.com>
Gerrit-Reviewer: Martin Polednik <mpoled...@redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@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

Reply via email to