Commit 31090a2d authored by Kirk Webb's avatar Kirk Webb
Browse files

Add the ability to set the BIOS version, serial number, and service tag from
the nodecontrol page and command line util.  Must be admin.
parent e71aa413
......@@ -740,6 +740,8 @@ REPLACE INTO table_regex VALUES ('virt_firewalls','type','text','regex','^(ipfw|
REPLACE INTO table_regex VALUES ('virt_firewalls','style','text','regex','^(open|closed|basic|emulab)$',0,0,NULL);
REPLACE INTO table_regex VALUES ('mailman_listnames','listname','text','regex','^[-\\w\\.\\+]+$',3,64,NULL);
REPLACE INTO table_regex VALUES ('default','fulltext','text','regex','^[\\040-\\176\\012\\015\\011]*$',0,20000,NULL);
REPLACE INTO table_regex VALUES ('nodes','serial','text','regex','^[-\\w\\.+]+$',0,32,NULL);
REPLACE INTO table_regex VALUES ('nodes','service_tag','text','regex','^[-\\w\\.+]+$',0,32,NULL);
--
-- Dumping data for table `testsuite_preentables`
......
......@@ -58,6 +58,10 @@ my %controlset =
[1, 0, "temp_boot_osid", undef, 1, "-t", "os_info:osid"],
bios_version =>
[1, 0, "bios_version", undef, 0, "", "nodes:bios_version"],
serial =>
[1, 0, "serial", undef, 0, "", "nodes:serial"],
service_tag =>
[1, 0, "service_tag", undef, 0, "", "nodes:service_tag"],
);
#
......
......@@ -71,6 +71,15 @@ if ($isadmin) {
if ($temp_boot_osid != $row[temp_boot_osid]) {
$command_string .= "temp_boot_osid='$temp_boot_osid' ";
}
if ($bios_version != $row[bios_version]) {
$command_string .= "bios_version='$bios_version' ";
}
if ($serial != $row[serial]) {
$command_string .= "serial='$serial' ";
}
if ($service_tag != $row[service_tag]) {
$command_string .= "service_tag='$service_tag' ";
}
}
#
......
......@@ -59,6 +59,9 @@ $temp_boot_osid = $row[temp_boot_osid];
$rpms = $row[rpms];
$tarballs = $row[tarballs];
$startupcmd = $row[startupcmd];
$bios_version = $row[bios_version];
$serial = $row[serial];
$service_tag = $row[service_tag];
#
# Get the OSID list. These are either OSIDs that are currently loaded on
......@@ -231,6 +234,27 @@ if ($isadmin) {
echo " </select>";
echo " </td>
</tr>\n";
echo "<tr>
<td>BIOS Version:</td>
<td class=\"left\">
<input type=\"text\" name=\"bios_version\" size=\"64\"
value=\"$bios_version\"></td>
</tr>\n";
echo "<tr>
<td>Serial Number:</td>
<td class=\"left\">
<input type=\"text\" name=\"serial\" size=\"32\"
value=\"$serial\"></td>
</tr>\n";
echo "<tr>
<td>Service Tag:</td>
<td class=\"left\">
<input type=\"text\" name=\"service_tag\" size=\"32\"
value=\"$service_tag\"></td>
</tr>\n";
}
echo "<tr>
......
......@@ -1978,6 +1978,8 @@ function SHOWNODE($node_id, $flags = 0) {
$battery_percentage = $row[battery_percentage];
$battery_timestamp = $row[battery_timestamp];
$boot_errno = $row[boot_errno];
$serial = $row[serial];
$service_tag = $row[service_tag];
if (!$def_boot_cmd_line)
$def_boot_cmd_line = "&nbsp";
......@@ -2305,6 +2307,20 @@ function SHOWNODE($node_id, $flags = 0) {
<td class=left>$bios</td>
</tr>\n";
}
if ($serial) {
echo "<tr>
<td>Serial Number:</td>
<td class=left>$serial</td>
</tr>\n";
}
if ($service_tag) {
echo "<tr>
<td>Service Tag:</td>
<td class=left>$service_tag</td>
</tr>\n";
}
#
# Show battery stuff
......
Supports Markdown
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