summaryrefslogtreecommitdiff
path: root/lib/Vyatta
diff options
context:
space:
mode:
authorJames Davidson <james.davidson@vyatta.com>2013-05-15 13:44:18 -0700
committerJames Davidson <james.davidson@vyatta.com>2013-05-16 13:03:42 -0700
commit7a50f6864162b76387e8ae0a9abf8c1a2b64c4f3 (patch)
tree52f28dfacb7de485083628150e743026e5a56083 /lib/Vyatta
parenta3fccc1040e6986aee77764f9752a50685e45ec5 (diff)
downloadvyatta-cfg-7a50f6864162b76387e8ae0a9abf8c1a2b64c4f3.tar.gz
vyatta-cfg-7a50f6864162b76387e8ae0a9abf8c1a2b64c4f3.zip
Add isMultiNode perl CLI API
Diffstat (limited to 'lib/Vyatta')
-rwxr-xr-xlib/Vyatta/Config.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Vyatta/Config.pm b/lib/Vyatta/Config.pm
index ea608ff..1469994 100755
--- a/lib/Vyatta/Config.pm
+++ b/lib/Vyatta/Config.pm
@@ -618,6 +618,15 @@ sub isTagNode {
return (defined($href) and $href->{tag});
}
+## isMultiNode("path")
+# whether specified path is a "multi leaf node", i.e., multi-value node.
+sub isMultiNode {
+ my ($self, $path) = @_;
+ my $href = $self->parseTmplAll($path, 1);
+ return (defined($href) and !$href->{is_value} and $href->{type}
+ and $href->{multi});
+}
+
## isLeafNode("path")
# whether specified path is a "leaf node", i.e., single-/multi-value node.
sub isLeafNode {