前のトピック: CIM クラスの取得次のトピック: CIM オブジェクトの取得


CIM オブジェクトの前提と依存の取得

getAntecedents() および getDependents() メソッドを使用して、CIM オブジェクトの前提と依存を取得できます。

CIM オブジェクトの前提を取得するには、getAntecedents() メソッドを呼び出します。

// すべてのコンピュータ システムを取得
arr=CA_ComputerSystem.getInstances()
// 返された最初のコンピュータ システムで処理を続行
cs=arr[0]
// 前提を取得
arrAnt = cs.getAntecedents()
for(i=0; i<arrAnt.length; i++)
{
	show-cimObject arrAnt[i]
}

CIM クラスの前提インスタンスを取得するには、getAntecedents() メソッドを呼び出します。

os = cs.getAntecedents("CIM_OperatingSystem");
show-cimObject os

CIM オブジェクトの依存を取得するには、getDependents() メソッドを呼び出します。

// すべてのコンピュータ システムを取得 
arr=CA_ComputerSystem.getInstances()
// 返された最初のコンピュータ システムで処理を続行
cs=arr[0]
// 依存を取得
arrAnt = cs. getDependents()
for(i=0; i<arrAnt.length; i++)
{
	show-cimObject arrAnt[i]
}

CIM クラスの依存インスタンスを取得するには、getDependents() メソッドを呼び出します。

fs = cs. getDependents("CIM_FileSystem");
show-cimObject fs