Skip to content

Commit 366d82e

Browse files
authored
Update README with json-rpc details and corrections
Corrected spelling of 'json/rpc' to 'json-rpc' and added details about json-rpc methods and format.
1 parent 581011e commit 366d82e

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

srlinux/README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,32 @@ Links:
88
These devices are built on yang models so in theory it will help me better understand model driven programmability.
99

1010
SR Linux has a couple of interfaces you can use for programmability:
11-
* json/rpc sever - Use requests library to interface with this server for device configuration and management.
11+
* json-rpc sever - Use requests library to interface with this server for device configuration and management.
1212
* gRPC server- Uses gNMI for device configuration and telemetry
1313

1414
Lab set up to get familiar with the interface Cli, as well as the two programmabile interfaces:
1515

1616
sw1 (rid 1.1.1.1) eth-1/1.0 (192.168.0.0/31) <----> (192.168.0.1/31) eth-1/1.0 (rid 2.2.2.2) sw2
17+
### json-rpc
18+
method options
19+
* get - Used to retrieve configuration and state details from the system.
20+
* set - Used to set a configuration or run operational transaction. The set method can be used with the candidate and tools datastores.
21+
* validate - Used to verify that the system accepts a configuration transaction before applying it to the system.
22+
* cli - Used to run CLI commands. The get and set methods are restricted to accessing data structures via the YANG models, but the cli method can access any commands added to the system via python plug-ins or aliases.
23+
24+
format
25+
```
26+
{
27+
"jsonrpc": "2.0",
28+
"id": 0,
29+
"method": "get",
30+
"params": {
31+
}
32+
}
33+
```
34+
https://documentation.nokia.com/srlinux/25-10/books/system-mgmt/json-interface.html
35+
1736

18-
json/rpc
1937
- json_rpc/update_intf_description.py - update interface config
2038
- json_rpc/enable_ospf.py - build the ospf
2139
- json_rpc/get_info.py - validation code

0 commit comments

Comments
 (0)