Changeset 361 for trunk/ddt/ddt
- Timestamp:
- Sep 14, 2018, 10:03:14 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ddt/ddt
r360 r361 1668 1668 1669 1669 my $timestamp = time; 1670 $computer_db->{'dset'}{$sector}{'ip -range'} ||= [];1670 $computer_db->{'dset'}{$sector}{'ip_range'} ||= []; 1671 1671 LOOP_ON_CIDR: 1672 for my $cidr_current (@{$computer_db->{'dset'}{$sector}{'ip -range'}}) {1672 for my $cidr_current (@{$computer_db->{'dset'}{$sector}{'ip_range'}}) { 1673 1673 next LOOP_ON_CIDR if $cidr_current ne $ip_range; 1674 1674 … … 1677 1677 1678 1678 my $timestamp = time; 1679 push @{$computer_db->{'dset'}{$sector}{'ip -range'}}, $ip_range;1679 push @{$computer_db->{'dset'}{$sector}{'ip_range'}}, $ip_range; 1680 1680 $computer_db->{'dset'}{$sector}{'modify_time'} = $timestamp; 1681 1681 ipamdb_save("$COMPUTER_YAML", $computer_db); … … 2251 2251 2252 2252 my $ip_range; 2253 $ip_range = join ',', @{$computer_db->{'dset'}{$sector_current}{'ip -range'}} if exists $computer_db->{'dset'}{$sector_current}{'ip-range'};2253 $ip_range = join ',', @{$computer_db->{'dset'}{$sector_current}{'ip_range'}} if exists $computer_db->{'dset'}{$sector_current}{'ip_range'}; 2254 2254 2255 2255 my $category; … … 2769 2769 LOOP_ON_IP: 2770 2770 for my $ip (NetAddr::IP->new($ip_range)->hostenum()) { 2771 $ip =~ s{/32$}{}; 2771 2772 print "$ip\n"; 2772 2773 … … 2786 2787 # Verify direct return same host 2787 2788 LOOP_ON_COMPUTER: 2788 for my $computer (@{$computer_db->{$sector_current} ) {2789 for my $computer (@{$computer_db->{$sector_current}}) { 2789 2790 my ($mac_address, $attribute) = %{$computer}; 2790 2791 … … 2798 2799 2799 2800 # Declare in DNS but not in DDT 2800 print "Error: DNS host $dns_hostname with IP $ip not declare in DDT database\n" if $dns_hostname ne '';2801 print "Error: DNS host $dns_hostname in sector $sector_current with IP $ip not declare in DDT database\n" if $dns_hostname ne ''; 2801 2802 # Normally never arrive here 2802 2803
Note: See TracChangeset
for help on using the changeset viewer.