array('foreign_key'=>array('NODE_NAME','FILESPACE_NAME'),'far_key'=>'FILESPACE_NAME'), 'OCCUPANCY'=>array('foreign_key'=>array('NODE_NAME','FILESPACE_NAME'),'far_key'=>'FILESPACE_NAME'), ); protected $_formats = array( 'BACKUP_END'=>array('ORMTSM::date'=>array('d-M-Y')), ); protected $_sorting = array( 'NODE_NAME'=>'ASC', ); public function utilsation() { return $this->CAPACITY * ($this->PCT_UTIL/100); } public function storagepools($dtype) { $pool = array(); foreach ($this->VOLUMEUSAGE ->select('STGPOOL_NAME') ->where('COPY_TYPE','=',$dtype) ->group_by('STGPOOL_NAME') ->order_by('STGPOOL_NAME') ->find_all() as $vo) { array_push($pool,$vo->STGPOOL_NAME); } return $pool; } public function pool_logical_util($pool) { return $this->OCCUPANCY->where('STGPOOL_NAME','=',$pool)->find()->LOGICAL_MB; } public function pool_numvols($pool) { return $this->VOLUMEUSAGE->where('STGPOOL_NAME','=',$pool)->find_all()->count(); } } ?>