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.6-47-g5aa964e
      ([email protected])
   2. [SCM] Netdot branch netdot-1.0 updated.
      netdot-1.0.6-47-g5aa964e ([email protected])
   3. [SCM] Netdot branch master updated.       netdot-1.0.6-48-ga5a8d2f
      ([email protected])
   4. [SCM] Netdot branch netdot-1.0 updated.
      netdot-1.0.6-48-ga5a8d2f ([email protected])


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

Message: 1
Date: Tue, 26 Aug 2014 07:54:09 -0700
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch master updated.
        netdot-1.0.6-47-g5aa964e
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  5aa964e80faf12c87d85f68e719a1b8f3538dd33 (commit)
      from  f8b0da567592a185028ecf2386ecc73486062671 (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 5aa964e80faf12c87d85f68e719a1b8f3538dd33
Author: Carlos Vicente <[email protected]>
Date:   Tue Aug 26 10:53:52 2014 -0400

    Use single quotes in SQL to avoid Pg error

diff --git a/lib/Netdot/Model/Ipblock.pm b/lib/Netdot/Model/Ipblock.pm
index 06f1f8a..474d5c0 100644
--- a/lib/Netdot/Model/Ipblock.pm
+++ b/lib/Netdot/Model/Ipblock.pm
@@ -2919,7 +2919,7 @@ sub get_addresses_by {
     WHERE     ipblock.parent=$id
       AND     ipblock.status=ipblockstatus.id ";
     if ( ($self->version == 6) && ($self->config->get('IPV6_HIDE_DISCOVERED')) 
) {
-       $query.=" AND     ipblockstatus.name != \"Discovered\" ";
+       $query.=" AND ipblockstatus.name != 'Discovered' ";
     }
     $query .= "GROUP BY ipblock.id 
     ORDER BY  $sort2field{$sort}";

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

Summary of changes:
 lib/Netdot/Model/Ipblock.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
Netdot


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

Message: 2
Date: Tue, 26 Aug 2014 07:54:40 -0700
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
        netdot-1.0.6-47-g5aa964e
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  5aa964e80faf12c87d85f68e719a1b8f3538dd33 (commit)
      from  f8b0da567592a185028ecf2386ecc73486062671 (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 -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 lib/Netdot/Model/Ipblock.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
Netdot


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

Message: 3
Date: Tue, 26 Aug 2014 10:35:15 -0700
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch master updated.
        netdot-1.0.6-48-ga5a8d2f
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  a5a8d2f51404353766a527c2664b13c2649ddb4c (commit)
      from  5aa964e80faf12c87d85f68e719a1b8f3538dd33 (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 a5a8d2f51404353766a527c2664b13c2649ddb4c
Author: Carlos Vicente <[email protected]>
Date:   Tue Aug 26 13:34:51 2014 -0400

    When importing zone data from Web UI, allow user to specify whether 
corresponding PTR records should be inserted/updated

diff --git a/htdocs/management/zone.html b/htdocs/management/zone.html
index 4ce6fe3..73d90fc 100644
--- a/htdocs/management/zone.html
+++ b/htdocs/management/zone.html
@@ -17,6 +17,7 @@ $edit => undef
 $submit => undef
 $bulk_import_data => undef
 $import_overwrite => undef
+$update_ptrs      => undef
 </%args>
 %
 %
@@ -43,8 +44,10 @@ if ( $submit ){
        # Do this atomically
        eval {
            Netdot::Model->do_transaction(sub{
-               $o->import_records(text=>$bulk_import_data, 
overwrite=>$import_overwrite)
-                                         });
+               $o->import_records(text        => $bulk_import_data, 
+                                  overwrite   => $import_overwrite,
+                                  update_ptrs => $update_ptrs,
+                   )});
        };
        if ( my $e = $@ ){
            $m->comp('/generic/error.mhtml', error=>$e);
@@ -245,6 +248,8 @@ if ( $view eq 'records' || $edit eq 'records' ){
        <p>
        Overwrite existing records of same name <input type="checkbox" 
name="import_overwrite">
        <p>
+       Update PTRs <input type="checkbox" name="update_ptrs">
+       <p>
        <input type="submit" name="submit" value="Import">
         <input type="button" name="cancel_button" value="cancel" 
onClick="history.go(-1);">
     </form>
diff --git a/import/import_bind_zones.pl b/import/import_bind_zones.pl
index 93674ca..834c753 100755
--- a/import/import_bind_zones.pl
+++ b/import/import_bind_zones.pl
@@ -23,8 +23,9 @@ my $usage = <<EOF;
 
     -n, --domain <name>      Domain or Zone name
     -f, --zonefile <path>    Zone file
-
-    -w, --wipe               Wipe out existing zone data
+    
+    -u, --update_ptrs        Update PTRs for each imported A/AAAA
+    -w, --wipe               Wipe out existing zone before importing
     -g, --debug              Print debugging output
     -h, --help               Print help
     
@@ -36,6 +37,7 @@ my $result = GetOptions(
     "d|dir=s"         => \$self{dir},
     "n|domain=s"      => \$self{domain},
     "f|zonefile=s"    => \$self{zonefile},
+    "u|update_ptrs"   => \$self{update_ptrs},
     "w|wipe"          => \$self{wipe},
     "h|help"          => \$self{help},
     "g|debug"         => \$self{debug},
@@ -179,5 +181,7 @@ sub import_zone {
        }
     }
     
-    $nzone->import_records(rrs=>$rrs, overwrite=>$self{wipe});
+    $nzone->import_records(rrs         => $rrs, 
+                          update_ptrs => $self{update_ptrs},
+       );
 }
diff --git a/lib/Netdot/Model/Zone.pm b/lib/Netdot/Model/Zone.pm
index c3f6842..a021e2d 100644
--- a/lib/Netdot/Model/Zone.pm
+++ b/lib/Netdot/Model/Zone.pm
@@ -627,9 +627,10 @@ sub get_record_count {
 =head2 import_records - Import records into zone
     
   Args: 
-    rrs       -  Arrayref containing Net:DNS::RR objects (required unless text 
is passed)
-    text      -  Text containing records (BIND format) (required unless rrs is 
passed)
-    overwrite -  Overwrite any existing records
+    rrs         -  Arrayref containing Net:DNS::RR objects (required unless 
text is passed)
+    text        -  Text containing records (BIND format) (required unless rrs 
is passed)
+    overwrite   -  Overwrite any existing records
+    update_ptrs -  When inserting a A/AAAA record, insert/update the 
corresponding PTR
   Returns: 
     Nothing
   Examples:
@@ -724,7 +725,7 @@ sub import_records {
            my %args = (rr=>$nrr, ipblock=>$ipb);
            if ( $argv{overwrite} || !($rraddr = RRADDR->search(%args)->first) 
){
                $args{ttl} = $ttl;
-               $args{update_ptr} = 0;
+               $args{update_ptr} = $argv{update_ptrs};
                $logger->debug("$domain: Inserting RRADDR $name, $address, ttl: 
$ttl");
                $rraddr = RRADDR->insert(\%args);
            }

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

Summary of changes:
 htdocs/management/zone.html |  9 +++++++--
 import/import_bind_zones.pl | 10 +++++++---
 lib/Netdot/Model/Zone.pm    |  9 +++++----
 3 files changed, 19 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
Netdot


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

Message: 4
Date: Tue, 26 Aug 2014 10:35:29 -0700
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
        netdot-1.0.6-48-ga5a8d2f
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  a5a8d2f51404353766a527c2664b13c2649ddb4c (commit)
      from  5aa964e80faf12c87d85f68e719a1b8f3538dd33 (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 -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 htdocs/management/zone.html |  9 +++++++--
 import/import_bind_zones.pl | 10 +++++++---
 lib/Netdot/Model/Zone.pm    |  9 +++++----
 3 files changed, 19 insertions(+), 9 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 89, Issue 7
*******************************************

Reply via email to