~midokura/nova/network-refactoring-l2

« back to all changes in this revision

Viewing changes to nova/virt/hyperv.py

  • Committer: Ryu Ishimoto
  • Date: 2011-07-20 11:21:44 UTC
  • Revision ID: ryu@midokura.jp-20110720112144-tl0h0lrn7y3iubw8
Added network_info parameter to all the appropriate places in virt layers and compute manager

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
 
140
140
        return instance_infos
141
141
 
142
 
    def spawn(self, instance, network_info=None, block_device_mapping=None):
 
142
    def spawn(self, instance, network_info, block_device_mapping=None):
143
143
        """ Create a new VM and start it."""
144
144
        vm = self._lookup(instance.name)
145
145
        if vm is not None:
368
368
                    wmi_obj.Properties_.Item(prop).Value
369
369
        return newinst
370
370
 
371
 
    def reboot(self, instance):
 
371
    def reboot(self, instance, network_info):
372
372
        """Reboot the specified instance."""
373
373
        vm = self._lookup(instance.name)
374
374
        if vm is None:
375
375
            raise exception.InstanceNotFound(instance_id=instance.id)
376
376
        self._set_vm_state(instance.name, 'Reboot')
377
377
 
378
 
    def destroy(self, instance):
 
378
    def destroy(self, instance, network_info):
379
379
        """Destroy the VM. Also destroy the associated VHD disk files"""
380
380
        LOG.debug(_("Got request to destroy vm %s"), instance.name)
381
381
        vm = self._lookup(instance.name)