Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
111
Issues
111
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
0a2544c8
Commit
0a2544c8
authored
Mar 06, 2012
by
Leigh Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for multi-image loading. default_imagename is now a comman
separated list of names.
parent
b4310719
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
www/editnodetype.php3
www/editnodetype.php3
+16
-3
No files found.
www/editnodetype.php3
View file @
0a2544c8
...
...
@@ -53,9 +53,22 @@ $frisbee_mfs = OSinfo::LookupByName($emulab_ops,"FRISBEE-MFS");
# The default image comes from a site variable to avoid hardwiring here.
$default_imagename
=
TBGetSiteVar
(
"general/default_imagename"
);
$default_image
=
Image
::
LookupByName
(
$emulab_ops
,
$default_imagename
);
if
(
$freebsd_mfs
==
null
||
$default_image
==
null
||
# And is now a comma separated list for multi image load.
$default_imageids
=
preg_split
(
'/,/'
,
$default_imagename
);
for
(
$i
=
0
;
$i
!=
count
(
$default_imageids
);
$i
++
)
{
$image
=
Image
::
LookupByName
(
$emulab_ops
,
$default_imageids
[
$i
]);
if
(
$image
==
null
)
{
PAGEERROR
(
"You must add images from Utah into your database"
.
" before adding a nodetype. "
.
"See installation documentation for details!"
,
1
);
}
$default_imageids
[
$i
]
=
$image
->
imageid
();
}
$default_imagename
=
join
(
','
,
$default_imageids
);
if
(
$freebsd_mfs
==
null
||
$rhl_std
==
null
||
$fbsd_std
==
null
||
$frisbee_mfs
==
null
)
{
PAGEERROR
(
"You must add images from Utah into your database"
.
" before adding a nodetype. "
.
...
...
@@ -82,7 +95,7 @@ $initial_attributes = array(
array
(
"attrkey"
=>
"control_network"
,
"attrvalue"
=>
"X"
,
"attrtype"
=>
"integer"
),
array
(
"attrkey"
=>
"default_imageid"
,
"attrvalue"
=>
$default_image
->
imageid
()
,
"attrvalue"
=>
$default_image
name
,
"attrtype"
=>
"string"
),
array
(
"attrkey"
=>
"default_osid"
,
"attrvalue"
=>
$rhl_std
->
osid
(),
"attrtype"
=>
"integer"
),
...
...
Write
Preview
Markdown
is supported
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