Ignore:
Timestamp:
Oct 16, 2007, 1:07:04 AM (17 years ago)
Author:
tabbott
Message:

use the new remctl interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/templates/main.py

    r188 r197  
    218218    """
    219219    if cdtype is not None:
    220         remctl('web', 'vmboot', machine.name,
     220        remctl('control', machine.name, 'create',
    221221               cdtype)
    222222    else:
    223         remctl('web', 'vmboot', machine.name)
     223        remctl('control', machine.name, 'create')
    224224
    225225def registerMachine(machine):
     
    275275    Gets and parses xm list --long
    276276    """
    277     value_string, err_string = remctl('list-long', machine.name, err=True)
     277    value_string, err_string = remctl('control', machine.name, 'list-long', err=True)
    278278    if 'Unknown command' in err_string:
    279279        raise CodeError("ERROR in remctl list-long %s is not registered" % (machine.name,))
     
    539539def deleteVM(machine):
    540540    """Delete a VM."""
    541     remctl('destroy', machine.name, err=True)
     541    remctl('control', machine.name, 'destroy', err=True)
    542542    transaction = ctx.current.create_transaction()
    543543    delete_disk_pairs = [(machine.name, d.guest_device_name) for d in machine.disks]
     
    571571    if action == 'Reboot':
    572572        if cdrom is not None:
    573             remctl('reboot', machine.name, cdrom)
     573            remctl('control', machine.name, 'reboot', cdrom)
    574574        else:
    575             remctl('reboot', machine.name)
     575            remctl('control', machine.name, 'reboot')
    576576    elif action == 'Power on':
    577577        if maxMemory(user) < machine.memory:
     
    580580        bootMachine(machine, cdrom)
    581581    elif action == 'Power off':
    582         remctl('destroy', machine.name)
     582        remctl('control', machine.name, 'destroy')
    583583    elif action == 'Shutdown':
    584         remctl('shutdown', machine.name)
     584        remctl('control', machine.name, 'shutdown')
    585585    elif action == 'Delete VM':
    586586        deleteVM(machine)
Note: See TracChangeset for help on using the changeset viewer.