From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <t.lamprecht@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 E74C36193D
 for <pve-devel@lists.proxmox.com>; Thu,  3 Dec 2020 10:47:15 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id DA2E226E03
 for <pve-devel@lists.proxmox.com>; Thu,  3 Dec 2020 10:46:45 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [212.186.127.180])
 (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 firstgate.proxmox.com (Proxmox) with ESMTPS id 209E626D01
 for <pve-devel@lists.proxmox.com>; Thu,  3 Dec 2020 10:46:45 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id DB20044C93
 for <pve-devel@lists.proxmox.com>; Thu,  3 Dec 2020 10:46:44 +0100 (CET)
To: Dominik Csapak <d.csapak@proxmox.com>,
 Proxmox VE development discussion <pve-devel@lists.proxmox.com>
References: <20201203084309.24838-1-d.csapak@proxmox.com>
 <eb5115dc-d63d-b03b-16ec-36c3651d4127@proxmox.com>
 <27fff7eb-5f72-b466-9409-94dc70b550da@proxmox.com>
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
Message-ID: <792e0100-c62e-2d26-4e8b-369032254e81@proxmox.com>
Date: Thu, 3 Dec 2020 10:46:43 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101
 Thunderbird/84.0
MIME-Version: 1.0
In-Reply-To: <27fff7eb-5f72-b466-9409-94dc70b550da@proxmox.com>
Content-Type: text/plain; charset=UTF-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.074 Adjusted score from AWL reputation of From: address
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 NICE_REPLY_A           -0.001 Looks like a legit reply (A)
 RCVD_IN_DNSWL_MED        -2.3 Sender listed at https://www.dnswl.org/,
 medium trust
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [proxmox.com]
Subject: Re: [pve-devel] [PATCH qemu-server] fix backpu/restore with
 ipv6/ports for pbs
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: Thu, 03 Dec 2020 09:47:15 -0000

On 03.12.20 10:40, Dominik Csapak wrote:
>>
>> a=C2=A0few=C2=A0lines=C2=A0below,=C2=A0just=C2=A0out=C2=A0of=C2=A0cont=
ext=C2=A0we=C2=A0see=C2=A0the=C2=A0sole=C2=A0use=C2=A0for=C2=A0all=C2=A0t=
his=C2=A0extracting:
>>
>> my=C2=A0$repo=C2=A0=3D=C2=A0"$username\@$server:$datastore";
>>
>> So=C2=A0how=C2=A0about=C2=A0adding=C2=A0a=C2=A0get_repo=C2=A0sub=C2=A0=
to=C2=A0storage,=C2=A0or=C2=A0the=C2=A0PBSClient=C2=A0in=C2=A0pve-common
>> (if=C2=A0we=C2=A0have=C2=A0a=C2=A0documented=C2=A0datastructure=C2=A0l=
ike=C2=A0scfg=C2=A0to=C2=A0get=C2=A0the=C2=A0info=C2=A0sanely=C2=A0from).=

>=20
> well=C2=A0afaics,=C2=A0we=C2=A0use=C2=A0everywhere=C2=A0the=C2=A0same=C2=
=A0section=C2=A0config=C2=A0options
> (server,fingerprint,datastore,etc.)=C2=A0except=C2=A0there=C2=A0is=C2=A0=
no=C2=A0'port'
> setting in pmg (put this code here handles it ok, and we can add it no =
problem)
> is=C2=A0that=C2=A0enough,=C2=A0or=C2=A0how=C2=A0else=C2=A0would=C2=A0yo=
u=C2=A0document=C2=A0it=C2=A0(or=C2=A0make
> sure=C2=A0users=C2=A0know=C2=A0what=C2=A0to=C2=A0put=C2=A0in=C2=A0here)=
?
>=20
> would=C2=A0a=C2=A0simple=C2=A0comment=C2=A0above=C2=A0the=C2=A0helper=C2=
=A0be=C2=A0enough?=C2=A0or=C2=A0should=C2=A0we
> try=C2=A0to=C2=A0refactor=C2=A0those=C2=A0section=C2=A0config=C2=A0opti=
ons=C2=A0across=C2=A0products?

yeah a short comment and maybe the structure of known keys in the $cfg
variable should be enough for us - I do not see this changing soon.

I did something like that for the pve-storage "scan_datastores" sub:
https://git.proxmox.com/?p=3Dpve-storage.git;a=3Dcommitdiff;h=3D8b62ac6a0=
ce0d4757ce25082123d18434f5b3a58

>=20
> so=C2=A0i'd=C2=A0simply=C2=A0add=C2=A0a=C2=A0'build_repository'=C2=A0su=
b=C2=A0to=C2=A0pve-commons=C2=A0pbsclient=C2=A0module,
> and=C2=A0use=C2=A0that=C2=A0everywhere=C2=A0we=C2=A0need=C2=A0that
> is=C2=A0that=C2=A0ok?

Personally I'd went for "get_repository", build sounds a bit strange to m=
e,
albeit it is not wrong (this has big bike shedding potential, so no hard
feelings from me).