File tree Expand file tree Collapse file tree 2 files changed +5
-19
lines changed Expand file tree Collapse file tree 2 files changed +5
-19
lines changed Original file line number Diff line number Diff line change @@ -119,8 +119,9 @@ def set_os(self, name=None):
119
119
name : str
120
120
"IOS XR" maps to the XRClient class.
121
121
"NX-OS" maps to the NXClient class.
122
+ "IOS XE" maps to the XEClient class.
122
123
None maps to the base Client class which simply wraps the gNMI stub.
123
- ["IOS XR", "NX-OS", None]
124
+ ["IOS XR", "NX-OS", "IOS XE", None]
124
125
125
126
Returns
126
127
-------
@@ -273,7 +274,7 @@ def construct(self):
273
274
274
275
Returns
275
276
-------
276
- Client or XRClient
277
+ Client or NXClient or XEClient or XRClient
277
278
"""
278
279
channel = None
279
280
channel_ssl_creds = None
Original file line number Diff line number Diff line change @@ -159,24 +159,9 @@ def create_updates(name, configs):
159
159
if len (config .keys ()) > 1 :
160
160
raise Exception ("config should only target one YANG module!" )
161
161
top_element = next (iter (config .keys ()))
162
- top_element_split = top_element .split (":" )
163
- if len (top_element_split ) < 2 :
164
- raise Exception (
165
- "Top level config element {} should be module prefixed!" .format (
166
- top_element
167
- )
168
- )
169
- if len (top_element_split ) > 2 :
170
- raise Exception (
171
- "Top level config element {} appears malformed!" .format (
172
- top_element
173
- )
174
- )
175
- origin = top_element_split [0 ]
176
- element = top_element_split [1 ]
177
- config = config .pop (top_element )
178
162
update = proto .gnmi_pb2 .Update ()
179
- update .path .CopyFrom (self .parse_xpath_to_gnmi_path (element , origin ))
163
+ update .path .CopyFrom (self .parse_xpath_to_gnmi_path (top_element ))
164
+ config = config .pop (top_element )
180
165
if ietf :
181
166
update .val .json_ietf_val = json .dumps (config ).encode ("utf-8" )
182
167
else :
You can’t perform that action at this time.
0 commit comments