[freeside-commits] freeside/FS/FS/NetworkMonitoringSystem Torrus_Internal.pm, 1.17, 1.18

Erik Levinson levinse at wavetail.420.am
Sat May 14 18:43:42 PDT 2011


Update of /home/cvs/cvsroot/freeside/FS/FS/NetworkMonitoringSystem
In directory wavetail.420.am:/tmp/cvs-serv14647/FS/FS/NetworkMonitoringSystem

Modified Files:
	Torrus_Internal.pm 
Log Message:
torrus: add new access rights, add SNMP community option, RT10574

Index: Torrus_Internal.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/NetworkMonitoringSystem/Torrus_Internal.pm,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -w -d -r1.17 -r1.18
--- Torrus_Internal.pm	19 Mar 2011 01:10:02 -0000	1.17
+++ Torrus_Internal.pm	15 May 2011 01:43:40 -0000	1.18
@@ -155,11 +155,14 @@
 }
 
 sub add_router {
-  my($self, $ip) = @_;
+  my($self, $ip, $community) = @_;
+
+  $community = qq!<param name="snmp-community" value="$community"/>\n !
+    if length($community) > 1;
 
   my $newhost = 
     qq(  <host>\n).
-    qq(    <param name="snmp-host" value="$ip"/>\n).
+    qq(    <param name="snmp-host" value="$ip"/>\n).$community.
     qq(  </host>\n);
 
   my $ddx = $self->_torrus_loadddx;



More information about the freeside-commits mailing list