[pve-devel] [PATCH qemu-server] fix backpu/restore with ipv6/ports for pbs

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Dec 3 10:46:43 CET 2020


On 03.12.20 10:40, Dominik Csapak wrote:
>>
>> a few lines below, just out of context we see the sole use for all this extracting:
>>
>> my $repo = "$username\@$server:$datastore";
>>
>> So how about adding a get_repo sub to storage, or the PBSClient in pve-common
>> (if we have a documented datastructure like scfg to get the info sanely from).
> 
> well afaics, we use everywhere the same section config options
> (server,fingerprint,datastore,etc.) except there is no 'port'
> setting in pmg (put this code here handles it ok, and we can add it no problem)
> is that enough, or how else would you document it (or make
> sure users know what to put in here)?
> 
> would a simple comment above the helper be enough? or should we
> try to refactor those section config options across products?

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=pve-storage.git;a=commitdiff;h=8b62ac6a0ce0d4757ce25082123d18434f5b3a58

> 
> so i'd simply add a 'build_repository' sub to pve-commons pbsclient module,
> and use that everywhere we need that
> is that ok?

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






More information about the pve-devel mailing list