1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

B #~: remove function snapshots to has_snapshots (#1286)

This commit is contained in:
Carlos J. Herrera 2021-06-09 10:27:57 -04:00 committed by GitHub
parent 9269806053
commit 8092fb797f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1813,7 +1813,7 @@ module VCenterDriver
# Adding a new disk in newer vSphere versions
# automatically cleans all system snapshots
# https://github.com/OpenNebula/one/issues/5409
if snapshots? or one_snapshots?
if has_snapshots? or one_snapshots?
error_message = 'Existing system snapshots, cannot change disks. '
error_message << 'Please remove all snapshots and try again.'
raise error_message
@ -1944,7 +1944,7 @@ module VCenterDriver
def detach_disk(disk)
return unless disk.exists?
if snapshots? or one_snapshots?
if has_snapshots? or one_snapshots?
error_message = 'Existing system snapshots, cannot change '
error_message << 'disks. Please remove all snapshots '
error_message << 'and try again.'