From 23d52a81e07e829035abc8cfb5f5bf17aaf642a0 Mon Sep 17 00:00:00 2001
From: An-Cheng Huang <ancheng@vyatta.com>
Date: Fri, 13 Aug 2010 18:17:53 -0700
Subject: add function to perl API

---
 lib/Vyatta/Config.pm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

(limited to 'lib/Vyatta')

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)
-- 
cgit v1.2.3