From 7a50f6864162b76387e8ae0a9abf8c1a2b64c4f3 Mon Sep 17 00:00:00 2001 From: James Davidson Date: Wed, 15 May 2013 13:44:18 -0700 Subject: Add isMultiNode perl CLI API --- lib/Vyatta/Config.pm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib') 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 { -- cgit v1.2.3