public static function GetRelationQueriesEx($sRelCode) { switch ($sRelCode) { case 'impacts': $aRels = array('hypervisor' => array('_legacy_' => false, 'sDirection' => 'both', 'sDefinedInClass' => 'Server', 'sNeighbour' => 'hypervisor', 'sQueryDown' => 'SELECT Hypervisor AS o WHERE o.server_id = :this->id', 'sQueryUp' => 'SELECT Server AS o WHERE o.id = :this->server_id', 'sAttribute' => NULL)); return array_merge($aRels, parent::GetRelationQueriesEx($sRelCode)); default: return parent::GetRelationQueriesEx($sRelCode); } }
public static function GetRelationQueriesEx($sRelCode) { switch ($sRelCode) { case 'impacts': $aRels = array('nasfilesystem' => array('_legacy_' => false, 'sDirection' => 'both', 'sDefinedInClass' => 'NAS', 'sNeighbour' => 'nasfilesystem', 'sQueryDown' => NULL, 'sQueryUp' => NULL, 'sAttribute' => 'nasfilesystem_list')); return array_merge($aRels, parent::GetRelationQueriesEx($sRelCode)); default: return parent::GetRelationQueriesEx($sRelCode); } }
public static function GetRelationQueries($sRelCode) { switch ($sRelCode) { case "impacts": $aRels = array("nasfilesystem" => array("sQuery" => "SELECT NASFileSystem WHERE nas_id = :this->id", "bPropagate" => true, "iDistance" => 10)); return array_merge($aRels, parent::GetRelationQueries($sRelCode)); break; default: return parent::GetRelationQueries($sRelCode); } }
public static function GetRelationQueries($sRelCode) { switch ($sRelCode) { case "impacts": $aRels = array(); if (class_exists('Hypervisor')) { $aRels = array("device" => array("sQuery" => "SELECT Hypervisor WHERE server_id = :this->id", "bPropagate" => true, "iDistance" => 10)); } return array_merge($aRels, parent::GetRelationQueries($sRelCode)); break; case "depends on": $aRels = array(); if (class_exists('LogicalVolume')) { $aRels = array("volume" => array("sQuery" => "SELECT LogicalVolume AS v JOIN lnkServerToVolume AS l1 ON l1.volume_id=v.id WHERE l1.server_id = :this->id", "bPropagate" => true, "iDistance" => 10)); } return array_merge($aRels, parent::GetRelationQueries($sRelCode)); break; default: return parent::GetRelationQueries($sRelCode); } }