summaryrefslogtreecommitdiff
path: root/python/vyos/xml
diff options
context:
space:
mode:
authorThomas Mangin <thomas.mangin@exa.net.uk>2020-06-25 18:41:12 +0100
committerThomas Mangin <thomas.mangin@exa.net.uk>2020-06-25 18:41:12 +0100
commit52fb25ba4f875135bb9ca8ee6df754ca55a3a6db (patch)
tree28cdd6146470bc9579397a96ec821e2929a45d37 /python/vyos/xml
parent8bc1c23d218b1e75a7807eb4ca978a29543cf67e (diff)
downloadvyos-1x-52fb25ba4f875135bb9ca8ee6df754ca55a3a6db.tar.gz
vyos-1x-52fb25ba4f875135bb9ca8ee6df754ca55a3a6db.zip
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