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


Ignore:
Timestamp:
11/05/12 16:53:38 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Extend findAllocateFrom() to allow passing a target block to allocate
to restrict the freeblock selection
Remove local SQL for confirmation page for "assign this block" in
admin.cgi in favour of existing data and subs. See #34.
For admin.cgi "assign this block", if the requested IP type does not
match the pool, the type will be adjusted and a warning pushed out.
Add space on "assign this block" template for a warning.

File:
1 edited

Legend:

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

    r541 r544  
    549549  ##fixme:  chain cities to align roughly with a full layer-2 node graph
    550550  $city = $pop if $type !~ /^.[pc]$/;
    551   if ($type ne 'rm') {
     551  if ($type ne 'rm' && $city) {
    552552    $sql .= " AND city = ?";
    553553    push @vallist, $city;
     554  }
     555  # Allow specifying an arbitrary full block, instead of a master
     556  if ($optargs{gimme}) {
     557    $sql .= " AND cidr >>= ?";
     558    push @vallist, $optargs{gimme};
    554559  }
    555560  # if a specific master was requested, allow the requestor to self->shoot(foot)
Note: See TracChangeset for help on using the changeset viewer.