Skip to content

Commit

Permalink
Support CMCC Kilo
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoqin-github committed Oct 31, 2018
1 parent 2a194ce commit 5848d01
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
3 changes: 1 addition & 2 deletions f5lbaasdriver/v2/bigip/disconnected_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.
#

from neutron.db import segments_db
from neutron.plugins.ml2 import db
from neutron.plugins.ml2 import models

Expand Down Expand Up @@ -52,7 +51,7 @@ def get_network_segment(self, context, agent_configuration, network):
agent_configuration.get('tunnel_types', [])
]
# look up segment details in the ml2_network_segments table
segments = segments_db.get_network_segments(context, network['id'],
segments = db.get_network_segments(context, network['id'],
filter_dynamic=None)

for segment in segments:
Expand Down
2 changes: 1 addition & 1 deletion f5lbaasdriver/v2/bigip/driver_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
from neutron.callbacks import events
from neutron.callbacks import registry
from neutron.callbacks import resources
from neutron.common import constants as q_const
from neutron.extensions import portbindings
from neutron.plugins.common import constants as plugin_constants
from neutron_lib import constants as q_const

from neutron_lbaas.db.loadbalancer import models
from neutron_lbaas.extensions import lbaas_agentschedulerv2
Expand Down
2 changes: 1 addition & 1 deletion f5lbaasdriver/v2/bigip/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from neutron_lib import exceptions as q_exc
from neutron.common import exceptions as q_exc


class F5LBaaSv2DriverException(q_exc.NeutronException):
Expand Down
5 changes: 3 additions & 2 deletions f5lbaasdriver/v2/bigip/neutron_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

from neutron.extensions import portbindings

from neutron_lib import constants as neutron_const
from neutron.api.v2 import attributes as attrs
from neutron.common import constants as neutron_const

from oslo_log import helpers as log_helpers
from oslo_log import log as logging
Expand All @@ -38,7 +39,7 @@ def create_port_on_subnet(self, context, subnet_id=None,
port = None

if not mac_address:
mac_address = neutron_const.ATTR_NOT_SPECIFIED
mac_address = attrs.ATTR_NOT_SPECIFIED

if subnet_id:
try:
Expand Down
9 changes: 5 additions & 4 deletions f5lbaasdriver/v2/bigip/plugin_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
from neutron_lbaas.db.loadbalancer import models
from neutron_lbaas.services.loadbalancer import constants as nlb_constant

from neutron_lib import constants as neutron_const
from neutron.api.v2 import attributes as attrs
from neutron.common import constants as neutron_const

from oslo_log import helpers as log_helpers
from oslo_log import log as logging
Expand Down Expand Up @@ -512,7 +513,7 @@ def create_port_on_subnet(self, context, subnet_id=None,
subnet_id
)
if not mac_address:
mac_address = neutron_const.ATTR_NOT_SPECIFIED
mac_address = attrs.ATTR_NOT_SPECIFIED
fixed_ip = {'subnet_id': subnet['id']}
if fixed_address_count > 1:
fixed_ips = []
Expand Down Expand Up @@ -680,7 +681,7 @@ def create_port_on_network(self, context, network_id=None,
)

if not mac_address:
mac_address = neutron_const.ATTR_NOT_SPECIFIED
mac_address = attrs.ATTR_NOT_SPECIFIED
if not host:
host = ''
if not name:
Expand All @@ -694,7 +695,7 @@ def create_port_on_network(self, context, network_id=None,
'admin_state_up': True,
'device_owner': 'network:f5lbaasv2',
'status': neutron_const.PORT_STATUS_ACTIVE,
'fixed_ips': neutron_const.ATTR_NOT_SPECIFIED
'fixed_ips': attrs.ATTR_NOT_SPECIFIED
}
if device_id:
port_data['device_id'] = device_id
Expand Down

0 comments on commit 5848d01

Please sign in to comment.