Commit 621877f0 authored by Leigh Stoller's avatar Leigh Stoller

Add sshurl method.

parent 743bfc28
......@@ -296,7 +296,7 @@ class Node
return 0;
}
$row = mysql_fetch_array($query_result);
return $row["isremotenode"];
return $row["isvirtnode"];
}
function NodeStatus() {
......@@ -1390,6 +1390,21 @@ class Node
return 0;
}
function sshurl($uid) {
global $OURDOMAIN;
$node_id = $this->node_id();
if ($this->IsVirtNode()) {
$pnode_id = $this->phys_nodeid();
$sshdport = $this->sshdport();
return "ssh://${uid}@${pnode_id}.${OURDOMAIN}:$sshdport";
}
else {
return "ssh://${uid}@${node_id}.${OURDOMAIN}";
}
}
}
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment