[pve-devel] [PATCH v2 storage 4/5] disk reassign: add not implemented yet message to storages
Fabian Grünbichler
f.gruenbichler at proxmox.com
Thu Sep 3 09:58:22 CEST 2020
wouldn't it make more sense to implement it in Dir/NFS/CIFSPlugin, and
add this 'implement me' into Plugin itself? otherwise this breaks
external plugins. also, would it make sense to add a feature for this so
that we can check in the calling code with a meaningful error message
before attempting and die-ing?
On September 1, 2020 2:44 pm, Aaron Lauterer wrote:
> Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
> ---
> rfc -> v1 -> v2: nothing changed
>
> PVE/Storage/CephFSPlugin.pm | 5 +++++
> PVE/Storage/DRBDPlugin.pm | 5 +++++
> PVE/Storage/GlusterfsPlugin.pm | 5 +++++
> PVE/Storage/ISCSIDirectPlugin.pm | 5 +++++
> PVE/Storage/ISCSIPlugin.pm | 4 ++++
> PVE/Storage/ZFSPlugin.pm | 5 +++++
> 6 files changed, 29 insertions(+)
>
> diff --git a/PVE/Storage/CephFSPlugin.pm b/PVE/Storage/CephFSPlugin.pm
> index 880ec05..ba31366 100644
> --- a/PVE/Storage/CephFSPlugin.pm
> +++ b/PVE/Storage/CephFSPlugin.pm
> @@ -222,4 +222,9 @@ sub deactivate_storage {
> }
> }
>
> +sub reassign_volume {
> + my ($class, $scfg, $storeid, $volname, $target_vmid) = @_;
> + die "Not implemented for this storage type\n";
> +}
> +
> 1;
> diff --git a/PVE/Storage/DRBDPlugin.pm b/PVE/Storage/DRBDPlugin.pm
> index dbae4d1..304ade7 100644
> --- a/PVE/Storage/DRBDPlugin.pm
> +++ b/PVE/Storage/DRBDPlugin.pm
> @@ -404,4 +404,9 @@ sub volume_has_feature {
> return undef;
> }
>
> +sub reassign_volume {
> + my ($class, $scfg, $storeid, $volname, $target_vmid) = @_;
> + die "Not implemented for this storage type\n";
> +}
> +
> 1;
> diff --git a/PVE/Storage/GlusterfsPlugin.pm b/PVE/Storage/GlusterfsPlugin.pm
> index 2dd414d..831d2ef 100644
> --- a/PVE/Storage/GlusterfsPlugin.pm
> +++ b/PVE/Storage/GlusterfsPlugin.pm
> @@ -348,4 +348,9 @@ sub check_connection {
> return defined($server) ? 1 : 0;
> }
>
> +sub reassign_volume {
> + my ($class, $scfg, $storeid, $volname, $target_vmid) = @_;
> + die "Not implemented for this storage type\n";
> +}
> +
> 1;
> diff --git a/PVE/Storage/ISCSIDirectPlugin.pm b/PVE/Storage/ISCSIDirectPlugin.pm
> index 9777969..8d72173 100644
> --- a/PVE/Storage/ISCSIDirectPlugin.pm
> +++ b/PVE/Storage/ISCSIDirectPlugin.pm
> @@ -252,4 +252,9 @@ sub volume_has_feature {
> return undef;
> }
>
> +sub reassign_volume {
> + my ($class, $scfg, $storeid, $volname, $target_vmid) = @_;
> + die "Not implemented for this storage type\n";
> +}
> +
> 1;
> diff --git a/PVE/Storage/ISCSIPlugin.pm b/PVE/Storage/ISCSIPlugin.pm
> index f2694ba..602fb1d 100644
> --- a/PVE/Storage/ISCSIPlugin.pm
> +++ b/PVE/Storage/ISCSIPlugin.pm
> @@ -438,5 +438,9 @@ sub volume_has_feature {
> return undef;
> }
>
> +sub reassign_volume {
> + my ($class, $scfg, $storeid, $volname, $target_vmid) = @_;
> + die "Not implemented for this storage type\n";
> +}
>
> 1;
> diff --git a/PVE/Storage/ZFSPlugin.pm b/PVE/Storage/ZFSPlugin.pm
> index 383f0a0..4097b1a 100644
> --- a/PVE/Storage/ZFSPlugin.pm
> +++ b/PVE/Storage/ZFSPlugin.pm
> @@ -421,4 +421,9 @@ sub deactivate_volume {
> return 1;
> }
>
> +sub reassign_volume {
> + my ($class, $scfg, $storeid, $volname, $target_vmid) = @_;
> + die "Not implemented for this storage type\n";
> +}
> +
> 1;
> --
> 2.20.1
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
>
More information about the pve-devel
mailing list