~ubuntu-branches/ubuntu/quantal/nova/quantal-proposed

« back to all changes in this revision

Viewing changes to nova/virt/xenapi/fake.py

  • Committer: Package Import Robot
  • Author(s): Adam Gandelman, Adam Gandelman, Chuck Short
  • Date: 2012-08-27 15:37:18 UTC
  • mfrom: (1.1.60)
  • Revision ID: package-import@ubuntu.com-20120827153718-lj8er44eqqz1gsrj
Tags: 2012.2~rc1~20120827.15815-0ubuntu1
[ Adam Gandelman ]
* New upstream release.

[ Chuck Short ]
* debian/patches/0001-Update-tools-hacking-for-pep8-1.2-and-
  beyond.patch: Dropped we dont run pep8 tests anymore.
* debian/control: Drop pep8 build depends
* debian/*.upstart.in: Make sure we transition correctly from runlevel
  1 to 2. (LP: #820694)

Show diffs side-by-side

added added

removed removed

Lines of Context:
254
254
                  other_config={'i18n-original-value-name_label':
255
255
                                'Local storage',
256
256
                                'i18n-key': 'local-storage'},
 
257
                  physical_size=40000,
257
258
                  physical_utilisation=20000,
258
259
                  virtual_allocation=10000,
259
260
                  host_ref=host_ref)
262
263
                  other_config={'i18n-original-value-name_label':
263
264
                                'Local storage ISO',
264
265
                                'i18n-key': 'local-storage-iso'},
 
266
                  physical_size=80000,
265
267
                  physical_utilisation=40000,
266
268
                  virtual_allocation=80000,
267
269
                  host_ref=host_ref)
412
414
        rec['currently_attached'] = False
413
415
        rec['device'] = ''
414
416
 
 
417
    def VBD_add_to_other_config(self, _1, vbd_ref, key, value):
 
418
        db_ref = _db_content['VBD'][vbd_ref]
 
419
        if not 'other_config' in db_ref:
 
420
            db_ref['other_config'] = {}
 
421
        if key in db_ref['other_config']:
 
422
            raise Failure(['MAP_DUPLICATE_KEY', 'VBD', 'other_config',
 
423
                           vbd_ref, key])
 
424
        db_ref['other_config'][key] = value
 
425
 
 
426
    def VBD_get_other_config(self, _1, vbd_ref):
 
427
        db_ref = _db_content['VBD'][vbd_ref]
 
428
        if not 'other_config' in db_ref:
 
429
            return {}
 
430
        return db_ref['other_config']
 
431
 
415
432
    def PBD_create(self, _1, pbd_rec):
416
433
        pbd_ref = _create_object('PBD', pbd_rec)
417
434
        _db_content['PBD'][pbd_ref]['currently_attached'] = False
492
509
    def VM_pool_migrate(self, _1, vm_ref, host_ref, options):
493
510
        pass
494
511
 
495
 
    def VM_migrate_send(self, vmref, migrate_data, islive, vdi_map,
496
 
                        vif_map, options):
497
 
        pass
498
 
 
499
512
    def VDI_remove_from_other_config(self, _1, vdi_ref, key):
500
513
        db_ref = _db_content['VDI'][vdi_ref]
501
514
        if not 'other_config' in db_ref: