この製品のマニュアルセットは、偏向のない言語を使用するように配慮されています。このマニュアルセットでの偏向のない言語とは、年齢、障害、性別、人種的アイデンティティ、民族的アイデンティティ、性的指向、社会経済的地位、およびインターセクショナリティに基づく差別を意味しない言語として定義されています。製品ソフトウェアのユーザーインターフェイスにハードコードされている言語、RFP のドキュメントに基づいて使用されている言語、または参照されているサードパーティ製品で使用されている言語によりドキュメントに例外が存在する場合があります。シスコのインクルーシブランゲージに対する取り組みの詳細は、こちらをご覧ください。
このドキュメントは、米国シスコ発行ドキュメントの参考和訳です。リンク情報につきましては、日本語版掲載時点で、英語版にアップデートがあり、リンク先のページが移動/変更されている場合がありますことをご了承ください。あくまでも参考和訳となりますので、正式な内容については米国サイトのドキュメントを参照ください。
この章は、次の項で構成されています。
コレクタ フレームワークを使用して独自のインベントリ コレクタを実装することで、新規デバイスのサポートを導入できます。新規デバイスのサポートを追加する際は、データベース内のデータの収集と持続性を処理するインベントリ コレクタを実装する必要があります。
インベントリ コレクタのフレームワーク レポートを使用して、データを表示できます。これらのレポートの詳細については、レポート を参照してください。
これらのすべてのデバイスをサポートするモジュールが 1 つだけになるように、デバイス ファミリ用のモジュールを開発します。
ネットワーク スイッチとストレージ コントローラの両方をサポートするモジュールは開発しないでください。代わりにそれらを 2 つのモジュールに分割してください。理想的には、1 つのモジュールがコンピューティング デバイス、ネットワーク デバイス、またはストレージ デバイスのみを処理できるように、1 つのモジュールは同じカテゴリに属するデバイスのみをサポートする必要があります。
同じモジュールでサポートされるデバイスは類似している必要があります。
同じデバイスでも、特別な目的に適した様々なモデルが使用されることがあります。そういったケースでは、異なるモジュールでサポートする方が適切な場合があります。
システムに新しいインベントリ コレクタを登録するには、各アカウント タイプに対し AccountTypeEntry クラスを作成する必要があります。
// This is mandatory, holds the information for device credential details entry.setCredentialClass(FooAccount.class); // This is mandatory, type of the Account will be shown in GUI as drill // down box entry.setAccountType(FooConstants.INFRA_ACCOUNT_TYPE); // This is mandatory, label of the Account entry.setAccountLabel(FooConstants.INFRA_ACCOUNT_LABEL); // This is mandatory, specify the category of the account type ie., // Network / Storage / Compute entry.setCategory(InfraAccountTypes.CAT_STORAGE); //This is mandatory for setting report context for the new account type. //Ensure that prior to this step the specified report context has been registered in //module initialization i.e onStart method //Refer to Registering Report Context section entry.setContextType(ReportContextRegistry.getInstance().getContextByName(FooConstants.INFRA_ACCOUNT_TYPE).getType()); // This is mandatory, it associates the new account type with either physical or // virtual account entry.setAccountClass(AccountTypeEntry.PHYSICAL_ACCOUNT); // Optional, prefix for tasks associated with this connector entry.setInventoryTaskPrefix("Open Automation Inventory Task"); // Optional ,configurable inventory frequency in mins entry.setInventoryFrequencyInMins(15); // Supported POD types for this connector. The new account type will be associated // with this pod. Note that this account type will be appended to list of account // types defined in pod definition XML. Refer to section “Adding a Pod Type” for pod // definition XML entry.setPodTypes(new String[] { "FooPod" }); // This is mandatory, to test the connectivity of the new account. The // Handler should be of type PhysicalConnectivityTestHandler. Account creation is // is successful if this returns true. entry.setTestConnectionHandler(new FooTestConnectionHandler()); // This is mandatory, associate inventory listener .Inventory listener will be called // before and after inventory is done entry.setInventoryListener(new FooInventoryListener()); // Set device icon path entry.setIconPath(“/app/images/icons/menu/tree/cisco_16x16.png”); // set device vendor entry.setVendor(“Cisco”); // This is mandatory, in order to properly display your device in the Converged tab // of the UI entry.setConvergedStackComponentBuilder(new DummyConvergedStackBuilder()); // If the Credential Policy support is // required for this Account type then this is mandatory, can implement // credential check against the policy name. entry.setCredentialParser(new FooAccountCredentialParser()); // This is mandatory. Register Inventory Collectors for this account type. // Refer to section “Creating Inventory Collectors” for more detail. ConfigItemDef item1 = entry.createInventoryRoot(“foo.inventory.root”, FooInventoryItemHandler.class); // Register the new account entry with the system. PhysicalAccountTypeManager.getInstance().addNewAccountType(entry);
インベントリ コレクタは、インベントリ データの収集、保持、および削除のコア タスクを実行します。コレクタ フレームワークを使用して独自のインベントリ コレクタを実装することで、新規デバイスのサポートを導入できます。新規デバイスのサポートを追加する際は、データベース内のデータの収集と持続性を処理するインベントリ コレクタを実装する必要があります。インベントリ収集タスクは、各インベントリ オブジェクトの収集ハンドラに組み込まれています。
インベントリ収集ハンドラでは、インベントリ データの収集が可能です。インベントリ収集のためのインベントリ収集ハンドラを登録する必要があります。これらのハンドラは AbstractInventoryItemHandler クラスを継承する必要があります。
次のコード スニペットでは、インベントリ コレクタを登録して、特定のモデル オブジェクトのインベントリ収集を可能にします。
ConfigItemDef item1 = entry.createInventoryRoot(“foo.inventory.root”, FooInventoryItemHandler.class);
インベントリ収集が必要な各オブジェクトに対し AbstractInventoryItemHandler クラスの個別の実装を登録する必要があります。詳細については、FooModule.java および FooInventoryItemHandler.java のドキュメントを参照してください。
インベントリ収集の前後にコードを入力できるように、インベントリ収集の前後に呼び出されるインベントリ リスナーを定義できます。この実装は、ユース ケースベースです。詳細については、FooInventoryListener.java クラスを参照してください。
次のようにコレクタを登録する必要があります。
PhysicalAccountTypeManager.getInstance().addNewAccountType(entry);
アカウント タイプのメイン レポート コンテキストを定義し、登録する必要があります。アカウント タイプのトップ レベルのレポートは、このコンテキストに関連付けられます。
次のコード スニペットは、レポート コンテキストの登録方法を示しています。
ReportContextRegistry.getInstance().register(FooConstants.INFRA_ACCOUNT_TYPE, FooConstants.INFRA_ACCOUNT_LABEL);
トップ レベルのレポートでは、コンテキスト ID を解析し、クエリ フィルタ条件を生成するためのカスタム クエリ ビルダーを実装することが必要になる場合があります。このような場合、レポート内に次のコードが必要です。
this.setQueryBuilder (new FooQueryBuilder ());
カスタム クエリ ビルダーを構築する方法の詳細については、FooQueryBuilder.java クラスを参照してください。ドリルダウン レポートの各種レポート コンテキスト レベルを登録できます。詳細については、ドリル可能なレポートの開発 を参照してください。
ユーザ インターフェイス(UI)の [統合(Converged)] タブで、Cisco UCS Director にデータセンター向けのデバイスの統合スタックが表示されます。新規のコネクタを開発する際、デバイスを統合 UI で表示するには、独自の ConvergedStackComponentBuilderIf、デバイスとアイコンのマッピング ファイル、および表示するアイコンを指定する必要があります。
サンプル コードに次のファイルがあることを確認します。