We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 51d3023 + 47f0917 commit 72edfcdCopy full SHA for 72edfcd
test/infamy/netconf.py
@@ -297,14 +297,21 @@ def put_config(self, edit):
297
xml = xml.replace(f"yang:operation=\"{src}\"",
298
f"nc:operation=\"{dst}\"" if dst else "")
299
300
+ last_error = None
301
for _ in range(0, 3):
302
try:
303
self.ncc.edit_config(xml, default_operation='merge')
304
305
+ break
306
except RpcError as _e:
307
+ last_error = _e
308
print(f"Failed sending edit-config RPC: {_e} Retrying ...")
309
time.sleep(1)
310
continue
- break
311
+
312
+ # If we exhausted all retries, raise the last error
313
+ if last_error is not None:
314
+ raise last_error
315
316
def put_config_dicts(self, models):
317
"""PUT full configuration of all models to running-config"""
0 commit comments