'Test router-interface-add for multiple ipv4 subnets.
Verify that adding multiple ipv4 subnets from the same network
to a router places them all on different router interfaces.'

def test_router_add_interface_multiple_ipv4_subnets(self):

    with self.router() as r:
        with self.network() as n:
            with self.subnet(network=n, cidr='10.0.0.0/24') as s1:
                with self.subnet(network=n, cidr='10.0.1.0/24') as s2:
                    body = self._router_interface_action('add', r['router']['id'], s1['subnet']['id'], None)
                    pid1 = body['port_id']
                    body = self._router_interface_action('add', r['router']['id'], s2['subnet']['id'], None)
                    pid2 = body['port_id']
                    self.assertNotEqual(pid1, pid2)
                    self._router_interface_action('remove', r['router']['id'], s1['subnet']['id'], None)
                    self._router_interface_action('remove', r['router']['id'], s2['subnet']['id'], None)
