Updated Domain and Node views
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user