'Return subnet with mask bits for configured CIDR'

@classmethod
def _get_ipaddress_from_tempest_conf(cls):

    if (cls._ip_version == 4):
        cidr = netaddr.IPNetwork(CONF.network.project_network_cidr)
        cidr.prefixlen = CONF.network.project_network_mask_bits
    elif (cls._ip_version == 6):
        cidr = netaddr.IPNetwork(CONF.network.project_network_v6_cidr)
        cidr.prefixlen = CONF.network.project_network_v6_mask_bits
    return cidr
