Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
f698c8c4
Commit
f698c8c4
authored
Nov 03, 2016
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change MapToImage() to handle architectures; in general I do not think
we need MapToImage() anymore.
parent
3cc09c11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
db/OSImage.pm.in
db/OSImage.pm.in
+17
-2
No files found.
db/OSImage.pm.in
View file @
f698c8c4
...
...
@@ -39,6 +39,7 @@ use libdb;
use
EmulabConstants
;
use
libtestbed
;
use
Image
;
use
NodeType
;
use
OSinfo
;
use
overload
(
'""'
=>
'Stringify'
);
...
...
@@ -1089,11 +1090,25 @@ sub MapToImage($$)
{
my
($
self
,
$
type
)
=
@
_
;
#
#
If
we
are
using
architectures
this
is
not
necessary
.
In
fact
,
since
#
we
do
not
do
multi
-
os
images
,
I
think
we
can
flush
it
completely
.
#
if
(
!ref($type)) {
my
$
nodetype
=
NodeType
->
Lookup
($
type
);
if
(
!defined($nodetype)) {
print
STDERR
"Could not map $type to an object
\n
"
;
return
undef
;
}
$
type
=
$
nodetype
;
}
return
$
self
if
($
self
->
architecture
()
&&
$
type
->
architecture
());
#
This
returns
an
OSimage
.
my
$
image
=
$
self
->
osinfo
()->
MapToImage
($
type
);
return
undef
if
(
!defined($image));
return
OSImage
->
Lookup
($
image
->
imageid
(),
$
image
->
version
());
}
#
...
...
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