B #4047: allow resize for disks with snapshots
This patch introduces a TM_MAD_CONF attribute ALLOW_DISK_RESIZE_WITH_SNAPSHOT which specifies whether the driver supports resizing of disks if they have snapshots. The attribute value should be "YES" or "yes" to allow resize operation. Default is to deny operation if the attribute is not present or is set as "NO" or "no".
+refs: #1260
Signed-off-by: Chirag Anand [email protected]
Thanks for your contribution. We are feature freeze for 6.0 so I would hold back this PR. I will redo it based on your contribution. Considering (self-note ;)):
- ALLOW_RESIZE_WITH_SNAPSHOT will be part of the TM_MAD_CONF settings. This settings states the capabilities of each driver. So it will be a per driver setting rather than a per datastore setting (This information is copied into the datastore later)
- We need to update also the quota calculation (to consider the new space potentially taken by all snapshots)
- Update the DISK_SNAPSHOT_TOTAL_SIZE for the disk.
- Finally, we need to check that this changes are "transferred" back to the original image in case of persistent disks
Finally this has been implemented as per 70f960d9fad91ea04b1e8468393b78f65b72ca90
THANKS FOR THE CONTRIBUTION