summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2010-08-13 18:17:53 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2010-08-13 18:17:53 -0700
commit23d52a81e07e829035abc8cfb5f5bf17aaf642a0 (patch)
treefc4a4b90f1f6b67361b0647eb097d38855f63ed1
parent7344a10432d10362fa563fa3dd056dbd6a73174f (diff)
downloadvyatta-cfg-23d52a81e07e829035abc8cfb5f5bf17aaf642a0.tar.gz
vyatta-cfg-23d52a81e07e829035abc8cfb5f5bf17aaf642a0.zip
add function to perl API
-rwxr-xr-xlib/Vyatta/Config.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Vyatta/Config.pm b/lib/Vyatta/Config.pm
index a02ee18..d37d34f 100755
--- a/lib/Vyatta/Config.pm
+++ b/lib/Vyatta/Config.pm
@@ -534,13 +534,20 @@ sub listNodeStatusDA {
}
## returnComment("node")
-# return comment of "node" or undef if comment doesn't exist
+# return comment of "node" in working config or undef if comment doesn't exist
sub returnComment {
my ($self, $path) = @_;
return $self->{_cstore}->cfgPathGetComment($self->get_path_comps($path),
undef);
}
+## returnOrigComment("node")
+# return comment of "node" in active config or undef if comment doesn't exist
+sub returnOrigComment {
+ my ($self, $path) = @_;
+ return $self->{_cstore}->cfgPathGetComment($self->get_path_comps($path), 1);
+}
+
############################################################
# high-level API functions (not using the cstore library directly)