choppsv1 / netconf

Netconf Server and Client Library for Python
55 stars 31 forks source link

[Feature request] Allow the user to pass a complete RPC file #42

Open jean-christophe-manciot opened 2 years ago

jean-christophe-manciot commented 2 years ago

@choppsv1 netconf: 2.1.0 (pypi)

Many commands cannot be executed with the current netconf-client implementation, such as:

In order to allow all these commands, I suggest to allow the user to pass a RPC file containing the complete RPC, such as:

<discard-changes xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"/>

or

    <lock xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <target>
        <candidate/>
      </target>
    </lock>

and so on...

You could call this option --rpc <file_name>.

jean-christophe-manciot commented 2 years ago

@choppsv1 @userzimmermann The new RPC call syntax could look like this:

netconf-client --host <ip_address> --port 830 -u <username> -p <password> --rpc rpc_file.xml

Any thoughts?