2525from neutron_lbaas .db .loadbalancer import models
2626from neutron_lbaas .services .loadbalancer import constants as nlb_constant
2727
28- from neutron_lib import constants as neutron_const
28+ from neutron .api .v2 import attributes as attrs
29+ from neutron .common import constants as neutron_const
2930
3031from oslo_log import helpers as log_helpers
3132from oslo_log import log as logging
@@ -512,7 +513,7 @@ def create_port_on_subnet(self, context, subnet_id=None,
512513 subnet_id
513514 )
514515 if not mac_address :
515- mac_address = neutron_const .ATTR_NOT_SPECIFIED
516+ mac_address = attrs .ATTR_NOT_SPECIFIED
516517 fixed_ip = {'subnet_id' : subnet ['id' ]}
517518 if fixed_address_count > 1 :
518519 fixed_ips = []
@@ -680,7 +681,7 @@ def create_port_on_network(self, context, network_id=None,
680681 )
681682
682683 if not mac_address :
683- mac_address = neutron_const .ATTR_NOT_SPECIFIED
684+ mac_address = attrs .ATTR_NOT_SPECIFIED
684685 if not host :
685686 host = ''
686687 if not name :
@@ -694,7 +695,7 @@ def create_port_on_network(self, context, network_id=None,
694695 'admin_state_up' : True ,
695696 'device_owner' : 'network:f5lbaasv2' ,
696697 'status' : neutron_const .PORT_STATUS_ACTIVE ,
697- 'fixed_ips' : neutron_const .ATTR_NOT_SPECIFIED
698+ 'fixed_ips' : attrs .ATTR_NOT_SPECIFIED
698699 }
699700 if device_id :
700701 port_data ['device_id' ] = device_id
0 commit comments