summaryrefslogtreecommitdiff
path: root/python/vyos/xml
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-06-25 19:57:42 +0200
committerGitHub <noreply@github.com>2020-06-25 19:57:42 +0200
commit2c2739eb134091007644a861688ab431465d7699 (patch)
tree28cdd6146470bc9579397a96ec821e2929a45d37 /python/vyos/xml
parent8bc1c23d218b1e75a7807eb4ca978a29543cf67e (diff)
parent52fb25ba4f875135bb9ca8ee6df754ca55a3a6db (diff)
downloadvyos-1x-2c2739eb134091007644a861688ab431465d7699.tar.gz
vyos-1x-2c2739eb134091007644a861688ab431465d7699.zip
Merge pull request #476 from thomas-mangin/T2588-fix-with
xml: T2528: fix defaults
Diffstat (limited to 'python/vyos/xml')
-rw-r--r--python/vyos/xml/definition.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/python/vyos/xml/definition.py b/python/vyos/xml/definition.py
index 52cbbaf97..a66170a18 100644
--- a/python/vyos/xml/definition.py
+++ b/python/vyos/xml/definition.py
@@ -290,17 +290,17 @@ class XML(dict):
spath.pop(0)
return tree
- def _get(self, lpath, tag):
- return self._tree(lpath + [tag])
+ def _get(self, lpath, tag, with_tag=True):
+ return self._tree(lpath + [tag], with_tag)
- def is_multi(self, lpath):
- return self._get(lpath, kw.multi) is True
+ def is_multi(self, lpath, with_tag=True):
+ return self._get(lpath, kw.multi, with_tag) is True
- def is_tag(self, lpath):
- return self._get(lpath, kw.node) == kw.tagNode
+ def is_tag(self, lpath, with_tag=True):
+ return self._get(lpath, kw.node, with_tag) == kw.tagNode
- def is_leaf(self, lpath):
- return self._get(lpath, kw.node) == kw.leafNode
+ def is_leaf(self, lpath, with_tag=True):
+ return self._get(lpath, kw.node, with_tag) == kw.leafNode
- def exists(self, lpath):
- return self._get(lpath, kw.node) is not None
+ def exists(self, lpath, with_tag=True):
+ return self._get(lpath, kw.node, with_tag) is not None