Commit 195d87c8 authored by Jonathon Duerig's avatar Jonathon Duerig
Browse files

Correctly allow user-specified hardware_types in rspecv2

parent dfb6da1a
......@@ -904,10 +904,17 @@ sub GetTicketAuxAux($$$$$$$$$)
}
# If the node still isn't bound and doesn't have a pctype,
# use the user-specified one.
if (! defined($node) && ! defined($pctype)) {
my $usertype = GeniXML::FindFirst("n:node_type", $ref);
if (GeniXML::IsVersion0($ref)) {
if (! defined($node) && ! defined($pctype)) {
my $usertype = GeniXML::FindFirst("n:node_type", $ref);
if (defined($usertype)) {
$pctype = GeniXML::GetText("type_name", $usertype);
}
}
} else {
my $usertype = GeniXML::FindFirst("n:hardware_type", $ref);
if (defined($usertype)) {
$pctype = GeniXML::GetText("type_name", $usertype);
$pctype = GeniXML::GetText("name", $usertype);
}
}
}
......
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