This PR fixes a bug when creating metal gateways associated with IPv6 reservations. Previously the provider would assume the gateway was tied to an IPv4 reservation, which would result in an error when the calculateSubnetSize function was called.
To fix this, an additional check was added to the calculateSubnetSize function which ensures the address is actually IPv4 before executing the private ipv4 subnet logic.
Additionally an acceptance test was added which creates a metal gateway associated with an IPv6 reservation and VRF.
This PR fixes a bug when creating metal gateways associated with IPv6 reservations. Previously the provider would assume the gateway was tied to an IPv4 reservation, which would result in an error when the
calculateSubnetSize
function was called.To fix this, an additional check was added to the
calculateSubnetSize
function which ensures the address is actuallyIPv4
before executing the private ipv4 subnet logic.Additionally an acceptance test was added which creates a metal gateway associated with an IPv6 reservation and VRF.