'Return spec for relocating volume backing.
:param datastore: Reference to the datastore
:param resource_pool: Reference to the resource pool
:param host: Reference to the host
:param disk_move_type: Disk move type option
:param disk_type: Destination disk type
:param disk_device: Virtual device corresponding to the disk
:return: Spec for relocation'

def _get_relocate_spec(self, datastore, resource_pool, host, disk_move_type, disk_type=None, disk_device=None):

    cf = self._session.vim.client.factory
    relocate_spec = cf.create('ns0:VirtualMachineRelocateSpec')
    relocate_spec.datastore = datastore
    relocate_spec.pool = resource_pool
    relocate_spec.host = host
    relocate_spec.diskMoveType = disk_move_type
    if ((disk_type is not None) and (disk_device is not None)):
        disk_locator = self._create_relocate_spec_disk_locator(datastore, disk_type, disk_device)
        relocate_spec.disk = [disk_locator]
    LOG.debug('Spec    for    relocating    the    backing:    %s.', relocate_spec)
    return relocate_spec
