@@ -45,14 +45,14 @@ Since `v1.0.0` a builder pattern is available with `ClientBuilder`. `ClientBuild
45
45
from cisco_gnmi import ClientBuilder
46
46
47
47
builder = ClientBuilder(' 127.0.0.1:9339' )
48
- builder.set_os(' IOS- XR' )
48
+ builder.set_os(' IOS XR' )
49
49
builder.set_secure_from_target()
50
50
builder.set_call_authentication(' admin' , ' its_a_secret' )
51
51
client = builder.construct()
52
52
53
53
# Or...
54
54
55
- client = ClientBuilder(' 127.0.0.1:9339' ).set_os(' IOS- XR' ).set_secure_from_target().set_call_authentication(' admin' , ' its_a_secret' ).construct()
55
+ client = ClientBuilder(' 127.0.0.1:9339' ).set_os(' IOS XR' ).set_secure_from_target().set_call_authentication(' admin' , ' its_a_secret' ).construct()
56
56
```
57
57
58
58
Using an encrypted channel automatically getting the certificate from the device, quick for testing:
@@ -62,7 +62,7 @@ from cisco_gnmi import ClientBuilder
62
62
63
63
client = ClientBuilder(
64
64
' 127.0.0.1:9339'
65
- ).set_os(' IOS- XR' ).set_secure_from_target().set_call_authentication(
65
+ ).set_os(' IOS XR' ).set_secure_from_target().set_call_authentication(
66
66
' admin' ,
67
67
' its_a_secret'
68
68
).construct()
@@ -75,7 +75,7 @@ from cisco_gnmi import ClientBuilder
75
75
76
76
client = ClientBuilder(
77
77
' 127.0.0.1:9339'
78
- ).set_os(' IOS- XR' ).set_secure_from_file(
78
+ ).set_os(' IOS XR' ).set_secure_from_file(
79
79
' ems.pem'
80
80
).set_call_authentication(
81
81
' admin' ,
@@ -94,7 +94,7 @@ with open('ems.pem', 'rb') as cert_fd:
94
94
95
95
client = ClientBuilder(
96
96
' 127.0.0.1:9339'
97
- ).set_secure(
97
+ ).set_os( ' IOS XR ' ). set_secure(
98
98
root_cert
99
99
).set_call_authentication(
100
100
' admin' ,
@@ -109,7 +109,7 @@ from cisco_gnmi import ClientBuilder
109
109
110
110
client = ClientBuilder(
111
111
' 127.0.0.1:9339'
112
- ).set_secure_from_file(
112
+ ).set_os( ' IOS XR ' ). set_secure_from_file(
113
113
root_certificates = ' rootCA.pem' ,
114
114
private_key = ' client.key' ,
115
115
certificate_chain = ' client.crt' ,
0 commit comments