Send Netdot-devel mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://osl.uoregon.edu/mailman/listinfo/netdot-devel
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Netdot-devel digest..."


Today's Topics:

   1. [SCM] Netdot branch netdot-1.0 updated.
      netdot-1.0.4-61-g0d4a8b1 ([email protected])


----------------------------------------------------------------------

Message: 1
Date: Tue, 30 Apr 2013 08:13:14 -0700
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
        netdot-1.0.4-61-g0d4a8b1
To: [email protected]
Message-ID: <[email protected]>

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Netdot".

The branch, netdot-1.0 has been updated
       via  0d4a8b1246c89aeb7c023a98a398790db0ae4eff (commit)
      from  81e67dd4f6139d2cb862a1b855a28c8547e36b16 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0d4a8b1246c89aeb7c023a98a398790db0ae4eff
Author: Carlos Vicente <[email protected]>
Date:   Tue Apr 30 11:13:06 2013 -0400

    Print enf of file marker when exporting files

diff --git a/lib/Netdot/Exporter.pm b/lib/Netdot/Exporter.pm
index bc41053..d00ba66 100644
--- a/lib/Netdot/Exporter.pm
+++ b/lib/Netdot/Exporter.pm
@@ -306,6 +306,24 @@ sub in_downtime{
     return 0;
 }
 
+########################################################################
+
+=head2 print_eof - Print End of File marker
+
+ Arguments: 
+    filehandle
+ Returns:
+    Nothing
+
+=cut
+
+sub print_eof {
+    my ($self, $fh) = @_;
+    $self->throw_fatal("Netdot::Model::Exporter::print_eof: Filehandle 
required")
+       unless $fh;
+    print $fh "\n#### EOF ####\n";
+}
+
 =head1 AUTHORS
 
 Carlos Vicente, C<< <cvicente at ns.uoregon.edu> >>
diff --git a/lib/Netdot/Exporter/BIND.pm b/lib/Netdot/Exporter/BIND.pm
index 0c5e2cf..1d630ab 100644
--- a/lib/Netdot/Exporter/BIND.pm
+++ b/lib/Netdot/Exporter/BIND.pm
@@ -211,6 +211,8 @@ sub print_zone_to_file {
     # Add any includes
     print $fh $zone->include . "\n" if defined $zone->include;
 
+    print $fh "\n;#### EOF ####\n";
+
     close($fh);
     return $path;
 }
diff --git a/lib/Netdot/Exporter/Nagios.pm b/lib/Netdot/Exporter/Nagios.pm
index acb2584..5303744 100644
--- a/lib/Netdot/Exporter/Nagios.pm
+++ b/lib/Netdot/Exporter/Nagios.pm
@@ -409,6 +409,8 @@ sub generate_configs {
     $self->print_servicegroups(\%servicegroups);
     $self->print_contacts();
 
+    $self->print_eof($self->{out});
+
     $logger->info("Netdot::Exporter::Nagios: Configuration written to file: 
".$self->{filename});
     close($self->{out});
 }
diff --git a/lib/Netdot/Exporter/Smokeping.pm b/lib/Netdot/Exporter/Smokeping.pm
index ee0b3a7..cb992d5 100644
--- a/lib/Netdot/Exporter/Smokeping.pm
+++ b/lib/Netdot/Exporter/Smokeping.pm
@@ -63,7 +63,7 @@ sub generate_configs {
                 SELECT     d.id, rr.name, zone.name, p.name, e.name,
                            d.monitored, t.name, d.down_from, d.down_until
                  FROM      device d, rr, zone, product p, entity e, asset a,
-                           producttype t, ipblock i
+                           producttype t
                 WHERE      d.name=rr.id
                   AND      rr.zone=zone.id
                   AND      a.product_id=p.id
@@ -82,7 +82,7 @@ sub generate_configs {
 
        unless ( $monitor ){
            $logger->debug("Netdot::Exporter::Smokeping::generate_configs: ".
-                          "$name configured to not monitor config");
+                          "$name configured to not monitor");
            next;
        }
 
@@ -130,13 +130,18 @@ host = $device
   
 ";
        }
-        print $smokeping "# End of file\n";
+
+       $self->print_eof($smokeping);
        close($smokeping) || 
$logger->warn("Netdot::Exporter::Smokeping::generate_configs: ".
                                           "$file_path did not close nicely");
        
        $logger->info("Netdot::Exporter::Smokeping::generate_configs:".
                      " Smokeping configuration for group '$type' written to: 
'$file_path'");
+
+       
     }
+
+    
 }
 
 =head1 AUTHOR
diff --git a/lib/Netdot/Exporter/Sysmon.pm b/lib/Netdot/Exporter/Sysmon.pm
index f117397..b2625de 100644
--- a/lib/Netdot/Exporter/Sysmon.pm
+++ b/lib/Netdot/Exporter/Sysmon.pm
@@ -149,7 +149,8 @@ EOP
        print $sysmon "\n";
        
     }
-    
+
+    $self->print_eof($sysmon);
     close($sysmon) or $logger->warn("$filename did not close nicely");
     $logger->info("Sysmon configuration written to $filename");
 }
diff --git a/lib/Netdot/Model/DhcpScope.pm b/lib/Netdot/Model/DhcpScope.pm
index 3c146a9..1177cc1 100644
--- a/lib/Netdot/Model/DhcpScope.pm
+++ b/lib/Netdot/Model/DhcpScope.pm
@@ -313,11 +313,13 @@ sub print_to_file{
 
     $class->_print($fh, $self->id, $data);
 
+    print $fh "\n#### EOF ####\n";
     close($fh);
 
     my $end = time;
     $logger->info(sprintf("DHCPD Scope %s exported to %s, in %s", 
                          $self->name, $path, $class->sec2dhms($end-$start) ));
+
 }
 
 

-----------------------------------------------------------------------

Summary of changes:
 lib/Netdot/Exporter.pm           |   18 ++++++++++++++++++
 lib/Netdot/Exporter/BIND.pm      |    2 ++
 lib/Netdot/Exporter/Nagios.pm    |    2 ++
 lib/Netdot/Exporter/Smokeping.pm |   11 ++++++++---
 lib/Netdot/Exporter/Sysmon.pm    |    3 ++-
 lib/Netdot/Model/DhcpScope.pm    |    2 ++
 6 files changed, 34 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Netdot


------------------------------

_______________________________________________
Netdot-devel mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-devel


End of Netdot-devel Digest, Vol 73, Issue 14
********************************************

Reply via email to