'Binding information is provided on update, subnets on segments'

def test_port_update_deferred_allocation_no_ips(self):

    (network, segments, subnets) = self._create_test_segments_with_subnets(2)
    self._setup_host_mappings([(segments[0]['segment']['id'], 'fakehost2'), (segments[1]['segment']['id'], 'fakehost')])
    port = self._create_deferred_ip_port(network)
    subnet_data = {'subnet': {'allocation_pools': []}}
    subnet_req = self.new_update_request('subnets', subnet_data, subnets[1]['subnet']['id'])
    subnet_response = subnet_req.get_response(self.api)
    res = self.deserialize(self.fmt, subnet_response)
    data = {'port': {portbindings.HOST_ID: 'fakehost'}}
    port_id = port['port']['id']
    port_req = self.new_update_request('ports', data, port_id)
    response = port_req.get_response(self.api)
    res = self.deserialize(self.fmt, response)
    self.assertEqual(webob.exc.HTTPConflict.code, response.status_int)
    self.assertEqual(n_exc.IpAddressGenerationFailure.__name__, res['NeutronError']['type'])
