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 master updated. netdot-1.0.7-22-g02f3706
([email protected])
2. [SCM] Netdot branch netdot-1.0 updated.
netdot-1.0.7-22-g012d2f9 ([email protected])
----------------------------------------------------------------------
Message: 1
Date: Wed, 17 Jun 2015 10:11:52 -0700
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch master updated.
netdot-1.0.7-22-g02f3706
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, master has been updated
via 02f37069c2f9a7f20c06bfd2705e743d5ca86e45 (commit)
from cdd27c74d5061c202947c15997c193dc64e2ac45 (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 02f37069c2f9a7f20c06bfd2705e743d5ca86e45
Author: Carlos Vicente <[email protected]>
Date: Wed Jun 17 13:11:13 2015 -0400
Small fix to avoid two DB queries
diff --git a/lib/Netdot/Exporter/BIND.pm b/lib/Netdot/Exporter/BIND.pm
index f58e7e3..76b8c2f 100644
--- a/lib/Netdot/Exporter/BIND.pm
+++ b/lib/Netdot/Exporter/BIND.pm
@@ -84,20 +84,19 @@ sub generate_configs {
}else{
@zones = Zone->retrieve_all();
}
-
+
foreach my $zone ( @zones ){
+ next unless $zone->active;
eval {
+ my @pending = HostAudit->search(zone=>$zone->name, pending=>1);
Netdot::Model->do_transaction(sub{
- if ( HostAudit->search(zone=>$zone->name, pending=>1) ||
$argv{force} ){
- if ( $zone->active ){
- my $path = $self->print_zone_to_file(zone=>$zone,
nopriv=>$argv{nopriv});
- my @pending = HostAudit->search(zone=>$zone->name,
pending=>1);
- foreach my $record ( @pending ){
- # Un-mark audit records as pending
- $record->update({pending=>0});
- }
- $logger->info("Zone ".$zone->name." written to file:
$path");
+ if ( @pending || $argv{force} ){
+ my $path = $self->print_zone_to_file(zone=>$zone,
nopriv=>$argv{nopriv});
+ foreach my $record ( @pending ){
+ # Un-mark audit records as pending
+ $record->update({pending=>0});
}
+ $logger->info("Zone ".$zone->name." written to file:
$path");
}else{
$logger->debug("Exporter::BIND::generate_configs:
".$zone->name.
": No pending changes. Use -f to force.");
-----------------------------------------------------------------------
Summary of changes:
lib/Netdot/Exporter/BIND.pm | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
hooks/post-receive
--
Netdot
------------------------------
Message: 2
Date: Wed, 17 Jun 2015 10:13:06 -0700
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
netdot-1.0.7-22-g012d2f9
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 012d2f9ab4debbbcb18d76e201f201a1e7191341 (commit)
from cdd27c74d5061c202947c15997c193dc64e2ac45 (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 012d2f9ab4debbbcb18d76e201f201a1e7191341
Author: Carlos Vicente <[email protected]>
Date: Wed Jun 17 13:11:13 2015 -0400
Small fix to avoid two DB queries
diff --git a/lib/Netdot/Exporter/BIND.pm b/lib/Netdot/Exporter/BIND.pm
index f58e7e3..76b8c2f 100644
--- a/lib/Netdot/Exporter/BIND.pm
+++ b/lib/Netdot/Exporter/BIND.pm
@@ -84,20 +84,19 @@ sub generate_configs {
}else{
@zones = Zone->retrieve_all();
}
-
+
foreach my $zone ( @zones ){
+ next unless $zone->active;
eval {
+ my @pending = HostAudit->search(zone=>$zone->name, pending=>1);
Netdot::Model->do_transaction(sub{
- if ( HostAudit->search(zone=>$zone->name, pending=>1) ||
$argv{force} ){
- if ( $zone->active ){
- my $path = $self->print_zone_to_file(zone=>$zone,
nopriv=>$argv{nopriv});
- my @pending = HostAudit->search(zone=>$zone->name,
pending=>1);
- foreach my $record ( @pending ){
- # Un-mark audit records as pending
- $record->update({pending=>0});
- }
- $logger->info("Zone ".$zone->name." written to file:
$path");
+ if ( @pending || $argv{force} ){
+ my $path = $self->print_zone_to_file(zone=>$zone,
nopriv=>$argv{nopriv});
+ foreach my $record ( @pending ){
+ # Un-mark audit records as pending
+ $record->update({pending=>0});
}
+ $logger->info("Zone ".$zone->name." written to file:
$path");
}else{
$logger->debug("Exporter::BIND::generate_configs:
".$zone->name.
": No pending changes. Use -f to force.");
-----------------------------------------------------------------------
Summary of changes:
lib/Netdot/Exporter/BIND.pm | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 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 99, Issue 4
*******************************************