Cisco Cisco Prime Network Registrar 8.1 Références techniques

Page de 316
Direct 
Cisco Prime Network Registrar IPAM 8.1.1 CLI and API Guide 
Sequence 
CLI Name 
Brief Description 
Data Dependencies 
DiscoverNetElement 
Discovers live network 
element data 
Network elements created using 
ImportNetElement
 
CLI or created 
manually 
DHCPUtilization 
Discovers live DHCP 
utilization data 
DHCP servers created manually 
ImportElementSnapshot 
Imports network 
element data 
Data generated from 
DiscoverNetElement
 
CLI 
10 
ImportServiceSnapshot 
Imports address pools 
discovered by “Collect 
DHCP Utilization” or 
“Global 
Synchronization of 
DHCP Servers” tasks. 
Data generated from DHCPUtilization
 
CLI 
11 
ImportDNS 
Imports DNS domain 
and zone data 
DNS servers and views created manually 
Executing Commands 
Each CLI is capable of being executed either directly by invoking the Java JVM, or 
indirectly via the available command script.  The direct approach requires a rather lengthy 
and cumbersome syntax, while the indirect method requires the proper passing of necessary 
parameters. 
Direct 
The following is an example of the direct method of execution (it assumes that the Cisco 
Prime Network Registrar IPAM environment variables, namely 
INC_HOME, JAVA_HOME
 
and 
CLASSPATH
 are resident): 
$INCHOME/jre/bin/java –DINC_HOME=$INCHOME –DNCX_HOME=$NCX_HOME –Duser.dir=$INCHOME  
–cp $CLASSPATH com.diamondip.netcontrol.cli.ImportNetService –u joe –p joepwd  
–f southeast.csv 
Indirect 
The following example executes the same call but uses the indirect approach of calling a 
predefined command script: 
/opt/incontrol/ImportNetService.sh –u joe –p joepwd –f southeast.csv 
File Format 
The format for import files is 
 (CSV).  These files are easily created 
or modified using any standard text editor.  For greater ease of use, most spreadsheet 
applications like 
 support saving as a CSV format. 
Template files for each CLI are available in the 
templates directory underneath the CLI 
directory (typically 
<product home>/etc/cli).   
Note when creating CSV import files, any lines that begin with the pound (#) character are 
ignored by the Cisco Prime Network Registrar IPAM CLIs.