~ubuntu-branches/ubuntu/raring/nova/raring-proposed

« back to all changes in this revision

Viewing changes to nova/tests/test_virt_drivers.py

  • Committer: Package Import Robot
  • Author(s): Adam Gandelman
  • Date: 2013-08-09 10:12:27 UTC
  • mto: This revision was merged to the branch mainline in revision 107.
  • Revision ID: package-import@ubuntu.com-20130809101227-flqfubhwpot76pob
Tags: upstream-2013.1.3
ImportĀ upstreamĀ versionĀ 2013.1.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
        def fake_make_drive(_self, _path):
106
106
            pass
107
107
 
108
 
        def fake_get_instance_disk_info(_self, instance, xml=None):
 
108
        def fake_get_instance_disk_info(_self, instance, xml=None,
 
109
                                        block_device_info=None):
109
110
            return '[]'
110
111
 
111
112
        self.stubs.Set(nova.virt.libvirt.driver.LibvirtDriver,
305
306
    @catch_notimplementederror
306
307
    def test_power_on_running(self):
307
308
        instance_ref, network_info = self._get_running_instance()
308
 
        self.connection.power_on(instance_ref)
 
309
        self.connection.power_on(self.ctxt, instance_ref,
 
310
                                 network_info, None)
309
311
 
310
312
    @catch_notimplementederror
311
313
    def test_power_on_powered_off(self):
312
314
        instance_ref, network_info = self._get_running_instance()
313
315
        self.connection.power_off(instance_ref)
314
 
        self.connection.power_on(instance_ref)
 
316
        self.connection.power_on(self.ctxt, instance_ref, network_info, None)
315
317
 
316
318
    @catch_notimplementederror
317
319
    def test_soft_delete(self):
401
403
        self.connection.attach_volume({'driver_volume_type': 'fake'},
402
404
                                      instance_ref,
403
405
                                      '/dev/sda')
404
 
        self.connection.power_on(instance_ref)
 
406
 
 
407
        bdm = {
 
408
            'root_device_name': None,
 
409
            'swap': None,
 
410
            'ephemerals': [],
 
411
            'block_device_mapping': [{
 
412
            'instance_uuid': instance_ref['uuid'],
 
413
            'connection_info': {'driver_volume_type': 'fake'},
 
414
            'mount_device': '/dev/sda',
 
415
            'delete_on_termination': False,
 
416
            'virtual_name': None,
 
417
            'snapshot_id': None,
 
418
            'volume_id': 'abcdedf',
 
419
            'volume_size': None,
 
420
            'no_device': None
 
421
            }]
 
422
        }
 
423
        self.connection.power_on(self.ctxt, instance_ref, network_info, bdm)
405
424
        self.connection.detach_volume({'driver_volume_type': 'fake'},
406
425
                                      instance_ref,
407
426
                                      '/dev/sda')