diff --git a/nova/network/neutronv2/api.py b/nova/network/neutronv2/api.py index 43ad02e53b..c733ec3408 100644 --- a/nova/network/neutronv2/api.py +++ b/nova/network/neutronv2/api.py @@ -1660,14 +1660,17 @@ class API(base_api.NetworkAPI): neutron_client=neutron) if port.get('device_id', None): raise exception.PortInUse(port_id=request.port_id) - deferred_ip = port.get('ip_allocation') == 'deferred' - # NOTE(carl_baldwin) A deferred IP port doesn't have an - # address here. If it fails to get one later when nova - # updates it with host info, Neutron will error which - # raises an exception. - if not deferred_ip and not port.get('fixed_ips'): - raise exception.PortRequiresFixedIP( - port_id=request.port_id) + ip_allocation = port.get('ip_allocation', None) + if ip_allocation: + # NOTE(carl_baldwin) A deferred IP port doesn't have an + # address here. If it fails to get one later when nova + # updates it with host info, Neutron will error which + # raises an exception. + if (not ip_allocation == 'deferred' and + not ip_allocation == 'none' and + not port.get('fixed_ips')): + raise exception.PortRequiresFixedIP( + port_id=request.port_id) request.network_id = port['network_id'] else: ports_needed_per_instance += 1