Commit 9c26c72a authored by Leigh Stoller's avatar Leigh Stoller

Add isgeninode column in node_types table. A geninode can be either

physical or virtual, as indicated by the isvirtnode flag.
parent 6e498f4d
......@@ -861,6 +861,7 @@ sub issubnode($) { return NodeTypeInfo($_[0])->issubnode(); }
sub isplabdslice($) { return NodeTypeInfo($_[0])->isplabdslice(); }
sub isplabphysnode($) { return NodeTypeInfo($_[0])->isplabphysnode(); }
sub issimnode($) { return NodeTypeInfo($_[0])->issimnode(); }
sub isgeninode($) { return NodeTypeInfo($_[0])->isgeninode(); }
#
# And these are the less common attributes, but still common enough to
......
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2005, 2006, 2007 University of Utah and the Flux Group.
# Copyright (c) 2005, 2006, 2007, 2008 University of Utah and the Flux Group.
# All rights reserved.
#
package NodeType;
......@@ -82,6 +82,7 @@ sub issubnode($) { return field($_[0], 'issubnode'); }
sub isplabdslice($) { return field($_[0], 'isplabdslice'); }
sub isplabphysnode($) { return field($_[0], 'isplabphysnode'); }
sub issimnode($) { return field($_[0], 'issimnode'); }
sub isgeninode($) { return field($_[0], 'isgeninode'); }
#
# Force a reload of the data.
......
......@@ -2114,6 +2114,7 @@ CREATE TABLE `node_types` (
`isplabdslice` tinyint(4) NOT NULL default '0',
`isplabphysnode` tinyint(4) NOT NULL default '0',
`issimnode` tinyint(4) NOT NULL default '0',
`isgeninode` tinyint(4) NOT NULL default '0',
PRIMARY KEY (`type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
......
......@@ -4551,3 +4551,9 @@ last_net_act,last_cpu_act,last_ext_act);
Add support for UTF-8 fields in table_regex.
mysql tbdb < emulab_pubs.sql
4.157: Add isgeninode column in node_types table. A geninode can be
either physical or virtual, as indicated by the isvirtnode flag.
alter table node_types add isgeninode tinyint(4) not null default 0;
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2007 University of Utah and the Flux Group.
# Copyright (c) 2000-2008 University of Utah and the Flux Group.
# All rights reserved.
#
include("defs.php3");
......@@ -261,6 +261,16 @@ function SPITFORM($node_type, $formfields, $attributes, $deletes, $errors)
</td>
</tr>\n";
echo "<tr>
<td colspan=2>isgeninode:</td>
<td class=left>
<input type=text
name=\"formfields[isgeninode]\"
value=\"" . $formfields["isgeninode"] . "\"
size=2>
</td>
</tr>\n";
#
# Now do attributes.
#
......@@ -361,7 +371,7 @@ if (isset($new_type)) {
$defaults = array("class" => "pc", "isvirtnode" => 0,
"isremotenode" => 0, "issubnode" => 0,
"isplabdslice" => 0, "isjailed" => 0, "isdynamic" => 0,
"issimnode" => 0);
"issimnode" => 0, "isgeninode" => 0);
$default_attributes = array();
$attribute_types = array();
......@@ -542,6 +552,11 @@ if (isset($formfields["issimnode"]) && $formfields["issimnode"] != "") {
$args["issimnode"] = $formfields["issimnode"];
}
# isgeninode
if (isset($formfields["isgeninode"]) && $formfields["isgeninode"] != "") {
$args["isgeninode"] = $formfields["isgeninode"];
}
# Existing attributes.
foreach ($attributes as $attr_key => $attr_val) {
if (isset($deletes[$attr_key]) && $deletes[$attr_key] == "checked")
......
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