nova/virt/xenapi/fake.py
def after_VM_create(vm_ref, vm_rec):
    """Create read-only fields in the VM record."""
    vm_rec.setdefault('domid', -1)
    vm_rec.setdefault('is_control_domain', False)
    vm_rec.setdefault('is_a_template', False)
    vm_rec.setdefault('memory_static_max', str(8 * units.Gi))
    vm_rec.setdefault('memory_dynamic_max', str(8 * units.Gi))
    vm_rec.setdefault('VCPUs_max', str(4))
    vm_rec.setdefault('VBDs', [])
    vm_rec.setdefault('resident_on', '')
Create read-only fields in the VM record.
Create read-only fields in the VM record.
Create read - only fields in the VM record .
def after_VM_create(vm_ref, vm_rec):
    vm_rec.setdefault('domid', -1)
    vm_rec.setdefault('is_control_domain', False)
    vm_rec.setdefault('is_a_template', False)
    vm_rec.setdefault('memory_static_max', str(8 * units.Gi))
    vm_rec.setdefault('memory_dynamic_max', str(8 * units.Gi))
    vm_rec.setdefault('VCPUs_max', str(4))
    vm_rec.setdefault('VBDs', [])
    vm_rec.setdefault('resident_on', '')
def after_VM_create ( vm_ref , vm_rec ) : vm_rec . setdefault ( 'domid' , - 1 ) vm_rec . setdefault ( 'is_control_domain' , False ) vm_rec . setdefault ( 'is_a_template' , False ) vm_rec . setdefault ( 'memory_static_max' , str ( 8 * units . Gi ) ) vm_rec . setdefault ( 'memory_dynamic_max' , str ( 8 * units . Gi ) ) vm_rec . setdefault ( 'VCPUs_max' , str ( 4 ) ) vm_rec . setdefault ( 'VBDs' , [ ] ) vm_rec . setdefault ( 'resident_on' , '' )
Create read-only fields in the VM record.
Create read - only fields in the VM record .
"""Create read-only fields in the VM record."""
vm_ref
vm_rec