Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
139b89c7
Commit
139b89c7
authored
May 18, 2004
by
Leigh B. Stoller
Browse files
Add bootdisk_unit for Mike to pass through to Frisbee in the tmcd
'loadinfo' request.
parent
0a04f07b
Changes
3
Hide whitespace changes
Inline
Side-by-side
sql/database-create.sql
View file @
139b89c7
...
...
@@ -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
,
...
...
sql/database-migrate.txt
View file @
139b89c7
...
...
@@ -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;
www/editnodetype.php3
View file @
139b89c7
...
...
@@ -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 s
tarting a new node type - let's give some reasonable defaults
#
S
tarting 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
]))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment