Defining background custom script – H3C Technologies H3C Intelligent Management Center User Manual

Page 497

Advertising
background image

483

To extend the customized function, you must compile the background customized function script in

the <IMC installation directory>\server\conf\adapters\custom. At the same time, create the
following files as follows:

<IMC installation directory>\client\web\apps\imc\gencfg\register\custom directory.

Operation definition file: <component name>_operations.xml
This file is issued to define operations supported by the component. See the following description
for the file format.

Device capability set definition file: <component name>_devCapabilities.xml
This file is used to define the device capability set supported by the operations of the component.
See the following description for the file format.

English resource file: <component name>.properties
This file is used to define English resource information used in the component name_properties file.

IMPORTANT:

After you compile the files and restart IMC, the files are automatically loaded.

The content in the IMC\server\conf\adapters\GenericConfig directory can be used as a reference
for the background custom script.
The content in the IMC\client\web\apps\imc\gencfg\register\gencfg directory can be used as a
reference for the UI definition script.

Defining background custom script

Enter the IMC\server\conf\adapters\custom directory (if it is not available, create the directory), and

following these steps to compile the background custom script. For more information about the steps, see

"

Extending an existing function to support third-party devices

."

1.

Create a vendor folder.

2.

Create a drive index file and a drive folder.

3.

Create drive definition file.

4.

Create various services and actions definition file.

5.

Create the TCL script and Perl script.

Registering service operation and compiling operation definition file

The operation definition file is in the XML format. The file name must be <component

name>_operations.xml. The file defines operations supported by the component. The following is an

example:

#Global resource

str.gencfg.yes=Yes

str.gencfg.no=No

#Create Telnet User

str.create.telnet.user=Create Telnet User

str.telnet.user.name=User Name

str.telnet.user.name.info=Only number,'_' and English character are allowed, start with

English character, no longer than 32 characters.

str.telnet.user.password.mode=Password Mode

Advertising