Commit d9ec65fb authored by Leigh Stoller's avatar Leigh Stoller

Another new type for federated nodes, until we get the geni/plab thing

figured out.
parent 9c26c72a
......@@ -862,6 +862,7 @@ sub isplabdslice($) { return NodeTypeInfo($_[0])->isplabdslice(); }
sub isplabphysnode($) { return NodeTypeInfo($_[0])->isplabphysnode(); }
sub issimnode($) { return NodeTypeInfo($_[0])->issimnode(); }
sub isgeninode($) { return NodeTypeInfo($_[0])->isgeninode(); }
sub isfednode($) { return NodeTypeInfo($_[0])->isfednode(); }
#
# And these are the less common attributes, but still common enough to
......
......@@ -83,6 +83,7 @@ sub isplabdslice($) { return field($_[0], 'isplabdslice'); }
sub isplabphysnode($) { return field($_[0], 'isplabphysnode'); }
sub issimnode($) { return field($_[0], 'issimnode'); }
sub isgeninode($) { return field($_[0], 'isgeninode'); }
sub isfednode($) { return field($_[0], 'isfednode'); }
#
# Force a reload of the data.
......
......@@ -2115,6 +2115,7 @@ CREATE TABLE `node_types` (
`isplabphysnode` tinyint(4) NOT NULL default '0',
`issimnode` tinyint(4) NOT NULL default '0',
`isgeninode` tinyint(4) NOT NULL default '0',
`isfednode` tinyint(4) NOT NULL default '0',
PRIMARY KEY (`type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
......
......@@ -4557,3 +4557,8 @@ last_net_act,last_cpu_act,last_ext_act);
alter table node_types add isgeninode tinyint(4) not null default 0;
4.158: Add isfednode column in node_types table. A fednode can be
either physical or virtual, as indicated by the isvirtnode flag.
alter table node_types add isfednode tinyint(4) not null default 0;
......@@ -271,6 +271,16 @@ function SPITFORM($node_type, $formfields, $attributes, $deletes, $errors)
</td>
</tr>\n";
echo "<tr>
<td colspan=2>isfednode:</td>
<td class=left>
<input type=text
name=\"formfields[isfednode]\"
value=\"" . $formfields["isfednode"] . "\"
size=2>
</td>
</tr>\n";
#
# Now do attributes.
#
......@@ -371,7 +381,7 @@ if (isset($new_type)) {
$defaults = array("class" => "pc", "isvirtnode" => 0,
"isremotenode" => 0, "issubnode" => 0,
"isplabdslice" => 0, "isjailed" => 0, "isdynamic" => 0,
"issimnode" => 0, "isgeninode" => 0);
"issimnode" => 0, "isgeninode" => 0, "isfednode" => 0);
$default_attributes = array();
$attribute_types = array();
......@@ -557,6 +567,11 @@ if (isset($formfields["isgeninode"]) && $formfields["isgeninode"] != "") {
$args["isgeninode"] = $formfields["isgeninode"];
}
# isfednode
if (isset($formfields["isfednode"]) && $formfields["isfednode"] != "") {
$args["isfednode"] = $formfields["isfednode"];
}
# 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