'Update IP and associate new IP on port.
Check a port update with the specified subnet_id\'s. A IP address
will be allocated for each subnet_id.'

def test_update_port_update_ips(self):

    with self.subnet() as subnet:
        with self.port(subnet=subnet) as port:
            data = {'port': {'admin_state_up': False, 'fixed_ips': [{'subnet_id': subnet['subnet']['id'], 'ip_address': '10.0.0.3'}]}}
            req = self.new_update_request('ports', data, port['port']['id'])
            res = self.deserialize(self.fmt, req.get_response(self.api))
            self.assertEqual(data['port']['admin_state_up'], res['port']['admin_state_up'])
            ips = res['port']['fixed_ips']
            self.assertEqual(1, len(ips))
            self.assertEqual('10.0.0.3', ips[0]['ip_address'], '10.0.0.3')
            self.assertEqual(ips[0]['subnet_id'], subnet['subnet']['id'])
