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
18309e03
Commit
18309e03
authored
Jul 12, 2018
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return image description in image list, allow setting the image
description in CreateImage();
parent
919601db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
db/OSImage.pm.in
db/OSImage.pm.in
+12
-0
protogeni/lib/GeniCMV2.pm.in
protogeni/lib/GeniCMV2.pm.in
+17
-0
No files found.
db/OSImage.pm.in
View file @
18309e03
...
...
@@ -443,6 +443,18 @@ sub SetProvenance($$)
return
0
;
}
sub
SetDescription
($$)
{
my
($
self
,
$
description
)
=
@
_
;
my
$
args
=
{
"description"
=>
$
description
};
return
-
1
if
($
self
->
image
()->
Update
($
args
)
||
$
self
->
osinfo
()->
Update
($
args
));
return
0
;
}
#
#
Highest
number
version
,
rather
then
what
is
deemed
most
recent
by
the
#
images
table
.
...
...
protogeni/lib/GeniCMV2.pm.in
View file @
18309e03
...
...
@@ -3348,6 +3348,7 @@ sub CreateImage($)
my
$
update_prepare
=
0
;
my
($
bsname
,$
blockstore
);
my
$
copyback_uuid
;
my
$
description
;
my
$
response
;
require
EmulabConstants
;
...
...
@@ -3385,6 +3386,14 @@ sub CreateImage($)
return
GeniResponse
->
MalformedArgsResponse
(
"Improper copyback argument"
)
if
($
copyback_uuid
!~ /^[-\w\.\+]*$/);
}
#
Optional
description
.
if
(
exists
($
argref
->{
'description'
}))
{
$
description
=
$
argref
->{
'description'
};
return
GeniResponse
->
MalformedArgsResponse
(
"Improper description"
)
if
(
!TBcheck_dbslot($description, "images", "description",
TBDB_CHECKDBSLOT_WARN
|
TBDB_CHECKDBSLOT_ERROR
));
}
my
($
credential
,$
speaksfor
)
=
GeniStd
::
CheckCredentials
($
credentials
);
return
$
credential
if
(
GeniResponse
::
IsResponse
($
credential
));
...
...
@@ -3625,6 +3634,13 @@ sub CreateImage($)
(
defined
($
speaksfor
)
?
$
speaksfor
->
target_urn
()
:
$
ENV
{
'GENIURN'
})});
}
#
#
Optional
descriptive
text
.
#
if
(
defined
($
description
))
{
$
image
->
SetDescription
($
description
);
}
#
#
Form
an
image
URN
so
the
user
knows
how
to
request
the
new
image
.
#
...
...
@@ -4259,6 +4275,7 @@ sub ListImages($)
"created"
=>
emutil
::
TBDateStringGMT
($
image
->
created
()),
"updated"
=>
emutil
::
TBDateStringGMT
($
image
->
updated
()),
"format"
=>
$
image
->
format
(),
"description"
=>
$
image
->
description
(),
};
#
...
...
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