Commit 6a2f2d62 authored by Leigh Stoller's avatar Leigh Stoller

Add option to create a generic device.

parent 12a2ddbf
......@@ -150,6 +150,15 @@ $initial_attributes = array(
"attrtype" => "integer"),
);
$initial_device_attributes = array(
array("attrkey" => "default_osid", "attrvalue" => $rhl_std->osid(),
"attrtype" => "integer"),
array("attrkey" => "imageable", "attrvalue" => "0",
"attrtype" => "boolean"),
array("attrkey" => "rebootable", "attrvalue" => "0",
"attrtype" => "boolean"),
);
#
# Spit the form out using the array of data.
#
......@@ -482,6 +491,9 @@ if (isset($new_type)) {
if ($node_class == "switch") {
$initial_attributes = $initial_switch_attributes;
}
elseif ($node_class == "device") {
$initial_attributes = $initial_device_attributes;
}
$default_attributes = array();
$attribute_types = array();
$attribute_deletes = array();
......
<?php
#
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -50,6 +50,8 @@ if ($isadmin) {
"editnodetype.php3?new_type=1&node_class=pc");
WRITESUBMENUBUTTON("Create a Switch type",
"editnodetype.php3?new_type=1&node_class=switch");
WRITESUBMENUBUTTON("Create a device type",
"editnodetype.php3?new_type=1&node_class=device");
SUBMENUEND();
}
echo "<br>";
......
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