Commit 139b89c7 authored by Leigh Stoller's avatar Leigh Stoller

Add bootdisk_unit for Mike to pass through to Frisbee in the tmcd

'loadinfo' request.
parent 0a04f07b
......@@ -834,6 +834,7 @@ CREATE TABLE node_types (
virtnode_capacity tinyint(4) NOT NULL default '0',
control_iface text,
disktype enum('ad','da','ar') default NULL,
bootdisk_unit tinyint(3) unsigned NOT NULL default '0',
delay_osid varchar(35) default NULL,
jail_osid varchar(35) default NULL,
pxe_boot_path text,
......
......@@ -1519,3 +1519,10 @@ last_net_act,last_cpu_act,last_ext_act);
default NULL after bandwidth;
alter table virt_lans add rest_bandwidth int(10) unsigned \
default NULL after rbandwidth;
1.243: Add bootdisk_unit to node_types so Mike can pass a unit number
through to Frisbee in the tmcd loadinfo call.
alter table node_types add column bootdisk_unit tinyint(3) unsigned \
not null default 0 after disktype;
......@@ -245,6 +245,16 @@ function SPITFORM($node_type, $formfields, $errors)
</td>
</tr>\n";
echo "<tr>
<td>Boot Disk Unit (0-255):</td>
<td class=left>
<input type=text
name=\"formfields[bootdisk_unit]\"
value=\"" . $formfields[bootdisk_unit] . "\"
size=6>
</td>
</tr>\n";
echo "<tr>
<td>isvirtnode:</td>
<td class=left>
......@@ -317,12 +327,12 @@ function SPITFORM($node_type, $formfields, $errors)
if ($new_type) {
#
# We've starting a new node type - let's give some reasonable defaults
# Starting a new node type - let's give some reasonable defaults
#
$defaults = array("class" => "pc", "power_time" => 60, "imageable" => 1,
"delay_capacity" => 2, "disktype" => "ad", "isvirtnode" => 0,
"isremotenode" => 0, "issubnode" => 0, "isplabdslice" => 0,
"issimnode" => 0, "simnode_capacity" => 20);
"issimnode" => 0, "simnode_capacity" => 20, "bootdisk_unit" => 0);
} else {
#
# We're editing an existing type - suck the current info out of the
......@@ -566,6 +576,16 @@ if (isset($formfields[disktype]) && $formfields[disktype] != "") {
}
}
# bootdisk_unit
if (isset($formfields[bootdisk_unit]) && $formfields[bootdisk_unit] != "") {
if (! TBvalid_tinyint($formfields[bootdisk_unit])) {
$errors["bootdisk_unit"] = TBFieldErrorString();
}
else {
$inserts["bootdisk_unit"] = $formfields[bootdisk_unit];
}
}
# isvirtnode
if (isset($formfields[isvirtnode]) && $formfields[isvirtnode] != "") {
if (! TBvalid_boolean($formfields[isvirtnode])) {
......
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