I'm able to get an approximation of the
locations.conf file by executing a three step process.
# Extract the Object IDs for all the networks known
to the ODB using NVDBFORMAT . The selectrule isNetwork=TRUE and
selectfield is Object ID. The Output is "OVTOPODUMP -r ${1}
>>if-nets.temp". Output is an executable file which invokes OVTOPODUMP
for each object ID Output=. /usr/OV/bin/nvdbformat -f
$netformat >./$tempfile
Execute the temporary file to extract the IP
address and name from the ODB. The output is if-nets.temp .
./$tempfile
Each ovtopodump invocation creates records with a
header, a NETWORKS record, a SEGMENTS record, a NODES record with the
first matching node and a series of records for the other nodes in this
network. Selecting the IP Address from the NETWORKS record, the
hostname from the first node (we hope it's the primary router) and appending
a qualifier to the router name we can get records to create both an
/etc/Networks file and a locations.conf file.
network_Output="$RouterName-$count $NetworkAddress"
location_Output="$RouterName-Nets $NetworkAddress Site"
On a well structured and managed network (router
loopbacks discovered as the primary interface and such) this gives a good
approximation. On a typical network you may have to manually create or
select the name to best represent the network or the location. You can
also append a parent icon name to the location_Output record to achieve
nesting. Routers still need to be moved to the location containers
manually.
Is there a way to generate data to build a
location.conf file from in an existing map? I have netview 5.1
configured and I am in the process of migrating to 6.0 and
I was wanting to take the data from 5.1 and export it so the creation
of the location.conf file will be easier.
__________________________________
_______________________________________ NV-L List information and
Archives: http://www.tkg.com/nv-l
|