diff options
author | James Davidson <james.davidson@vyatta.com> | 2013-05-15 13:44:18 -0700 |
---|---|---|
committer | James Davidson <james.davidson@vyatta.com> | 2013-05-16 13:03:42 -0700 |
commit | 7a50f6864162b76387e8ae0a9abf8c1a2b64c4f3 (patch) | |
tree | 52f28dfacb7de485083628150e743026e5a56083 /lib | |
parent | a3fccc1040e6986aee77764f9752a50685e45ec5 (diff) | |
download | vyatta-cfg-7a50f6864162b76387e8ae0a9abf8c1a2b64c4f3.tar.gz vyatta-cfg-7a50f6864162b76387e8ae0a9abf8c1a2b64c4f3.zip |
Add isMultiNode perl CLI API
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Vyatta/Config.pm | 9 |
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 { |