Skip to content

Commit d27bbf0

Browse files
author
Karthik Kumaravel
authored
Update grpc_example.py
Fixed Insecure and Secure Options for example
1 parent 8770932 commit d27bbf0

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

examples/grpc_example.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@
44
import json
55

66
def main():
7-
#creds = open('ems.pem').read()
8-
#options='ems.cisco.com'
9-
client = CiscoGRPCClient('11.1.1.10', 57777, 10, 'vagrant', 'vagrant')
7+
'''
8+
To not use tls we need to do 2 things.
9+
1. Comment the variables creds and options out
10+
2. Remove creds and options CiscoGRPCClient
11+
ex: client = CiscoGRPCClient('11.1.1.10', 57777, 10, 'vagrant', 'vagrant')
12+
'''
13+
creds = open('ems.pem').read()
14+
options='ems.cisco.com'
15+
client = CiscoGRPCClient('11.1.1.10', 57777, 10, 'vagrant', 'vagrant', creds, options)
1016
#Test 1: Test Get config json requests
1117
path = '{"Cisco-IOS-XR-ip-static-cfg:router-static": [null]}'
1218
result = client.getconfig(path)

0 commit comments

Comments
 (0)