Martin Polednik has uploaded a new change for review.
Change subject: vdsm: expose hostdev via vdsClient ......................................................................
vdsm: expose hostdev via vdsClient
Exposes current API verb hostdevListByCaps by vdsClient, using pretty tree graphical structure.
Change-Id: I1e4dd1a1ee9af0d1873a081c115289ad2e52204f Signed-off-by: Martin Polednik mpolednik@redhat.com --- M client/vdsClient.py 1 file changed, 31 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/16/32316/1
diff --git a/client/vdsClient.py b/client/vdsClient.py index 35f4ca5..18776cb 100644 --- a/client/vdsClient.py +++ b/client/vdsClient.py @@ -117,16 +117,33 @@ print "\t%s = %s" % (element, conf[element])
-def printDict(dict, pretty=True): +def printDict(dict, pretty=True, depth=0): keys = dict.keys() keys.sort() for element in keys: if pretty: representation = pp.pformat(dict[element]).replace( - '\n', '\n\t' + ' ' * len(element + ' = ')) + '\n', '\n\t' + ' ' * len(element + ' = ') + '\t' * depth) else: representation = dict[element] - print "\t%s = %s" % (element, representation) + print '\t' * depth + '\t%s = %s' % (element, representation) + + +def printDevices(devices, pretty=True): + roots = [device for device in devices if + devices[device]['params'].get('parent', None) not in devices] + + _printChildDevices(devices, roots, pretty) + + +def _printChildDevices(devices, roots, pretty=True, depth=1): + for root in roots: + printDict({root: devices[root]}, pretty, depth) + + _printChildDevices( + devices, [device for device in devices if + devices[device]['params'].get('parent', None) == root], + pretty, depth + 1)
def printStats(list): @@ -199,6 +216,8 @@ printStats(response['statsList']) elif 'info' in response: printDict(response['info'], self.pretty) + elif 'deviceList' in response: + printDevices(response['deviceList'], self.pretty) else: printDict(response['status'], self.pretty) sys.exit(response['status']['code']) @@ -520,6 +539,9 @@
def do_getAllVmStats(self, args): return self.ExecAndExit(self.s.getAllVmStats()) + + def do_hostdevListByCaps(self, args): + return self.ExecAndExit(self.s.hostdevListByCaps(args))
def desktopLogin(self, args): vmId, domain, user, password = tuple(args[:4]) @@ -2138,6 +2160,12 @@ ('', 'Get Statistics info for all existing VMs' )), + 'hostdevListByCaps': (serv.do_hostdevListByCaps, + ('[<caps>]', + 'Get available devices on host with given ' + 'capability. Leave caps empty to list all ' + 'devices.' + )), 'getVGList': (serv.getVGList, ('storageType', 'List of all VGs.'
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdsm: expose hostdev via vdsClient ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/11265/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/12207/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/12054/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdsm: expose hostdev via vdsClient ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/11279/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/12221/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/12068/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdsm: expose hostdev via vdsClient ......................................................................
Patch Set 3:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/11735/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/12679/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/12524/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdsm: expose hostdev via vdsClient ......................................................................
Patch Set 4:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/11782/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/12728/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/12571/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdsm: expose hostdev via vdsClient ......................................................................
Patch Set 5:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/11783/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/12729/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/12572/ : SUCCESS
Francesco Romani has posted comments on this change.
Change subject: vdsm: expose hostdev via vdsClient ......................................................................
Patch Set 5: Code-Review+1
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdsm: expose hostdev via vdsClient ......................................................................
Patch Set 6:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/12793/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/11845/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/12636/ : SUCCESS
Martin Polednik has posted comments on this change.
Change subject: vdsm: expose hostdev via vdsClient ......................................................................
Patch Set 7: Verified+1
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdsm: expose hostdev via vdsClient ......................................................................
Patch Set 7:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/12804/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/11856/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/12647/ : SUCCESS
Francesco Romani has posted comments on this change.
Change subject: vdsm: expose hostdev via vdsClient ......................................................................
Patch Set 7: Code-Review+1
looks ok, although vdsClient begs for a rewrite...
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdsm: expose hostdev via vdsClient ......................................................................
Patch Set 8:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/13295/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/13135/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/12345/ : FAILURE
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdsm: expose hostdev via vdsClient ......................................................................
Patch Set 9:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/12817/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/13769/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/13606/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdsm: expose hostdev via vdsClient ......................................................................
Patch Set 10:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/13849/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/13060/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/14012/ : FAILURE
Dan Kenigsberg has posted comments on this change.
Change subject: vdsm: expose hostdev via vdsClient ......................................................................
Patch Set 10: Code-Review+2
Raising Francesco score
Dan Kenigsberg has submitted this change and it was merged.
Change subject: vdsm: expose hostdev via vdsClient ......................................................................
vdsm: expose hostdev via vdsClient
Exposes current API verb hostdevListByCaps by vdsClient, using pretty tree graphical structure.
Change-Id: I1e4dd1a1ee9af0d1873a081c115289ad2e52204f Signed-off-by: Martin Polednik mpolednik@redhat.com Reviewed-on: http://gerrit.ovirt.org/32316 Reviewed-by: Francesco Romani fromani@redhat.com Reviewed-by: Dan Kenigsberg danken@redhat.com --- M client/vdsClient.py 1 file changed, 29 insertions(+), 3 deletions(-)
Approvals: Dan Kenigsberg: Looks good to me, approved Francesco Romani: Looks good to me, but someone else must approve Martin Polednik: Verified
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdsm: expose hostdev via vdsClient ......................................................................
Patch Set 11:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master-libfapi_create-rpms-el6-x86_64_merg... : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_create-rpms-fc21-x86_64_merged/287/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master-libfapi_create-rpms-fc20-x86_64_mer... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_create-rpms_merged_test_debug/504/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master-libfapi_create-rpms-el7-x86_64_merg... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_create-rpms-fc20-x86_64_merged/303/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_merged/4297/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_create-rpms-el6-x86_64_merged/309/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_create-rpms-el7-x86_64_merged/311/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master-libfapi_create-rpms-fc21-x86_64_mer... : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_verify-error-codes_merged/6134/ : SUCCESS
vdsm-patches@lists.fedorahosted.org