Changeset 729
- Timestamp:
- 05/21/15 14:49:56 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r728 r729 2081 2081 my @retlist; 2082 2082 2083 local $dbh->{AutoCommit} = 0; 2084 local $dbh->{RaiseError} = 1; 2085 2083 2086 # Want to do all of the DB stuff in a transaction, to minimize data changing underfoot 2084 2087 eval { … … 2105 2108 }); 2106 2109 2107 # Convert a bunch of pool IP allocations into "normal" netblock allocations2108 my $pool2alloc = $dbh->prepare(q{2109 INSERT INTO allocations (2110 cidr,type,city, description, notes, circuitid, createstamp, modifystamp,2111 privdata, custid, vrf, vlan, rdns, parent_id, master_id2112 )2113 SELECT2114 ip, ? AS type, city, description, notes, circuitid, createstamp, modifystamp,2115 privdata, custid, vrf, vlan, rdns, parent_id, master_id2116 FROM poolips2117 WHERE parent_id = ? AND available = 'n'2118 });2119 2120 2110 # Common actions 2121 2111 my $peersth = $dbh->prepare("SELECT cidr,id,type,master_id FROM allocations WHERE parent_id = ? AND cidr <<= ?"); … … 2132 2122 if ($args{newtype} =~ /.[cm]/) { 2133 2123 ## Container 2124 2125 # In case of merging a master block 2126 my $mfbsth = $dbh->prepare("UPDATE freeblocks SET master_id = ? WHERE master_id = ?"); 2127 2128 if ($args{scope} eq 'keepall') { 2129 } elsif ($args{scope} =~ /^clear/) { 2130 } elsif ($args{scope} eq 'mergepeer') { # should this just be an else? 2131 } # scope 2132 2133 # Clean up free blocks 2134 _compactFree($dbh, $prime); 2134 2135 2135 2136 } elsif ($args{newtype} =~ /.[dp]/) {
Note:
See TracChangeset
for help on using the changeset viewer.