LAB INVENTORY VERSION 2
Requirements:
-
Multiple sessions can read from the database simultaneously, but allow
only one session at a time modify the database and lock reads while writing.
-
Include platform profiles that contain the information about gathering
statistics on memory, CPUs, FPGA, line card and cost.
-
Verify that the host file and the testbeds are in sync
-
Generate Reports: Lab wide summary, testbed wide summary, specific hardware
(ie: all T1 cards), unsupported devices, user access, testbed additions/removals,
hostfile <-> device mismatch, connectivity
Program Flow:
-
lock file (only one real time update at a time (uid & date to
lock and log files))
-
allow non destructive reads from: previous database & real time query
-
source config files
-
parse options
-
read host file
-
copy hostfile local
-
parse
-
verify/update against previous database (option specific)
-
compare to old database
-
update, copy, log new & removed testbeds
-
generate a list of IPs and device types as specified by the host file
-
probe requested devices
-
verify connectivity (log failure reason: no connectivity, no passwd set,
etc.)
-
verify device type
-
execute probe list appropriate for the device
-
memory
-
CPU count & versions
-
Feature card count and versions
-
Switch card count & versions
-
line cards (versions?)
-
Image version
-
ASPs
-
log off with error checking
-
Report requested info to reports and/or stdout
-
update database
-
lock file for reading database
-
no read access at this time
-
move old database
-
create new database
-
remove read lock file
-
remove write lock file (if a destructive run was initiated)
Before Coding:
-
man page
-
define directory structure
-
set command line options
-
create pseudo config file(s)
-
list of libraries and their functions
-
define a database format (would prefer some ASCII format)
-
log file formats
Log Files:
-
connectivity
-
user access
-
errors
-
testbed additions
-
testbed removals
-
hostfile <-> device mismatch
Implementation Outline:
-
Develop a skeleton library for one device
-
include live mem read
-
include live cpu version
-
Write the skeleton main control function
-
write "probe requested devices"
-
write "Read host file"
-
write stdout display function
-
Develop lock file library
-
request to read
-
request to freeze writes
-
request to write
-
release request to write
-
Command line options
-
Develop the flow logic for the different options
-
Write a function to parse the command line and select the correct path
-
Develop format and interface functions for database
-
Add "Verify/Update against previous database" to the main control function
-
Add "Update database"
4/19/1999 pshuman@cisco.com Cisco Systems, Inc.
http://wwwin-wat.cisco.com/~pshuman/Labiv2/steps.html
bambi:/home/bambi3/pshuman/WWW/Labiv2/steps.html