コード例 #1
0
 /*
  * determine Operational Status of Pool
  * READY , if any of the status Value is 2 (OK).
  * otherwise NOTREADY
  */
 private String determineOperationalStatus(CIMInstance poolInstance) {
   String operationalStatus = StoragePool.PoolOperationalStatus.NOTREADY.toString();
   try {
     UnsignedInteger16[] opStatus =
         (UnsignedInteger16[]) poolInstance.getPropertyValue(OPERATIONAL_STATUS);
     for (UnsignedInteger16 status : opStatus) {
       if (status.compareTo(new UnsignedInteger16(TWO)) == 0) {
         operationalStatus = StoragePool.PoolOperationalStatus.READY.toString();
       }
     }
   } catch (Exception ex) {
     _logger.error(
         "Discovering Pool Operational Status failed : {}-->",
         getCIMPropertyValue(poolInstance, Constants.INSTANCEID),
         ex);
   }
   return operationalStatus;
 }