Hitachi

JP1 Version 12 JP1/Integrated Management 2 - Manager コマンド・定義ファイル・APIリファレンス


4.1.1 ユーザー作成プラグインの形式

ユーザー作成プラグインはjavascriptで作成し,CommonJS modulesの形式でプラグインの機能を提供します。ユーザー作成プラグインの記述形式と構成情報取得が起きた場合に呼び出されるメソッドの記述例を,次に示します。

記述形式
module.exports = {
          ユーザー作成プラグインの処理
};
記述例
module.exports = {
          // Operations performed when configuration information is retrieved
          __configurationGet : function(args) {
                 // Determine if the configuration collection should be processed with args.component
                 if (args.component !== "/HITACHI/JP1/PP/CONFINFO") {
                         return;
                 }
                 
// If yes:
                 // When args.data contains configuration information in JSON format, pass it as it is
args.setResult(args.data);
          },
};

ユーザー作成プラグインの記述規則を次に示します。

重要

ユーザーが新しくメソッドを作成する場合,アンダースコアで始まるメソッド名は付けないでください。