All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit b8d4b00b authored by Leigh B Stoller's avatar Leigh B Stoller

Add routine to look up the management (ilo,drac,etc) interface or a

node.
parent 21044290
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2005-2011 University of Utah and the Flux Group.
# Copyright (c) 2005-2012 University of Utah and the Flux Group.
# All rights reserved.
#
package Interface;
......@@ -546,6 +546,31 @@ sub LookupControl($)
return Interface->Lookup($nodeid, $card, $port);
}
#
# Lookup the management interface for a node.
#
sub LookupManagement($)
{
my ($class, $nodeid) = @_;
$nodeid = $nodeid->node_id()
if (ref($nodeid));
my $query_result =
DBQueryWarn("select card,port from interfaces ".
"where node_id='$nodeid' and ".
" role='" . TBDB_IFACEROLE_MANAGEMENT() . "'");
return undef
if (!$query_result);
return undef
if (!$query_result->numrows);
my ($card, $port) = $query_result->fetchrow_array();
return Interface->Lookup($nodeid, $card, $port);
}
#
# Stringify for output.
#
......
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