'Test router-interface-add for valid ipv6 subnets.
Verify the valid use-cases of an IPv6 subnet where we
are allowed to associate to the Neutron Router are successful.'

def test_router_add_interface_ipv6_subnet(self):

    slaac = lib_constants.IPV6_SLAAC
    stateful = lib_constants.DHCPV6_STATEFUL
    stateless = lib_constants.DHCPV6_STATELESS
    use_cases = [{'msg': 'IPv6    Subnet    Modes    (slaac,    none)', 'ra_mode': slaac, 'address_mode': None}, {'msg': 'IPv6    Subnet    Modes    (none,    none)', 'ra_mode': None, 'address_mode': None}, {'msg': 'IPv6    Subnet    Modes    (dhcpv6-stateful,    none)', 'ra_mode': stateful, 'address_mode': None}, {'msg': 'IPv6    Subnet    Modes    (dhcpv6-stateless,    none)', 'ra_mode': stateless, 'address_mode': None}, {'msg': 'IPv6    Subnet    Modes    (slaac,    slaac)', 'ra_mode': slaac, 'address_mode': slaac}, {'msg': 'IPv6    Subnet    Modes    (dhcpv6-stateful,dhcpv6-stateful)', 'ra_mode': stateful, 'address_mode': stateful}, {'msg': 'IPv6    Subnet    Modes    (dhcpv6-stateless,dhcpv6-stateless)', 'ra_mode': stateless, 'address_mode': stateless}]
    for uc in use_cases:
        fake_notifier.reset()
        with self.router() as r:
            with self.network() as n:
                with self.subnet(network=n, cidr='fd00::1/64', gateway_ip='fd00::1', ip_version=6, ipv6_ra_mode=uc['ra_mode'], ipv6_address_mode=uc['address_mode']) as s:
                    self._test_router_add_interface_subnet(r, s, uc['msg'])
