Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
621877f0
Commit
621877f0
authored
Sep 23, 2013
by
Leigh B Stoller
Browse files
Add sshurl method.
parent
743bfc28
Changes
1
Hide whitespace changes
Inline
Side-by-side
www/node_defs.php
View file @
621877f0
...
...
@@ -296,7 +296,7 @@ class Node
return
0
;
}
$row
=
mysql_fetch_array
(
$query_result
);
return
$row
[
"is
remote
node"
];
return
$row
[
"is
virt
node"
];
}
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}"
;
}
}
}
#
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment