CLI configurable format: [Default format should be configurable](https://github.com/clicon/clixon-controller/issues/87)
Added option: `CLICON_CLI_OUTPUT_FORMAT` - Default CLI output format
This commit is contained in:
parent
bd3a841103
commit
60a774cbf7
18 changed files with 168 additions and 83 deletions
|
|
@ -37,6 +37,7 @@ cat <<EOF > $cfg
|
|||
<CLICON_BACKEND_PIDFILE>/usr/local/var/run/$APPNAME.pidfile</CLICON_BACKEND_PIDFILE>
|
||||
<CLICON_XMLDB_DIR>/usr/local/var/$APPNAME</CLICON_XMLDB_DIR>
|
||||
<CLICON_VALIDATE_STATE_XML>true</CLICON_VALIDATE_STATE_XML>
|
||||
<CLICON_CLI_OUTPUT_FORMAT>cli</CLICON_CLI_OUTPUT_FORMAT>
|
||||
</clixon-config>
|
||||
EOF
|
||||
|
||||
|
|
@ -301,7 +302,7 @@ new "netconf get replaced config (report-all)"
|
|||
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "<rpc $DEFAULTNS><get-config><source><candidate/></source><with-defaults xmlns=\"urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults\">report-all</with-defaults></get-config></rpc>" "" "<rpc-reply $DEFAULTNS><data><interfaces xmlns=\"urn:ietf:params:xml:ns:yang:ietf-interfaces\"><interface><name>eth&</name><type>t<></type><enabled>true</enabled></interface><interface xmlns:ex=\"urn:example:clixon\"><name>eth1</name><type>ex:eth</type><enabled>true</enabled></interface><interface xmlns:ex=\"urn:example:clixon\"><name>eth2</name><type>ex:eth</type><enabled>true</enabled></interface></interfaces></data></rpc-reply>"
|
||||
|
||||
new "cli show configuration eth& - encoding tests"
|
||||
expectpart "$($clixon_cli -1 -f $cfg show conf cli)" 0 "interfaces interface eth& type t<>
|
||||
expectpart "$($clixon_cli -1 -f $cfg show conf)" 0 "interfaces interface eth& type t<>
|
||||
interfaces interface eth& enabled true"
|
||||
|
||||
new "netconf edit CDATA"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue