From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <d.csapak@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 6954B9A6D5
 for <pve-devel@lists.proxmox.com>; Tue,  9 May 2023 11:32:29 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 4155D1D0D8
 for <pve-devel@lists.proxmox.com>; Tue,  9 May 2023 11:31:59 +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))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pve-devel@lists.proxmox.com>; Tue,  9 May 2023 11:31:58 +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 C7D3A47D1E;
 Tue,  9 May 2023 11:31:57 +0200 (CEST)
Message-ID: <92e79046-dc40-53ba-b0dd-7c88daff2f0d@proxmox.com>
Date: Tue, 9 May 2023 11:31:57 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
 Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Cc: =?UTF-8?Q?Fabian_Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>,
 Markus Frank <m.frank@proxmox.com>,
 Wolfgang Bumiller <w.bumiller@proxmox.com>
References: <20230425102136.85334-1-m.frank@proxmox.com>
 <20230425102136.85334-4-m.frank@proxmox.com>
 <1ed81c96-4228-adea-c3ec-e82a29a9e59e@proxmox.com>
 <ab8c78e7-8911-bded-32ea-d680cfe43226@proxmox.com>
 <6ad543e0-38ad-4540-a39d-320009aa3f42@proxmox.com>
 <43d62e1c-8555-d641-2788-9b15115d683b@proxmox.com>
 <10508419-a110-0e52-242d-a20c2e9f7243@proxmox.com>
 <e48d26db-e438-ac92-6efd-10ba40e18080@proxmox.com>
Content-Language: en-US
From: Dominik Csapak <d.csapak@proxmox.com>
In-Reply-To: <e48d26db-e438-ac92-6efd-10ba40e18080@proxmox.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.135 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 POISEN_SPAM_PILL          0.1 Meta: its spam
 POISEN_SPAM_PILL_1        0.1 random spam to be learned in bayes
 POISEN_SPAM_PILL_3        0.1 random spam to be learned in bayes
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 T_SCC_BODY_TEXT_LINE    -0.01 -
Subject: Re: [pve-devel] [PATCH manager v4 3/6] added Config for Shared
 Filesystem Directories
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: Tue, 09 May 2023 09:32:29 -0000

to summarize what thomas and i discussed off-list:

1. i'll try to integrate arrays into the section config in pve(pbs has rudimentary support,
    but no "automatic" api integration)
    including a sensible api create/update/delete schema:
    - plan is to have the inner properties exposed but require an id parameter
      that identify which entry of which array property is to be updated
    i'll send this as a separate series, since for the remaining code it's
    not really relevant where the schema/config comes from, the internal
    api of that will probably be similar

2. Config should be per type (as mentioned in the last responses)
    and on create/update we'll not check for existence/correctness etc. for now
    (we can do that still when we broadcast the relevant info in pmxcfs in the future)

    we'll do the checks for that and insert the info in the gui and on vm start/migration/etc.

    also i'll combine some id properties when we don't require them separately, e.g. vendor/device.
    and make it clear in the description that these are for consistency checks on start

3. API will probably go to /cluster/resource/$type/$id
    where the get/create/put/delete depends on the above mentioned map id parameter for editing
    single entries
    (pending a better name than 'resource' since it's very similar to /cluster/resources
    which is an entirely different thing)

4. Most of Markus' permission structure is ok, besides replacing 'Map.' with 'Resource.'
    depending on which name we choose in the api

5. we'll probably remove the usermgmt permissions for PVEAdmin (to set it apart from the
    Administrator role)