machine = validation.Validate(username, state, machine_id=machine_id).machine
action = command_name
cdrom = fields.get('cdrom') or None
if cdrom is not None and not CDROM.query.filter_by(cdrom_id=cdrom).one():
raise CodeError("Invalid cdrom type '%s'" % cdrom)
machine = validation.Validate(username, state, machine_id=machine_id).machine
action = command_name
cdrom = fields.get('cdrom') or None
if cdrom is not None and not CDROM.query.filter_by(cdrom_id=cdrom).one():
raise CodeError("Invalid cdrom type '%s'" % cdrom)