def relocate_vm_spec(client_factory, datastore=None, host=None, disk_move_type='moveAllDiskBackingsAndAllowSharing'):
 rel_spec = client_factory.create('ns0:VirtualMachineRelocateSpec')
 rel_spec.datastore = datastore
 rel_spec.diskMoveType = disk_move_type
 rel_spec.host = host
 return rel_spec

def relocate_vm_spec ( client_factory , datastore = None , host = None , disk_move_type = 'moveAllDiskBackingsAndAllowSharing' ) : rel_spec = client_factory . create ( 'ns0:VirtualMachineRelocateSpec' ) rel_spec . datastore = datastore rel_spec . diskMoveType = disk_move_type rel_spec . host = host return rel_spec
builds the vm relocation spec .