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
b01865bb
Commit
b01865bb
authored
Jul 03, 2012
by
Gary Wong
Browse files
When a virt node has a public control address, show it in the manifest.
parent
80556619
Changes
1
Hide whitespace changes
Inline
Side-by-side
protogeni/lib/GeniSliver.pm.in
View file @
b01865bb
...
@@ -750,22 +750,32 @@ sub AnnotateManifest($)
...
@@ -750,22 +750,32 @@ sub AnnotateManifest($)
my $sshdport = 22;
my $sshdport = 22;
my $hostname = GeniUtil::FindHostname($node->node_id());
my $hostname = GeniUtil::FindHostname($node->node_id());
my $
phostname
= $hostname;
my $
sshdhost
= $hostname;
my $vhostname = GeniUtil::FindVHostname($experiment, $node);
my $vhostname = GeniUtil::FindVHostname($experiment, $node);
my $component_urn = GeniHRN::Generate("@OURDOMAIN@", "node",
my $component_urn = GeniHRN::Generate("@OURDOMAIN@", "node",
$node->phys_nodeid())
$node->phys_nodeid());
;
if ($node->isvirtnode()) {
if ($node->isvirtnode()) {
$sshdport = $node->sshdport();
my $vname = $node->vname();
$phostname = GeniUtil::FindHostname($node->phys_nodeid());
my $public_control;
$experiment->GetVirtNodeAttribute( $vname, "routable_control_ip",
\$public_control );
if( defined( $public_control ) && $public_control eq "true" ) {
# we'
ve
assigned
a
public
address
to
this
one
$
sshdhost
=
$
hostname
;
}
else
{
#
this
node
has
no
public
control
address
of
its
own
--
give
the
#
sshd
port
on
the
physical
host
's address
$sshdport = $node->sshdport();
$sshdhost = GeniUtil::FindHostname($node->phys_nodeid());
}
}
}
#
#
# Add this stuff to the rspec (which becomes the manifest).
# Add this stuff to the rspec (which becomes the manifest).
#
#
if (GeniXML::IsVersion0($rspec)) {
if (GeniXML::IsVersion0($rspec)) {
GeniXML::SetText("hostname", $rspec, $host
name
);
GeniXML::SetText("hostname", $rspec, $
sshd
host);
GeniXML::SetText("sshdport", $rspec, $sshdport)
GeniXML::SetText("sshdport", $rspec, $sshdport)
if (defined($sshdport));
if (defined($sshdport));
GeniXML::SetText("sliver_uuid", $rspec, $self->uuid());
GeniXML::SetText("sliver_uuid", $rspec, $self->uuid());
...
@@ -791,7 +801,7 @@ sub AnnotateManifest($)
...
@@ -791,7 +801,7 @@ sub AnnotateManifest($)
$login = GeniXML::AddElement("login", $services);
$login = GeniXML::AddElement("login", $services);
}
}
GeniXML::SetText("authentication", $login, "ssh-keys");
GeniXML::SetText("authentication", $login, "ssh-keys");
GeniXML::SetText("hostname", $login, $
phostname
);
GeniXML::SetText("hostname", $login, $
sshdhost
);
GeniXML::SetText("port", $login, $sshdport);
GeniXML::SetText("port", $login, $sshdport);
GeniXML::SetText("username", $login, $user->uid());
GeniXML::SetText("username", $login, $user->uid());
}
}
...
...
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