Changeset 590 for trunk/cgi-bin/IPDB.pm


Ignore:
Timestamp:
01/22/13 17:31:53 (11 years ago)
Author:
Kris Deugau
Message:

/trunk

RPC integration for allocation-delete should be complete. See #1.
Requires dnsadmin:/trunk@r459 or newer.

  • Pass a couple more bits into deleteBlock()
  • Use the new values when making the RPC call
  • Rearrange the delete-confirm page a little to allow the new "delete forward DNS too?" checkbox to actually contribute
  • Tweak new-allocation RPC call a little; don't bother if no rDNS was passed in.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/IPDB.pm

    r588 r590  
    10321032    } # end fullcidr != alloc_from
    10331033
    1034     # now we do the DNS dance for netblocks, if we have an RPC server to do it with.
    1035     _rpc('addOrUpdateRevRec', cidr => "$args{cidr}", name => $args{rdns}, rpcuser => $args{user});
     1034    # now we do the DNS dance for netblocks, if we have an RPC server to do it with and a pattern to use.
     1035    _rpc('addOrUpdateRevRec', cidr => "$args{cidr}", name => $args{rdns}, rpcuser => $args{user})
     1036      if $args{rdns};
    10361037
    10371038    return ('OK', 'OK');
     
    11841185# Also handles "deleting" a static IP allocation, and removal of a master
    11851186# Requires a database handle, the block to delete, the routing depth (if applicable),
    1186 # and the VRF ID
     1187# the VRF ID, and a flag to indicate whether to delete associated forward DNS entries
     1188# as well as the reverse entry
    11871189sub deleteBlock {
    1188   my ($dbh,undef,$rdepth,$vrf) = @_;
     1190  my ($dbh,undef,$rdepth,$vrf,$delfwd,$user) = @_;
    11891191  my $cidr = new NetAddr::IP $_[1];
    11901192
     
    12401242      return ('FAIL',$msg);
    12411243    } else {
     1244##fixme:  RPC return code?
     1245      _rpc('delByCIDR', cidr => "$cidr", user => $user, delforward => $delfwd);
    12421246      return ('OK',"OK");
    12431247    }
     
    12581262      return ('FAIL', $msg);
    12591263    } else {
     1264##fixme:  RPC return code?
     1265      _rpc('delZone', zone => "$cidr", user => $user, revrec => 'y');
    12601266      return ('OK',"OK");
    12611267    }
     
    14281434      return ('FAIL', $msg);
    14291435    } else {
     1436##fixme:  RPC return code?
     1437      _rpc('delByCIDR', cidr => "$cidr", user => $user, delforward => $delfwd, delsubs => 'y');
    14301438      return ($retcode, $goback);
    14311439    }
Note: See TracChangeset for help on using the changeset viewer.