Defining the common service (clicommon) – H3C Technologies H3C Intelligent Management Center User Manual

Page 489

Advertising
background image

475

•

Each of the configuration backup (ConfigBackup), configuration deployment (ConfigDeploy), and

software deployment (ImageDeploy) services comprises an action definition file (builder_definition)
and an action script file (tcl_script). The action definition file defines the actions of the service and

the processing procedure of each action; the action script file specifies the execution environment

and execution script for each action.

Defining the common service (CLICommon)

The common service file name is xxxxxx_Common_CLI.xml (xxxxxx indicates the drive name). The

common service file defines the device login process and common functions for device operations (for

example, save/reboot/delete a file).
The format of the common service file:

<?xml version="1.0"?>

<common>

<!—note 1>

<mode name="initialize" method="CLI">

<!—note 2>

<require-mode>connect</require-mode>

<!—note 3>

<enter>

<!—note 4>

initialize.tcl

<!—note 5>

</enter>

<!—note 6>

</mode>

<mode name="exec" method="CLI">

<!—note

7>

<error>Failed to get to exec mode. </error>

<!—note

8>

<require-mode>initialize</require-mode>

<!—note

9>

<enter>

<!—note

10>

enter_exec.tcl

</enter>

<exit>

<!—note

11>

exit_exec.tcl

</exit>

</mode>

<mode name="enable" method="cli">

<error>Failed to get to enable mode. </error>

<require-mode>exec</require-mode>

<enter>

enter_enable.tcl

</enter>

<exit>

exit_enable.tcl

</exit>

</mode>

<function name="delete_file" method="CLI">

<!—note 12>

<error>An error occurred while trying to delete a file from the device.</error>

<enter>

<!—note

13>

delete_file.tcl

Advertising