

def request(self, rpc_command, source=None, filter=None):
    '\n        *rpc_command* specifies rpc command to be dispatched either in plain text or in xml element format (depending on command)\n\n        *source* name of the configuration datastore being queried\n\n        *filter* specifies the portion of the configuration to retrieve (by default entire configuration is retrieved)\n\n        :seealso: :ref:`filter_params`\n\n        Examples of usage::\n\n        dispatch(\'clear-arp-table\')\n\n        or dispatch element like ::\n\n        xsd_fetch = new_ele(\'get-xnm-information\')\n        sub_ele(xsd_fetch, \'type\').text="xml-schema"\n        sub_ele(xsd_fetch, \'namespace\').text="junos-configuration"\n        dispatch(xsd_fetch)\n        '
    if ET.iselement(rpc_command):
        node = rpc_command
    else:
        node = new_ele(rpc_command)
    if (source is not None):
        node.append(util.datastore_or_url('source', source, self._assert))
    if (filter is not None):
        node.append(util.build_filter(filter))
    return self._request(node)

dataset/ETHPy150Open osrg/ryu/ryu/contrib/ncclient/operations/retrieve.py Dispatch.request/original