parser: fix scoped alias resolution We tried to resolve aliases in some places where the cluster configuration didn't get set. It's probably better to handle these cases directly in the function at hand, instead of at every place where this issues might arise. This seemingly fixes the issues reported on pve-user and the forum: * https://forum.proxmox.com/threads/pve-8-pve-firewall-status-no-such-alias.130202/ * https://forum.proxmox.com/threads/ipset-not-working-for-accepting-cluster-traffic.129599/ Signed-off-by: Leo Nunner <l.nunner@proxmox.com>
fix #4556: api: return scoped IPSets and aliases Introduce a new 'scope' field in the return values for the /ref endpoints. Also add the 'ref' field in the VM endpoint, since it has been missing up until now. Signed-off-by: Leo Nunner <l.nunner@proxmox.com>
fix #4556: introduce 'dc' and 'vm' prefix for aliases since they had the same issue as IPSets, detailed in #4556. The format works the same as for IPSets: dc/alias Looks for the alias on the Datacenter level. vm/alias Looks for the alias on the VM level. alias Uses the previous method of scoping, where it first looks at the VM level and then at the Datacenter level. Signed-off-by: Leo Nunner <l.nunner@proxmox.com>
fix #4556: introduce 'dc' and 'vm' prefix for IPSets to differentiate whether they should be taken from the datacenter config or from the local config. The parser now accepts IPSets in the following format: +dc/ipset Looks for the IPSet on the Datacenter level. +vm/ipset Looks for the IPSet on the VM level. +ipset Uses the previous method of scoping, where it first looks at the VM level and then at the Datacenter level. Signed-off-by: Leo Nunner <l.nunner@proxmox.com>