1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
From: Vincent Bernat <vincent@bernat.im>
Date: Thu, 2 Nov 2017 21:57:17 +0100
Subject: Detect format "set" when using "insert" keyword
---
lib/jnpr/junos/utils/config.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/jnpr/junos/utils/config.py b/lib/jnpr/junos/utils/config.py
index 2d7d197..55a89ca 100644
--- a/lib/jnpr/junos/utils/config.py
+++ b/lib/jnpr/junos/utils/config.py
@@ -435,7 +435,7 @@ class Config(Util):
""" setup the kvargs/rpc_xattrs using string regular expression """
if re.search(r'^\s*<.*>$', rpc, re.MULTILINE):
kvargs['format'] = 'xml'
- elif re.search(r'^\s*(set|delete|replace|rename)\s', rpc):
+ elif re.search(r'^\s*(set|delete|replace|rename|insert)\s', rpc):
kvargs['format'] = 'set'
elif re.search(r'^[a-z:]*\s*[\w-]+\s+\{', rpc, re.I) and \
re.search(r'.*}\s*$', rpc):
|