Skip to content

Commit ba0181b

Browse files
author
kkumara3
committed
Updated README
1 parent 29a68ca commit ba0181b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
* Grpc for Cisco IOS-XR in python
2+
3+
This is a small repo testing GRPC in python for the IOS-XR end node. This setup is currently working in the IOS-XRv on vagrant.
4+
To get started there are two examples here, one for MDT and one for grpc rpc calls.
5+
6+
**GRPC Calls
7+
The file is called example_grpc.py. This file has an excamples of the different rpc calls. This configuration shows how to get things started with self signed certs.
8+
9+
1. Download the repository
10+
2. Install grpc
11+
```pip install grpcio``` (sudo may be required)
12+
3. ssh into the router and turn on grpc and tls on the router, below is an example configuration.
13+
```
14+
interface GigabitEthernet 0/0/0/0
15+
ipv4 address 192.168.1.2 255.255.255.0
16+
no shut
17+
18+
grpc
19+
tls
20+
port 57777
21+
!
22+
!
23+
```
24+
4. Copy the autogenerated .pem file to the 'keys' folder in the client directory.
25+
```scp cisco@192.168.1.2:/misc/config/grpc/ems.pem ./```
26+
5. If you are using your own box, change the parameters in the example.py file to have the proper authentication credentials.
27+
6.. Run the program ```python example.py```
28+
29+
(note if you don't want to use TLS, a client with insecure transport is provided, change the import statement from client.cisco_grpc_client to client.cisco_grpc_client_insecure)

0 commit comments

Comments
 (0)