Ignore:
Timestamp:
Oct 9, 2008, 2:12:36 AM (16 years ago)
Author:
broder
Message:

Look for CD images in /dev/xenvg/image_* and validate them against the
database

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-database/client/etc/xen/sipb-database

    r1079 r1090  
    1919machine = models.Machine.query().filter_by(name=machine_name).one()
    2020check(machine is not None)
    21 machine_type = models.Type.query().filter_by(type_id=machine.type_id).one()
     21machine_type = machine.type
     22cdrom = None
     23if 'cdrom_image' in locals():
     24    cdrom = models.CDROM.query().filter_by(name=cdrom_image).one()
     25    check(cdrom is not None)
    2226
    2327memory = machine.memory
     
    6468    root = '/dev/hdb1'
    6569    codepath = None
    66 elif 'cdrom_image' in locals():
    67     check(re.match('^[A-Za-z0-9][A-Za-z0-9_.-]*$', cdrom_image))
    68     disk.append('phy:/srv/images/' + cdrom_image + '.iso,hdc:cdrom,r')
     70elif cdrom is not None:
     71    disk.append('phy:/etc/xenvg/image_' + cdrom.cdrom_id + ',hdc:cdrom,r')
    6972    boot = 'd'
    7073    codepath = 'hvm'
Note: See TracChangeset for help on using the changeset viewer.