mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-24 21:34:01 +03:00
feature #3782: Cannot clone images with snapshots
This commit is contained in:
parent
43be9c663e
commit
023c853b6e
@ -219,6 +219,14 @@ public:
|
||||
return size_mb;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the number of snapshots
|
||||
*/
|
||||
unsigned int get_snapshots_size()
|
||||
{
|
||||
return snapshots.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the source path of the image
|
||||
*/
|
||||
|
@ -280,6 +280,14 @@ void ImageClone::request_execute(
|
||||
return;
|
||||
}
|
||||
|
||||
if (img->get_snapshots_size () > 0)
|
||||
{
|
||||
failure_response(ACTION,
|
||||
request_error("Cannot clone images with snapshots",""), att);
|
||||
img->unlock();
|
||||
return;
|
||||
}
|
||||
|
||||
tmpl = img->clone_template(name);
|
||||
|
||||
img->get_permissions(perms);
|
||||
|
Loading…
Reference in New Issue
Block a user