]> git.proxmox.com Git - pve-cluster.git/commit - data/PVE/Cluster.pm
node add: factor out checks for joining
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 23 Nov 2017 13:29:37 +0000 (14:29 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 16 Feb 2018 12:50:36 +0000 (13:50 +0100)
commit68491de3d4ca69b248e0340b1ce345c17aa4dfea
treefac06ac1e42735cd4742c1adf993427c913fa933
parent855671ec4edd5daf53344ea1ae481c6f5bb41b0f
node add: factor out checks for joining

Factor out the code which checks if the node can join another
cluster. It will be used by the new API endpoint to join a cluster
but stays also in the CLIHandler as we keep the old legacy SSH method
for a bit.

This is not a completely 1:1 move, I changed:
* &$error(...) to $error->(...)
* removing a few empty lines, where code was so spread out that those
  lines resulted in the opposite of what they intended, i.e., less
  readability

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
data/PVE/CLI/pvecm.pm
data/PVE/Cluster.pm