Changed -f /usr/local/etc/example.xml -> /usr/local/etc/clixon/example.xml everywhere

This commit is contained in:
Olof hagsand 2024-05-05 09:46:25 +02:00
parent 60fdb65ee0
commit af36838b4c
9 changed files with 37 additions and 37 deletions

View file

@ -71,19 +71,19 @@ If elsewhere, use `./configure --with-yang-standard-dir=DIR`. Example to checkou
Start backend:
```
sudo clixon_backend -f /usr/local/etc/example.xml -s init
sudo clixon_backend -f /usr/local/etc/clixon/example.xml -s init
```
Start cli:
```
clixon_cli -f /usr/local/etc/example.xml
clixon_cli -f /usr/local/etc/clixon/example.xml
```
Send netconf command:
```
clixon_netconf -f /usr/local/etc/example.xml
clixon_netconf -f /usr/local/etc/clixon/example.xml
```
Start clixon restconf daemon (default config listens on http IPv4 0.0.0.0 on port 8080):
```
sudo clixon_restconf -f /usr/local/etc/example.xml
sudo clixon_restconf -f /usr/local/etc/clixon/example.xml
```
Send restconf command
```
@ -97,11 +97,11 @@ There are also many other commands available as examples. View the source file (
The following example shows how to add an interface in candidate, validate and commit it to running, then look at it (as xml) and finally delete it.
```
clixon_cli -f /usr/local/etc/example.xml
cli> set table parameter a ?
clixon_cli -f /usr/local/etc/clixon/example.xml
cli> merge table parameter a ?
<cr>
value
cli> set table parameter a value 42
cli> merge table parameter a value 42
cli> validate
cli> commit
cli> show configuration
@ -130,7 +130,7 @@ cli> commit
The following example shows how to set data using netconf (Use `-0` for EOM framing that can be used in shell):
```
sh> clixon_netconf -qf /usr/local/etc/example.xml
sh> clixon_netconf -qf /usr/local/etc/clixon/example.xml
<?xml version="1.0" encoding="UTF-8"?>
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><capabilities><capability>urn:ietf:params:netconf:base:1.0</capability></capabilities></hello>]]>]]>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0">
@ -257,7 +257,7 @@ Start nginx daemon
Start the clixon restconf daemon
```
sudo /usr/local/sbin/clixon_restconf -f /usr/local/etc/example.xml
sudo /usr/local/sbin/clixon_restconf -f /usr/local/etc/clixon/example.xml
```
then access using curl or wget:
```
@ -276,7 +276,7 @@ stream in the session using netconf, create a subscription:
```
This can also be triggered via the CLI:
```
clixon_cli -f /usr/local/etc/example.xml
clixon_cli -f /usr/local/etc/clixon/example.xml
cli> notify
cli> event-class fault;
reportingEntity {
@ -298,19 +298,19 @@ not recommended . The example includes an example:
Example using CLI:
```
clixon_cli -f /usr/local/etc/example.xml
clixon_cli -f /usr/local/etc/clixon/example.xml
cli> rpc ipv4
<rpc-reply><x xmlns="urn:example:clixon">ipv4</x><y xmlns="urn:example:clixon">42</y></rpc-reply>
```
Example using Netconf:
```
clixon_netconf -qf /usr/local/etc/example.xml
clixon_netconf -qf /usr/local/etc/clixon/example.xml
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><example xmlns="urn:example:clixon"><x>ipv4</x></example></rpc>]]>]]>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><x xmlns="urn:example:clixon">ipv4</x><y xmlns="urn:example:clixon">42</y></rpc-reply>]]>]]>
```
Restconf (assuming nginx started):
```
sudo /usr/local/sbin/clixon_restconf -f /usr/local/etc/example.xml
sudo /usr/local/sbin/clixon_restconf -f /usr/local/etc/clixon/example.xml
curl -X POST http://localhost/restconf/operations/clixon-example:example -H "Content-Type: application/yang-data+json" -d '{"clixon-example:input":{"x":"ipv4"}}'
{
"clixon-example:output": {

View file

@ -7,7 +7,7 @@ Type=forking
User=root
RestartSec=60
Restart=on-failure
ExecStart=/usr/local/sbin/clixon_backend -s running -f /usr/local/etc/example.xml
ExecStart=/usr/local/sbin/clixon_backend -s running -f /usr/local/etc/clixon/example.xml
[Install]
WantedBy=multi-user.target

View file

@ -8,7 +8,7 @@ Type=simple
User=www-data
WorkingDirectory=/www-data
Restart=on-failure
ExecStart=/www-data/clixon_restconf -f /usr/local/etc/example.xml
ExecStart=/www-data/clixon_restconf -f /usr/local/etc/clixon/example.xml
[Install]
WantedBy=multi-user.target