Updated Domain and Node views

This commit is contained in:
Deon George
2011-06-01 00:51:15 +10:00
parent ae2c1440ed
commit d7822a03e8
12 changed files with 426 additions and 184 deletions

View File

@@ -17,7 +17,9 @@ class Model_DOMAIN extends ORMTSM {
);
protected $_has_many = array(
'MGMTCLASS'=>array('foreign_key'=>'DOMAIN_NAME','far_key'=>'DOMAIN_NAME'),
'NODE'=>array('foreign_key'=>'DOMAIN_NAME','far_key'=>'DOMAIN_NAME'),
'SCHEDULE_CLIENT'=>array('foreign_key'=>'DOMAIN_NAME','far_key'=>'DOMAIN_NAME')
);
// Pools used by a domain.
@@ -83,5 +85,17 @@ class Model_DOMAIN extends ORMTSM {
return $count;
}
// $dtype is BACKUP or ARCHIVE
// $ptype is pool type (PRIMARY,ACTIVE,COPY)
public function getStorageModeNodes($dtype,$ptype,$spo='') {
$result = array();
foreach ($this->NODE->find_all() as $no)
if ($no->getStorageModeData($dtype,$ptype,$spo))
array_push($result,$no);
return $result;
}
}
?>