Commit 5dca461d authored by Gary Wong's avatar Gary Wong

Handle ADB target attribute in request rspecs.

parent 77d9f543
......@@ -1616,6 +1616,20 @@ sub GetTicketAuxAux($$$$$$$$$$$)
"weight" => 0.95})
if ($MAINSITE && (!defined($exclusive) || !$exclusive));
my $adb_target = GeniXML::GetADBTarget( $ref );
if( defined( $adb_target ) ) {
if( $adb_target !~ /^[a-zA-Z0-9.-]+$/ ) {
$response = GeniResponse->Create( GENIRESPONSE_BADARGS,
undef,
"Invalid ADB target" );
goto bad;
}
$virtexperiment->NewTableRow( "virt_node_attributes",
{ "vname" => $node_nickname,
"attrkey" => "adb_target",
"attrvalue" => $adb_target } );
}
#
# Special hack for allocating from a specific chassis.
#
......
......@@ -1397,5 +1397,12 @@ sub SetJacksSiteManagerId($$)
return SetManagerId($site, $urn);
}
sub GetADBTarget($)
{
my ($node) = @_;
return GetText( "adb_target", $node );
}
# _Always_ make sure that this 1 is at the end of the file...
1;
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