Cisco Cisco Prime Network Registrar 8.1 Technical References
DhcpConfigurationTask
Cisco Prime Network Registrar IPAM 8.1.1 CLI and API Guide
102
Tasks
DhcpConfigurationTask
Overview
The
DhcpConfigurationTask
CLI allows the user to create a DHCP Configuration
task. DHCP Configuration tasks generate and deploy configuration files for DHCP servers.
Usage
Direct
$INCHOME/jre/bin/java –cp $CLASSPATH com.diamondip.ipcontrol.cli.DhcpConfigurationTaskCLI
–u <user> -p <password> [-n <DHCP server name>|-i <DHCP server IP address>][-a][-f][-?]
[-v]
–u <user> -p <password> [-n <DHCP server name>|-i <DHCP server IP address>][-a][-f][-?]
[-v]
Via command script (Unix)
$INCHOME/etc/DhcpConfigurationTask.sh –u <user> -p <password>
[-n <DHCP server name>|-i <DHCP server IP address>][-a][-f][-?][-v]
[-n <DHCP server name>|-i <DHCP server IP address>][-a][-f][-?][-v]
Via command script (Windows) from the %INCHOME%/etc/cli directory
DhcpConfigurationTask.cmd –u <user> -p <password>
[-n <DHCP server name>|-i <DHCP server IP address>][-a][-f][-?][-v]
[-n <DHCP server name>|-i <DHCP server IP address>][-a][-f][-?][-v]
Parameters
Parameter
Required
Description
-u <userId>
Yes
User Id
-p <pwd>
Yes
Password
-?
No
Print help
-i <IP Address>
Yes, unless –n specified
IP Address of the DHCP Server to configure.
-n <Name>
Yes, unless –i specified
Name of Network Service (DHCP server) to configure.
-a
No
If set, the task will stop if errors are detected during the
configuration generation.
-f
No
If set, any associated failover servers will also have their
configurations generated and deployed.
-v
No
Verbose
Example
This creates a task to perform a DHCP configuration deployment for the
dhcp5
DHCP
server. In addition, if there are any failover servers associated with
dhcp5
, their
configurations are also deployed. Lastly, if there are any errors, the task will abort.
$INCHOME/etc/DhcpConfigurationTask.sh –u joe –p joepwd –n dhcp5 –a -f
Return codes
If the task is scheduled successfully, an errorlevel of 0 is passed, along with a string
including the task number. That task number can then be passed to the
TaskStatus
CLI
to obtain the status of that task.
If the task is NOT scheduled successfully, the errorlevel returned is a negative number,
If the task is NOT scheduled successfully, the errorlevel returned is a negative number,
and an error message is printed to the console.