public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Max Carrara" <m.carrara@proxmox.com>
To: "Proxmox VE development discussion" <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH storage v4 10/12] plugin: enable import for nfs/btrfs/cifs/cephfs/glusterfs
Date: Wed, 12 Jun 2024 17:57:08 +0200	[thread overview]
Message-ID: <D1Y5UBG6O7S5.1XSWQ3WD7OI21@proxmox.com> (raw)
In-Reply-To: <20240524132209.703402-11-d.csapak@proxmox.com>

On Fri May 24, 2024 at 3:21 PM CEST, Dominik Csapak wrote:
> and reuse the DirPlugin implementation
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  src/PVE/Storage/BTRFSPlugin.pm     | 5 +++++
>  src/PVE/Storage/CIFSPlugin.pm      | 6 +++++-
>  src/PVE/Storage/CephFSPlugin.pm    | 6 +++++-
>  src/PVE/Storage/GlusterfsPlugin.pm | 6 +++++-
>  src/PVE/Storage/NFSPlugin.pm       | 6 +++++-
>  5 files changed, 25 insertions(+), 4 deletions(-)
>
> diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
> index 42815cb..b7e3f82 100644
> --- a/src/PVE/Storage/BTRFSPlugin.pm
> +++ b/src/PVE/Storage/BTRFSPlugin.pm
> @@ -40,6 +40,7 @@ sub plugindata {
>  		backup => 1,
>  		snippets => 1,
>  		none => 1,
> +		import => 1,
>  	    },
>  	    { images => 1, rootdir => 1 },
>  	],
> @@ -930,4 +931,8 @@ sub volume_import {
>      return "$storeid:$volname";
>  }
>  
> +sub get_import_metadata {
> +    return PVE::Storage::DirPlugin::get_import_metadata(@_);

Not _reaaaaally_ a fan of one plugin having to rely on another one, as
that introduces (another) interdependency (-> higher coupling). But I
would leave this as it is, because I'm working on a series that aims to
resolve stuff like that (and it's IMO better to just tackle this all in
one series at once anyway). So this is IMO fine and gets an OK from me.
Just wanted to note.

> +}
> +
>  1
> diff --git a/src/PVE/Storage/CIFSPlugin.pm b/src/PVE/Storage/CIFSPlugin.pm
> index 2184471..475065a 100644
> --- a/src/PVE/Storage/CIFSPlugin.pm
> +++ b/src/PVE/Storage/CIFSPlugin.pm
> @@ -99,7 +99,7 @@ sub type {
>  sub plugindata {
>      return {
>  	content => [ { images => 1, rootdir => 1, vztmpl => 1, iso => 1,
> -		   backup => 1, snippets => 1}, { images => 1 }],
> +		   backup => 1, snippets => 1, import => 1}, { images => 1 }],
>  	format => [ { raw => 1, qcow2 => 1, vmdk => 1 } , 'raw' ],
>      };
>  }
> @@ -314,4 +314,8 @@ sub update_volume_attribute {
>      return PVE::Storage::DirPlugin::update_volume_attribute(@_);
>  }
>  
> +sub get_import_metadata {
> +    return PVE::Storage::DirPlugin::get_import_metadata(@_);
> +}
> +
>  1;
> diff --git a/src/PVE/Storage/CephFSPlugin.pm b/src/PVE/Storage/CephFSPlugin.pm
> index 8aad518..36c64ea 100644
> --- a/src/PVE/Storage/CephFSPlugin.pm
> +++ b/src/PVE/Storage/CephFSPlugin.pm
> @@ -116,7 +116,7 @@ sub type {
>  
>  sub plugindata {
>      return {
> -	content => [ { vztmpl => 1, iso => 1, backup => 1, snippets => 1},
> +	content => [ { vztmpl => 1, iso => 1, backup => 1, snippets => 1, import => 1 },
>  		     { backup => 1 }],
>      };
>  }
> @@ -261,4 +261,8 @@ sub update_volume_attribute {
>      return PVE::Storage::DirPlugin::update_volume_attribute(@_);
>  }
>  
> +sub get_import_metadata {
> +    return PVE::Storage::DirPlugin::get_import_metadata(@_);
> +}
> +
>  1;
> diff --git a/src/PVE/Storage/GlusterfsPlugin.pm b/src/PVE/Storage/GlusterfsPlugin.pm
> index 2b7f9e1..9d17180 100644
> --- a/src/PVE/Storage/GlusterfsPlugin.pm
> +++ b/src/PVE/Storage/GlusterfsPlugin.pm
> @@ -97,7 +97,7 @@ sub type {
>  
>  sub plugindata {
>      return {
> -	content => [ { images => 1, vztmpl => 1, iso => 1, backup => 1, snippets => 1},
> +	content => [ { images => 1, vztmpl => 1, iso => 1, backup => 1, snippets => 1, import => 1},
>  		     { images => 1 }],
>  	format => [ { raw => 1, qcow2 => 1, vmdk => 1 } , 'raw' ],
>      };
> @@ -352,4 +352,8 @@ sub check_connection {
>      return defined($server) ? 1 : 0;
>  }
>  
> +sub get_import_metadata {
> +    return PVE::Storage::DirPlugin::get_import_metadata(@_);
> +}
> +
>  1;
> diff --git a/src/PVE/Storage/NFSPlugin.pm b/src/PVE/Storage/NFSPlugin.pm
> index f2e4c0d..72e9c6d 100644
> --- a/src/PVE/Storage/NFSPlugin.pm
> +++ b/src/PVE/Storage/NFSPlugin.pm
> @@ -53,7 +53,7 @@ sub type {
>  
>  sub plugindata {
>      return {
> -	content => [ { images => 1, rootdir => 1, vztmpl => 1, iso => 1, backup => 1, snippets => 1 },
> +	content => [ { images => 1, rootdir => 1, vztmpl => 1, iso => 1, backup => 1, snippets => 1, import => 1 },

This hash exceeds our line length limit, but I assume that's because it's
easier to read in diffs ... Can IMO be also left like that and changed
later or be adapted in a follow-up patch if so desired.

>  		     { images => 1 }],
>  	format => [ { raw => 1, qcow2 => 1, vmdk => 1 } , 'raw' ],
>      };
> @@ -223,4 +223,8 @@ sub update_volume_attribute {
>      return PVE::Storage::DirPlugin::update_volume_attribute(@_);
>  }
>  
> +sub get_import_metadata {
> +    return PVE::Storage::DirPlugin::get_import_metadata(@_);
> +}
> +
>  1;



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2024-06-12 15:57 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-24 13:21 [pve-devel] [PATCH storage/qemu-server/manager v4] implement ova/ovf import for file based storages Dominik Csapak
2024-05-24 13:21 ` [pve-devel] [PATCH storage v4 01/12] copy OVF.pm from qemu-server Dominik Csapak
2024-05-24 13:21 ` [pve-devel] [PATCH storage v4 02/12] plugin: dir: implement import content type Dominik Csapak
2024-05-24 13:21 ` [pve-devel] [PATCH storage v4 03/12] plugin: dir: handle ova files for import Dominik Csapak
2024-06-12 15:56   ` Max Carrara
2024-05-24 13:21 ` [pve-devel] [PATCH storage v4 04/12] ovf: improve and simplify path checking code Dominik Csapak
2024-05-24 13:21 ` [pve-devel] [PATCH storage v4 05/12] ovf: implement parsing the ostype Dominik Csapak
2024-05-24 13:21 ` [pve-devel] [PATCH storage v4 06/12] ovf: implement parsing out firmware type Dominik Csapak
2024-05-24 13:21 ` [pve-devel] [PATCH storage v4 07/12] ovf: implement rudimentary boot order Dominik Csapak
2024-05-24 13:21 ` [pve-devel] [PATCH storage v4 08/12] ovf: implement parsing nics Dominik Csapak
2024-05-24 13:21 ` [pve-devel] [PATCH storage v4 09/12] api: allow ova upload/download Dominik Csapak
2024-05-24 13:21 ` [pve-devel] [PATCH storage v4 10/12] plugin: enable import for nfs/btrfs/cifs/cephfs/glusterfs Dominik Csapak
2024-06-12 15:57   ` Max Carrara [this message]
2024-05-24 13:21 ` [pve-devel] [PATCH storage v4 11/12] add 'import' content type to 'check_volume_access' Dominik Csapak
2024-05-24 13:21 ` [pve-devel] [PATCH storage v4 12/12] plugin: file_size_info: don't ignore base path with whitespace Dominik Csapak
2024-05-24 13:21 ` [pve-devel] [PATCH qemu-server v4 1/4] api: delete unused OVF.pm Dominik Csapak
2024-05-24 13:21 ` [pve-devel] [PATCH qemu-server v4 2/4] use OVF from Storage Dominik Csapak
2024-05-24 13:21 ` [pve-devel] [PATCH qemu-server v4 3/4] api: create: implement extracting disks when needed for import-from Dominik Csapak
2024-06-12 16:01   ` Max Carrara
2024-06-13 10:29     ` Dominik Csapak
2024-06-14  8:36       ` Max Carrara
2024-05-24 13:22 ` [pve-devel] [PATCH qemu-server v4 4/4] api: create: add 'import-extraction-storage' parameter Dominik Csapak
2024-06-12 16:01   ` Max Carrara
2024-05-24 13:22 ` [pve-devel] [PATCH manager v4 1/9] ui: fix special 'import' icon for non-esxi storages Dominik Csapak
2024-05-24 13:22 ` [pve-devel] [PATCH manager v4 2/9] ui: guest import: add ova-needs-extracting warning text Dominik Csapak
2024-06-12 16:02   ` Max Carrara
2024-06-13 10:39     ` Dominik Csapak
2024-06-13 10:52       ` Fiona Ebner
2024-06-14  8:37       ` Max Carrara
2024-05-24 13:22 ` [pve-devel] [PATCH manager v4 3/9] ui: enable import content type for relevant storages Dominik Csapak
2024-05-24 13:22 ` [pve-devel] [PATCH manager v4 4/9] ui: enable upload/download/remove buttons for 'import' type storages Dominik Csapak
2024-05-24 13:22 ` [pve-devel] [PATCH manager v4 5/9] ui: disable 'import' button for non importable formats Dominik Csapak
2024-05-24 13:22 ` [pve-devel] [PATCH manager v4 6/9] ui: import: improve rendering of volume names Dominik Csapak
2024-05-24 13:22 ` [pve-devel] [PATCH manager v4 7/9] ui: guest import: add storage selector for ova extraction storage Dominik Csapak
2024-05-24 13:22 ` [pve-devel] [PATCH manager v4 8/9] ui: guest import: change icon/text for non-esxi import storage Dominik Csapak
2024-05-24 13:22 ` [pve-devel] [PATCH manager v4 9/9] ui: import: show size for dir-based storages Dominik Csapak
2024-06-12 15:56 ` [pve-devel] [PATCH storage/qemu-server/manager v4] implement ova/ovf import for file based storages Max Carrara
2024-06-13 10:52   ` Dominik Csapak
2024-06-14  8:57     ` Max Carrara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D1Y5UBG6O7S5.1XSWQ3WD7OI21@proxmox.com \
    --to=m.carrara@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal