From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <f.ebner@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id F27EC7D173;
 Wed, 20 Jul 2022 12:59:54 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id EEE8D334D3;
 Wed, 20 Jul 2022 12:59:54 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS;
 Wed, 20 Jul 2022 12:59:53 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 92BF443663;
 Wed, 20 Jul 2022 12:59:52 +0200 (CEST)
From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com,
	pmg-devel@lists.proxmox.com
Date: Wed, 20 Jul 2022 12:59:40 +0200
Message-Id: <20220720105948.291740-1-f.ebner@proxmox.com>
X-Mailer: git-send-email 2.30.2
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.041 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: [pve-devel] [PATCH-SERIES pve-common/pmg-api/pve-storage] pbs
 client: rework namespace usage and minor fixes
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Wed, 20 Jul 2022 10:59:55 -0000

Mostly done in preparation for #3186 (refactor pbs client use in PVE),
to avoid the need to manually set the namespace for all call-sites in
PVE, when it's already present in the storage/PBS config.

pve-common 1/5 and 2/5 and pmg-api 1/1 are improvements touching parts
of the same infrastructure, but not directly related.

The other patches change PBSClient to auto-select the namespace from
its initial configuration if not explicitly overriden with a
namespaced parameter and deprecate namespaced parameters as a whole.

Rationale is that essentially all current users of PBSClient are
configured for one namespace (there is the "status" call, which
doesn't depend on a namespace, but that doesn't contradict the
previous claim). It's less work on the call sites and there's no risk
to forget namespacing a parameter (as happened with pxar_restore in
PMG) if the PBSClient handles it itself.

If the need for handling more than one namespace with a single client
ever arises, we can still add e.g. a set_namespace() function to the
PBSClient.

Also makes it possible to restore a backup from a namespace in PMG,
which currently fails.


Dependency bump for new pve-common is needed for pve-storage and
pmg-api.


pve-common:

Fabian Ebner (5):
  pbs client: delete password: return success for non-existent file
  pbs client: forget snapshot: suppress output
  pbs client: default to configured namespace for non-namespaced
    parameters
  pbs client: deprecate namespaced parameters
  pbs client: backup fs tree: drop namespace parameter

 src/PVE/PBSClient.pm | 34 +++++++++++++++++++---------------
 1 file changed, 19 insertions(+), 15 deletions(-)


pmg-api:

Fabian Ebner (2):
  api: get group snapshots: take backup-id into account
  api: pbs: don't use namespaced parameters

 src/PMG/API2/PBS/Job.pm | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)


pve-storage:

Fabian Ebner (1):
  api: pbs: file restore: don't use namespaced parameters

 PVE/API2/Storage/FileRestore.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.30.2





From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <f.ebner@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id F27EC7D173;
 Wed, 20 Jul 2022 12:59:54 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id EEE8D334D3;
 Wed, 20 Jul 2022 12:59:54 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS;
 Wed, 20 Jul 2022 12:59:53 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 92BF443663;
 Wed, 20 Jul 2022 12:59:52 +0200 (CEST)
From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com,
	pmg-devel@lists.proxmox.com
Date: Wed, 20 Jul 2022 12:59:40 +0200
Message-Id: <20220720105948.291740-1-f.ebner@proxmox.com>
X-Mailer: git-send-email 2.30.2
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.041 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: [pmg-devel] [PATCH-SERIES pve-common/pmg-api/pve-storage] pbs
 client: rework namespace usage and minor fixes
X-BeenThere: pmg-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Mail Gateway development discussion
 <pmg-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pmg-devel>, 
 <mailto:pmg-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pmg-devel/>
List-Post: <mailto:pmg-devel@lists.proxmox.com>
List-Help: <mailto:pmg-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel>, 
 <mailto:pmg-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Wed, 20 Jul 2022 10:59:55 -0000

Mostly done in preparation for #3186 (refactor pbs client use in PVE),
to avoid the need to manually set the namespace for all call-sites in
PVE, when it's already present in the storage/PBS config.

pve-common 1/5 and 2/5 and pmg-api 1/1 are improvements touching parts
of the same infrastructure, but not directly related.

The other patches change PBSClient to auto-select the namespace from
its initial configuration if not explicitly overriden with a
namespaced parameter and deprecate namespaced parameters as a whole.

Rationale is that essentially all current users of PBSClient are
configured for one namespace (there is the "status" call, which
doesn't depend on a namespace, but that doesn't contradict the
previous claim). It's less work on the call sites and there's no risk
to forget namespacing a parameter (as happened with pxar_restore in
PMG) if the PBSClient handles it itself.

If the need for handling more than one namespace with a single client
ever arises, we can still add e.g. a set_namespace() function to the
PBSClient.

Also makes it possible to restore a backup from a namespace in PMG,
which currently fails.


Dependency bump for new pve-common is needed for pve-storage and
pmg-api.


pve-common:

Fabian Ebner (5):
  pbs client: delete password: return success for non-existent file
  pbs client: forget snapshot: suppress output
  pbs client: default to configured namespace for non-namespaced
    parameters
  pbs client: deprecate namespaced parameters
  pbs client: backup fs tree: drop namespace parameter

 src/PVE/PBSClient.pm | 34 +++++++++++++++++++---------------
 1 file changed, 19 insertions(+), 15 deletions(-)


pmg-api:

Fabian Ebner (2):
  api: get group snapshots: take backup-id into account
  api: pbs: don't use namespaced parameters

 src/PMG/API2/PBS/Job.pm | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)


pve-storage:

Fabian Ebner (1):
  api: pbs: file restore: don't use namespaced parameters

 PVE/API2/Storage/FileRestore.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.30.2