Commit 6be586b0 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Quickie hack that may or may not help Mike; Create a list of the

already reserved nodes (for swapmod obviously). Looks like:

	lappend reserved_list "nodeG"
	set reserved_type(nodeG) "pc850"
	set reserved_node(nodeG) "pc52"

So, you can iterate through the list of reserved nodes, and find their
type and pnode.
parent 085952a8
......@@ -400,6 +400,21 @@ sub GenDefsFile($)
print TCL "\n";
if (defined($pid)) {
# Load reserved nodes, for swapmodify.
$query_result =
DBQueryFatal("select r.vname,r.node_id,n.type from reserved as r ".
"left join nodes as n on n.node_id=r.node_id ".
"where'$pid' and r.eid='$eid'");
print TCL "# Reserved Nodes\n";
while (($vname,$reserved,$type) = $query_result->fetchrow_array()) {
print TCL "lappend reserved_list \"$vname\"\n";
print TCL "set reserved_type($vname) \"$type\"\n";
print TCL "set reserved_node($vname) \"$reserved\"\n";
print TCL "}\n";
......@@ -79,6 +79,12 @@ namespace eval TBCOMPAT {
# A mapping of event objects and types.
variable objtypes
variable eventtypes
# Existing (reserved nodes).
variable reserved_list
variable reserved_type
variable reserved_node
set reserved_list {}
# IP addresses routines. These all do some checks and convert into set-ip
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