Skip to content
GitLab
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
d74b6afa
Commit
d74b6afa
authored
Aug 07, 2017
by
Leigh B Stoller
Browse files
Add OnLocalCluster() predicate, add nosnapshot and mustnotexist flags
to CreateImage().
parent
40358a9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
apt/APT_Instance.pm.in
View file @
d74b6afa
...
...
@@ -1326,6 +1326,9 @@ use vars qw($AUTOLOAD);
use
overload
(
'""'
=>
'Stringify'
);
sub
devurl
($)
{
return
APT_Instance
::
devurl
($
_
[
0
]);
}
my
$
OURDOMAIN
=
"@OURDOMAIN@"
;
my
$
MYURN
=
"urn:publicid:IDN+$OURDOMAIN+authority+cm"
;
#
#
Lookup
and
create
a
class
instance
to
return
.
#
...
...
@@ -1632,6 +1635,16 @@ sub Update($$)
return
Refresh
($
self
);
}
#
#
Is
the
sliver
on
the
local
cluster
.
#
sub
OnLocalCluster
($)
{
my
($
self
)
=
@
_
;
return
$
self
->
aggregate_urn
()
eq
$
MYURN
?
1
:
0
;
}
sub
SetStatus
($$)
{
my
($
self
,$
status
)
=
@
_
;
...
...
@@ -2516,10 +2529,10 @@ sub ConsoleURL($$)
#
#
Create
an
Image
,
#
sub
CreateImage
($$$$;$$$)
sub
CreateImage
($$$$;$$$
$$
)
{
my
($
self
,
$
sliver_urn
,
$
imagename
,
$
update_prepare
,
$
copyback_uuid
,
$
bsname
)
=
@
_
;
$
copyback_uuid
,
$
bsname
,
$
nosnapshot
,
$
mustnotexist
)
=
@
_
;
my
$
authority
=
$
self
->
GetGeniAuthority
();
my
$
geniuser
=
$
self
->
instance
()->
GetGeniUser
();
my
$
slice
=
$
self
->
instance
()->
GetGeniSlice
();
...
...
@@ -2552,6 +2565,10 @@ sub CreateImage($$$$;$$$)
if
($
update_prepare
);
$
args
->{
'copyback_uuid'
}
=
$
copyback_uuid
if
(
defined
($
copyback_uuid
));
$
args
->{
'nosnapshot'
}
=
1
if
($
nosnapshot
);
$
args
->{
'mustnotexist'
}
=
1
if
($
mustnotexist
);
my
$
cmurl
=
$
authority
->
url
();
$
cmurl
=
devurl
($
cmurl
)
if
($
usemydevtree
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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