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