'Return first subnet gateway for configured CIDR'

@classmethod
def _get_gateway_from_tempest_conf(cls, ip_version):

    if (ip_version == 4):
        cidr = netaddr.IPNetwork(CONF.network.project_network_cidr)
        mask_bits = CONF.network.project_network_mask_bits
    elif (ip_version == 6):
        cidr = netaddr.IPNetwork(CONF.network.project_network_v6_cidr)
        mask_bits = CONF.network.project_network_v6_mask_bits
    if (mask_bits >= cidr.prefixlen):
        return (netaddr.IPAddress(cidr) + 1)
    else:
        for subnet in cidr.subnet(mask_bits):
            return (netaddr.IPAddress(subnet) + 1)
