mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Add DocBlock
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user