File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 115
115
input ("Press Enter for Set update..." )
116
116
set_update = proto .gnmi_pb2 .Update ()
117
117
# This is the fully modeled JSON we want to update with
118
- update_json = json .loads ("""
118
+ update_json = json .loads (
119
+ """
119
120
{
120
121
"openconfig-interfaces:interfaces": {
121
122
"interface": [
125
126
]
126
127
}
127
128
}
128
- """ )
129
+ """
130
+ )
129
131
# Let's just do an update from the very top element
130
132
top_element = next (iter (update_json .keys ()))
131
133
set_update .path .CopyFrom (client .parse_xpath_to_gnmi_path (top_element ))
135
137
set_update .val .json_ietf_val = json .dumps (update_json ).encode ("utf-8" )
136
138
set_result = client .set (updates = [set_update ])
137
139
print (set_result )
138
- # This may all seem somewhat obtuse, and that's what the client wrappers are for.
140
+ # This may all seem somewhat obtuse, and that's what the client wrappers are for.
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ class ClientBuilder(object):
82
82
"NX-OS" : NXClient ,
83
83
"NX" : NXClient ,
84
84
"IOS XE" : XEClient ,
85
- "XE" : XEClient
85
+ "XE" : XEClient ,
86
86
}
87
87
88
88
def __init__ (self , target ):
Original file line number Diff line number Diff line change @@ -64,8 +64,7 @@ def main():
64
64
65
65
See <rpc> --help for RPC options.
66
66
""" .format (
67
- version = __version__ ,
68
- supported_rpcs = "\n " .join (sorted (list (rpc_map .keys ())))
67
+ version = __version__ , supported_rpcs = "\n " .join (sorted (list (rpc_map .keys ())))
69
68
),
70
69
)
71
70
parser .add_argument ("rpc" , help = "gNMI RPC to perform against network element." )
You can’t perform that action at this time.
0 commit comments