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.7-1-g1c4900c ([email protected])
   2. [SCM] Netdot branch master updated.       netdot-1.0.7-1-g1c4900c
      ([email protected])


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

Message: 1
Date: Tue, 9 Dec 2014 13:57:50 -0800
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
        netdot-1.0.7-1-g1c4900c
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  1c4900cdc42075238d22facbd740681a1dd2c36f (commit)
      from  f842d9a4e0084069e7018e20062cf71e451376f3 (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 1c4900cdc42075238d22facbd740681a1dd2c36f
Author: Carlos Vicente <[email protected]>
Date:   Tue Dec 9 16:57:41 2014 -0500

    Added argument to Device::delete() to exclude deleting DNS name when 
deleting device

diff --git a/lib/Netdot/Model/Device.pm b/lib/Netdot/Model/Device.pm
index 5ac555f..2c466b0 100644
--- a/lib/Netdot/Model/Device.pm
+++ b/lib/Netdot/Model/Device.pm
@@ -2410,10 +2410,9 @@ sub get_fwt {
     
     We override the insert method for extra functionality:
      - Remove orphaned Resource Records if necessary
-     - Remove orphaned Asset records if necessary
 
   Arguments:
-    None
+    no_delete_name - Do not attempt to delete name DNS record
   Returns:
     True if successful
 
@@ -2423,7 +2422,7 @@ sub get_fwt {
 =cut
 
 sub delete {
-    my ($self) = @_;
+    my ($self, %argv) = @_;
     $self->isa_object_method('delete');
 
     # We don't want to delete dynamic addresses
@@ -2434,17 +2433,19 @@ sub delete {
            }
        }
     }
-    
-    # If the RR had a RRADDR, it was probably deleted.  
-    # Otherwise, we do it here.
+
+    # Get ID of name RR
     my $rrid = ( $self->name )? $self->name->id : "";
     
     $self->SUPER::delete();
     
-    if ( my $rr = RR->retrieve($rrid) ){
-       $rr->delete() unless $rr->a_records;
+    unless ( $argv{no_delete_name} ){
+       # If the RR had a RRADDR, it was probably deleted.  
+       # Otherwise, we do it here.
+       if ( my $rr = RR->retrieve($rrid) ){
+           $rr->delete() unless $rr->sub_records;
+       }       
     }
-    
     return 1;
 }
 

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

Summary of changes:
 lib/Netdot/Model/Device.pm | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
Netdot


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

Message: 2
Date: Tue, 9 Dec 2014 13:58:24 -0800
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch master updated.
        netdot-1.0.7-1-g1c4900c
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  1c4900cdc42075238d22facbd740681a1dd2c36f (commit)
      from  f842d9a4e0084069e7018e20062cf71e451376f3 (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/Device.pm | 19 ++++++++++---------
 1 file changed, 10 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 93, Issue 6
*******************************************

Reply via email to