'Test router-interface-add for in-valid ipv6 subnets.
Verify that an appropriate error message is displayed when
an IPv6 subnet configured to use an external_router for Router
Advertisements (i.e., ipv6_ra_mode is None and ipv6_address_mode
is not None) is attempted to associate with a Neutron Router.'

def test_router_add_iface_ipv6_ext_ra_subnet_returns_400(self):

    use_cases = [{'msg': 'IPv6    Subnet    Modes    (none,    slaac)', 'ra_mode': None, 'address_mode': lib_constants.IPV6_SLAAC}, {'msg': 'IPv6    Subnet    Modes    (none,    dhcpv6-stateful)', 'ra_mode': None, 'address_mode': lib_constants.DHCPV6_STATEFUL}, {'msg': 'IPv6    Subnet    Modes    (none,    dhcpv6-stateless)', 'ra_mode': None, 'address_mode': lib_constants.DHCPV6_STATELESS}]
    for uc in use_cases:
        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:
                    exp_code = exc.HTTPBadRequest.code
                    self._router_interface_action('add', r['router']['id'], s['subnet']['id'], None, expected_code=exp_code, msg=uc['msg'])
