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
bdc0b6df
Commit
bdc0b6df
authored
May 13, 2015
by
Leigh B Stoller
Browse files
Oops, left this out of previous commit.
parent
bc5b1968
Changes
1
Hide whitespace changes
Inline
Side-by-side
apt/manage_profile.in
View file @
bdc0b6df
...
...
@@ -51,6 +51,8 @@ my $rspec;
my
$script
;
my
$profile
;
my
$instance
;
my
$aggregate
;
my
$node_id
;
my
$webtask
;
my
$webtask_id
;
...
...
@@ -318,7 +320,12 @@ if ($snap) {
if
(
!
defined
(
$instance
))
{
fatal
("
Could not look up instance
$uuid
");
}
my
$manifest
=
GeniXML::
Parse
(
$instance
->
manifest
());
if
(
@
{
$instance
->
AggregateList
()
}
!=
1
)
{
$errors
{"
error
"}
=
"
Must be only one aggregate to snapshot
";
UserError
();
}
(
$aggregate
)
=
@
{
$instance
->
AggregateList
()
};
my
$manifest
=
GeniXML::
Parse
(
$aggregate
->
manifest
());
if
(
!
defined
(
$manifest
))
{
fatal
("
Could not parse manifest
");
}
...
...
@@ -327,6 +334,12 @@ if ($snap) {
$errors
{"
error
"}
=
"
Too many nodes (> 1) to snapshot
";
UserError
();
}
my
$sliver_urn
=
GeniXML::
GetSliverId
(
$nodes
[
0
]);
$node_id
=
GeniXML::
GetVirtualId
(
$nodes
[
0
]);
if
(
!
(
defined
(
$sliver_urn
)
&&
$sliver_urn
eq
$aggregate
->
aggregate_urn
())){
$errors
{"
error
"}
=
"
$node_id
is not at
"
.
$aggregate
->
aggregate_urn
();
UserError
();
}
}
if
(
$update
)
{
$profile
=
APT_Profile
->
Lookup
(
$uuid
);
...
...
@@ -405,13 +418,6 @@ else {
# Now do the snapshot operation.
#
if
(
defined
(
$instance
))
{
my
$manifest
=
GeniXML::
Parse
(
$instance
->
manifest
());
if
(
!
defined
(
$manifest
))
{
fatal
("
Could not parse manifest
");
}
my
(
$node
)
=
GeniXML::
FindNodes
("
n:node
",
$manifest
)
->
get_nodelist
();
my
$sliver_urn
=
GeniXML::
GetSliverId
(
$node
);
my
$node_id
=
GeniXML::
GetVirtualId
(
$node
);
my
$apt_uuid
=
$instance
->
uuid
();
my
$imagename
=
$profile
->
name
();
...
...
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