Commit 6a2dd971 authored by Jonathon Duerig's avatar Jonathon Duerig

Bugfix: Correctly print out component_ids in manifest.

This was masked by the previous bug until it was fixed.
parent 3818e062
......@@ -980,7 +980,7 @@ sub SliverStatus($)
}
my $sliver_urn = $sliver->sliver_urn();
my $component_urn = $sliver->component_urn();
my $resource_id = $sliver->resource_id();
my $state = $sliver->state();
my $status = $sliver->status();
my $error = "";
......@@ -993,7 +993,7 @@ sub SliverStatus($)
$error = $sliver->ErrorLog();
}
$blob->{'details'}->{$sliver_urn} = {
"component_urn" => $component_urn,
"component_urn" => $resource_id,
"state" => $state,
"status" => $status,
"error" => $error,
......
......@@ -647,8 +647,9 @@ sub ErrorLog($)
return $bootlog;
}
# Return the component URN. This is how a resource is resolved.
sub component_urn($)
# Return the resource URN. This is how a resource is resolved.
# Resource urns may differ from component_urns (pcvm201-1 rather than pc201).
sub resource_urn($)
{
my ($self) = @_;
......@@ -737,6 +738,9 @@ sub AnnotateManifest($)
my $hostname = GeniUtil::FindHostname($node->node_id());
my $phostname = $hostname;
my $vhostname = GeniUtil::FindVHostname($experiment, $node);
my $component_urn = GeniHRN::Generate("@OURDOMAIN@", "node",
$node->phys_nodeid())
;
if ($node->isvirtnode()) {
$sshdport = $node->sshdport();
......@@ -752,10 +756,10 @@ sub AnnotateManifest($)
if (defined($sshdport));
GeniXML::SetText("sliver_uuid", $rspec, $self->uuid());
GeniXML::SetText("sliver_urn", $rspec, $self->sliver_urn());
GeniXML::SetText("component_urn", $rspec, $self->component_urn());
GeniXML::SetText("component_urn", $rspec, $self->resource_urn());
} else {
GeniXML::SetText("sliver_id", $rspec, $self->sliver_urn());
GeniXML::SetText("component_id", $rspec, $self->component_urn());
GeniXML::SetText("component_id", $rspec, $component_urn);
my $host = GeniXML::FindFirst("n:host", $rspec);
if (! defined($host)) {
$host = GeniXML::AddElement("host", $rspec);
......
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