Commit 337f6350 authored by Gary Wong's avatar Gary Wong

Return both URNs and UUIDs (for components and CMs) in GetTicket().

parent 402fcb13
......@@ -610,10 +610,6 @@ sub GetTicket($;$)
my %lannodes = ();
my @dealloc;
# Try to make the output format mimic the input, until everybody
# has migrated to URNs.
my $use_urns = 0; # +ve yes; -ve no; 0 guess
#
# If this is a ticket update, we want to seed the namemap with
# existing nodes. This is cause the rspec might refer to wildcards
......@@ -646,14 +642,6 @@ sub GetTicket($;$)
my $node_nickname = $ref->{'virtual_id'} || $ref->{'nickname'};
my $colocate = $ref->{'colocate'} || $ref->{'phys_nickname'};
if( defined( $manager_uuid ) ) {
if( GeniHRN::IsValid( $manager_uuid ) ) {
$use_urns++;
} else {
$use_urns--;
}
}
# Let remote nodes pass through.
next
if (defined($manager_uuid) &&
......@@ -1101,9 +1089,11 @@ sub GetTicket($;$)
$exclusive = 0
if (!defined($exclusive));
$rspec->{'component_urn'} = GeniHRN::Generate( $OURDOMAIN, "node",
$node->node_id() );
$rspec->{'component_uuid'} = $component_uuid;
$rspec->{'component_manager_uuid'} =
$use_urns >= 0 ? $ENV{'MYURN'} : $ENV{'MYUUID'};
$rspec->{'component_manager_urn'} = $ENV{'MYURN'};
$rspec->{'component_manager_uuid'} = $ENV{'MYUUID'};
# Also update the virtexperiment table row.
$virtnode->fixed($node->node_id());
......
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