[pve-devel] [PATCH cluster v8 3/4] datacenter.cfg: add option for tag-style

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Nov 10 10:54:09 CET 2022


w.r.t. to this one and the next patch:

I'd slightly prefer either having just a single property for all, or split it into two:
style and rest. The latter may have a small benefit w.r.t. to stability - if a parser/edit
bug sneaks in that breaks styling the access stuff might be still working, but depends
really on what scenario one imagines.

so either:

tags => {
   ...
    format => {
        'color-map' => {},
        'shape' => {},
        'access' => {},
        'access-list' => {}
        'registered' => {} # admin tags 
    },
}

(I also altered the property names a bit to drop the slightly redundant "tag" from the
inner ones and use registered for admin tags (no hard feelings on the latter one))

or

'tag-style' => {
   ...
    format => {
        'color-map' => {},
        'shape' => {},
    },
},
'tag-access' => {
   ...
    format => {
        'user-allow' => {},
        'user-allow-list' => {}
        'registered' => {} # admin tags, if not separate.
    },
},

but I don't think the tree properties are bad at all, just seems a bit bloated, probably
just because we rarely expand datacenter.cfg. So, I won't block this if you want to stick
to your originally formats.





More information about the pve-devel mailing list