Add DocBlock

This commit is contained in:
Mark Schouten
2015-09-01 12:22:54 +02:00
parent e5281fa49d
commit a608faf06b

View File

@@ -4,6 +4,13 @@ if (isset($config['enable_proxmox']) && $config['enable_proxmox'] && !empty($age
$proxmox = $agent_data['app']['proxmox'];
}
/**
* Check if a port on a Proxmox VM exists
* @param string $p Port name
* @param string $c Clustername
* @param integer $i VM ID
* @return integer|boolean The port-ID if the port exists, false if it doesn't exist
*/
function proxmox_port_exists($i, $c, $p) {
if ($row = dbFetchRow("SELECT pmp.id FROM proxmox_ports pmp, proxmox pm WHERE pm.id = pmp.vm_id AND pmp.port = ? AND pm.cluster = ? AND pm.vmid = ?", array($p, $c, $i))) {
return $row['id'];
@@ -12,6 +19,13 @@ function proxmox_port_exists($i, $c, $p) {
return false;
}
/**
* Check if a Proxmox VM exists
* @param integer $i VM ID
* @param string $c Clustername
* @param array $pmxcache Reference to the Proxmox VM Cache
* @return boolean true if the VM exists, false if it doesn't
*/
function proxmox_vm_exists($i, $c, &$pmxcache) {
if (isset($pmxcache[$c][$i]) && $pmxcache[$c][$i] > 0) {