pve-storage/PVE/API2
Thomas Lamprecht 3932ca0d1b add on_add and on_delete hooks
on_add_hook allows to encapsulate storage specific add steps, like
copying a keyring (RDB) or creating a volume group (LVM) in a clean
manner.
The same for deletion with on_delete_hook, here all should be cleaned
up, as much as possible.

Until now, this was done directly in the api config CREATE and DELETE
code, respectively, with a series of

if ($storage_type eq 'foo) {
    ...
} elsif ($storage_type eq 'bar') {
    ...
}

which isn't really that nice...

Another nice result of this approach is that also external plugins
can use those hooks and to their setup/cleanup steps sanely.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-03 12:27:34 +02:00
..
Storage add on_add and on_delete hooks 2018-07-03 12:27:34 +02:00
Disks.pm disks: fix warnings 2016-10-07 09:28:06 +02:00
Makefile renamed: PVE/API2/StorageReplication.pm -> PVE/API2/Storage/Replication.pm 2017-05-05 09:25:43 +02:00