'Clones file on vserver.'

def clone_file(self, flex_vol, src_path, dest_path, vserver, dest_exists=False, source_snapshot=None, is_snapshot=False):

    LOG.debug('Cloning    with    params    volume    %(volume)s,    src    %(src_path)s,    dest    %(dest_path)s,    vserver    %(vserver)s,source_snapshot    %(source_snapshot)s', {'volume': flex_vol, 'src_path': src_path, 'dest_path': dest_path, 'vserver': vserver, 'source_snapshot': source_snapshot})
    zapi_args = {'volume': flex_vol, 'source-path': src_path, 'destination-path': dest_path}
    if (is_snapshot and self.features.BACKUP_CLONE_PARAM):
        zapi_args['is-backup'] = 'true'
    if source_snapshot:
        zapi_args['snapshot-name'] = source_snapshot
    clone_create = netapp_api.NaElement.create_node_with_children('clone-create', **zapi_args)
    (major, minor) = self.connection.get_api_version()
    if ((major == 1) and (minor >= 20) and dest_exists):
        clone_create.add_new_child('destination-exists', 'true')
    self._invoke_vserver_api(clone_create, vserver)
