Introduce capm3 validations in sylva-library for IPv6 - cluster_virtual_ip and capm3 IPv6 networks

cluster_virtual_ip on IPV6

capm3NetworkValidation (templates/_capm3_checks.tpl) validates that cluster_virtual_ip doesn't collide with the capm3 primary network's subnet/gateway/host-range. It skips all of this for IPv6 addresses entirely (IPv6 validation not yet implemented) as per implementation in sylva-library !158. When an IPv6 cluster_virtual_ip will be introduced as proposed in dual-stack: expose cluster_virtual_ip on IPv6, this validation needs to be covered also for IPv6.

Scope of this is to mirror the existing subnet/gateway/range checks for cluster_virtual_ipv6 against capm3.networks.primary.ipv6.*.

CAPM3 IPv6 defined networks

Based on proposals from @baburciu and @cristian.manda in dual-stack introduction s-c-c MR, extra checks would be needed:

  • (1) if IPv6 is wanted (.ipv6_enabled: true), then .capm3.networks.foo.ipv6 must be provided for all node networks, primary and additional ones;
  • (2) if IPv6 is wanted with custom addresses, then baremetal_hosts.bar.ip_preallocations_v6.baz (which implies also existance of a .capm3.networks.baz.ipv6 defined
  • (3) ip_preallocations_v6 are inside the ipv6 network range - useful but could prove to be to complex as per comment.
Edited by Vlad Onutu