nova/virt/xenapi/fake.py
def after_VBD_create(vbd_ref, vbd_rec):
    """Create read-only fields and backref from VM and VDI to VBD when VBD
    is created.
    """
    vbd_rec['currently_attached'] = False
    vbd_rec['device'] = ''

    vm_ref = vbd_rec['VM']
    vm_rec = _db_content['VM'][vm_ref]
    vm_rec['VBDs'].append(vbd_ref)

    vm_name_label = _db_content['VM'][vm_ref]['name_label']
    vbd_rec['vm_name_label'] = vm_name_label

    vdi_ref = vbd_rec['VDI']
    if vdi_ref and vdi_ref != "OpaqueRef:NULL":
        vdi_rec = _db_content['VDI'][vdi_ref]
        vdi_rec['VBDs'].append(vbd_ref)
Create read-only fields and backref from VM and VDI to VBD when VBD
    is created.
    
Create read-only fields and backref from VM and VDI to VBD when VBD
is created.
Create read - only fields and backref from VM and VDI to VBD when VBD is created .
def after_VBD_create(vbd_ref, vbd_rec):
    vbd_rec['currently_attached'] = False
    vbd_rec['device'] = ''
    vm_ref = vbd_rec['VM']
    vm_rec = _db_content['VM'][vm_ref]
    vm_rec['VBDs'].append(vbd_ref)
    vm_name_label = _db_content['VM'][vm_ref]['name_label']
    vbd_rec['vm_name_label'] = vm_name_label
    vdi_ref = vbd_rec['VDI']
    if vdi_ref and vdi_ref != "OpaqueRef:NULL":
        vdi_rec = _db_content['VDI'][vdi_ref]
        vdi_rec['VBDs'].append(vbd_ref)
def after_VBD_create ( vbd_ref , vbd_rec ) : vbd_rec [ 'currently_attached' ] = False vbd_rec [ 'device' ] = '' vm_ref = vbd_rec [ 'VM' ] vm_rec = _db_content [ 'VM' ] [ vm_ref ] vm_rec [ 'VBDs' ] . append ( vbd_ref ) vm_name_label = _db_content [ 'VM' ] [ vm_ref ] [ 'name_label' ] vbd_rec [ 'vm_name_label' ] = vm_name_label vdi_ref = vbd_rec [ 'VDI' ] if vdi_ref and vdi_ref != "OpaqueRef:NULL" : vdi_rec = _db_content [ 'VDI' ] [ vdi_ref ] vdi_rec [ 'VBDs' ] . append ( vbd_ref )
Create read-only fields and backref from VM and VDI to VBD when VBD
is created.
Create read - only fields and backref from VM and VDI to VBD when VBD is created .
"""Create read-only fields and backref from VM and VDI to VBD when VBD
    is created.
    """
vbd_ref
vbd_rec