Change in vdsm[master]: vdsm: hook for booting from an ISO image gathered via https

fromani at redhat.com fromani at redhat.com
Fri May 22 08:07:42 UTC 2015


Francesco Romani has posted comments on this change.

Change subject: vdsm: hook for booting from an ISO image gathered via https
......................................................................


Patch Set 13:

(2 comments)

Looks good. A couple of possible improvements inside, but no real need to change right now.

https://gerrit.ovirt.org/#/c/41076/13/vdsm_hooks/httpsisoboot/before_vm_start.py
File vdsm_hooks/httpsisoboot/before_vm_start.py:

Line 107:     target.setAttribute('tray', 'closed')
Line 108:     xmldisks = domxml.getElementsByTagName('disk')
Line 109:     disks = []
Line 110:     for d in xmldisks:
Line 111:         disks.append(d.getElementsByTagName('target')[0].getAttribute('dev'))
for a followup patch:


disks = set(
  d.getElementsByTagName('target')[0].getAttribute('dev')
  for d in
  domxml.getElementsByTagName('disk'))

(maybe factor out in an helper)
Line 112:     found = False
Line 113:     for i in range(0, 4):
Line 114:         dname = _DISK_BY_INDEX.get(i)
Line 115:         if dname and dname not in disks:


Line 110:     for d in xmldisks:
Line 111:         disks.append(d.getElementsByTagName('target')[0].getAttribute('dev'))
Line 112:     found = False
Line 113:     for i in range(0, 4):
Line 114:         dname = _DISK_BY_INDEX.get(i)
do we actually need this mapping?

for a followup patch:

  for dname in ('hda', 'hdb', 'hdc', 'hdd'):
    if dname not in disks:
      ...
Line 115:         if dname and dname not in disks:
Line 116:             target.setAttribute('dev', dname)
Line 117:             found = True
Line 118:             break


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I22b190b5d3d43cab7bdbfa81bdf0904b2988b2bc
Gerrit-PatchSet: 13
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Simone Tiraboschi <stirabos at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Eldan Shachar <eshachar at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <mskrivan at redhat.com>
Gerrit-Reviewer: Simone Tiraboschi <stirabos at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list