Defining services and actions for a component – H3C Technologies H3C Intelligent Management Center User Manual
Page 490
476
14>
save.tcl
Note 1: Common label in fixed format.
Note 2: Specifies the mode name and method (CLI). The common service must have the initialize mode.
The label name is mode.
Note 3: Specifies the required mode for the mode. connect indicates the connection mode.
Note 4: enter label, which defines the execution script to enter the mode.
Note 5: Script file, which must be available in the drive folder.
Note 6: The initialize mode has only the enter label, and does not have the exit label.
Note 7: Defines the mode name and method.
Note 8: Error description.
Note 9: Specifies the required mode for the mode.
Note 10: enter label, which defines the execution script to enter the mode.
Note 11: exit label, which defines the execution script to exit the mode.
Note 12: Specifies the function and method. The method is CLI and label is function.
Note 13: enter label and script of the function, which must be available in the drive folder.
Note 14: The function has only the enter label, and does not have the exit label.
For example, you must implement device configuration backup in enable mode, and locate the TCL files
used to log in to the enable mode based on the require-mode, including initialize.tcl, enter_exec.tcl, and
enter_enable.tcl. Execute these files in sequence for login and execute the exit_enable.tcl and
exit_exec.tcl files for logout.
Defining services and actions for a component
Define services in the adapter.xml file. The following illustrates how to define services for Configuration
Center. For instructions on defining services for other components, see relevant configuration files of the
components.
The services you can define in the adapter.xml file include configuration backup (ConfigBackup),
configuration deployment (ConfigDeploy), and software deployment (ImageDeploy). Each service
consists of an action definition file xxxxxx_Builder.xml and an action script file
xxxxxx_Builder_Script.xml (xxxxxx indicates the action name). You can define multiple actions in the
action definition file; each action corresponds to an action on the Configuration Center interface. The
action script file provides a specific execution script for every action in the action definition file.