%doc> Specific page for DhcpScope objects %doc> <%args> $id => undef $user => $ui->get_current_user($r) $view => undef $edit => undef $submit => undef $bulk_import_data => undef $import_overwrite => undef @scope_type_box => () #used for narrowing down types of scopes you're intrested in in contained_scopes $scope_text_filter => undef #used to filter scope types based on a keyword. %args> <%attr> title => 'View Object' %attr> <%init> my $table = 'DhcpScope'; my $DEBUG = 0; my($o, $prevobj ); my %ftables; if(! $id){ return; } my %explanation_hash = ( 'templates' => 'When using a template, the scope will inherit all attributes of the template', 'contained_scopes' => 'Scopes that inherit attributes from this scope.' ); unless ( $o = $table->retrieve($id) ){ $m->comp('error.mhtml', error => "Nonexistent record: $id"); } # Check if user can view this object my $manager = $ui->get_permission_manager($r); unless ( $manager && $manager->can($user, "view", $o) ){ $m->comp('/generic/error.mhtml', error=>"You don't have permission to view this object"); } my $labelstr = $o->get_label; my $type = $o->type->name; my %linksfrom = $table->meta_data->get_links_from; # Override tags from metadata in certain cases my %tags; if ( $type eq 'subnet' ){ $tags{ipblock} = 'Subnet'; }elsif($type eq 'host'){ $tags{ipblock} = 'IP Address'; } if ( $DEBUG ){ print '%ARGS is
', Dumper(%ARGS), '
', Dumper(%linksfrom), '
% } % %args = ( table=>$dtbl, object=>\@robjs ); % if ( $edit eq $i ){ % $args{withedit} = 1; % } % else{ % # If data came ordered from the db, tell sortresults not to bother sorting % $args{sort} = 0 if ( $ffield_order ); % } % if ($num){ % $args{return_args} = "?id=$id&view=$view"; % $m->comp('/generic/sortresults.mhtml', %args); % } %
At this time, only host scopes can be imported, which can only be contained in global or group scopes % }else{
Create fixed-address host scopes in bulk by adding lines containing ethernet and IP address, separated by spaces.
For example:
00:23:45:67:89:AB 192.168.0.1
00:23:45:67:89:CD 192.168.0.2