Skip to content

Commit 624cde4

Browse files
richbrownekush1093
authored andcommitted
Running changes to make for Ocata devel
1 parent 9949a2b commit 624cde4

4 files changed

Lines changed: 21 additions & 13 deletions

File tree

f5lbaasdriver/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "10.2.0"
1+
__version__ = "11.0.0"

f5lbaasdriver/v2/bigip/disconnected_service.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
# limitations under the License.
1414
#
1515

16+
from neutron.db import segments_db
1617
from neutron.plugins.ml2 import db
1718
from neutron.plugins.ml2 import models
19+
1820
from oslo_log import log as logging
1921

2022
LOG = logging.getLogger(__name__)
@@ -50,8 +52,8 @@ def get_network_segment(self, context, agent_configuration, network):
5052
agent_configuration.get('tunnel_types', [])
5153
]
5254
# look up segment details in the ml2_network_segments table
53-
segments = db.get_network_segments(context.session, network['id'],
54-
filter_dynamic=None)
55+
segments = segments_db.get_network_segments(context, network['id'],
56+
filter_dynamic=None)
5557

5658
for segment in segments:
5759
LOG.debug("F5 disconnected service check segment: %s" % segment)

f5lbaasdriver/v2/bigip/neutron_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
# limitations under the License.
1616
#
1717

18-
from neutron.api.v2 import attributes
19-
from neutron.common import constants as neutron_const
2018
from neutron.extensions import portbindings
2119

20+
from neutron_lib import constants as neutron_const
21+
2222
from oslo_log import helpers as log_helpers
2323
from oslo_log import log as logging
2424

@@ -38,7 +38,7 @@ def create_port_on_subnet(self, context, subnet_id=None,
3838
port = None
3939

4040
if not mac_address:
41-
mac_address = attributes.ATTR_NOT_SPECIFIED
41+
mac_address = neutron_const.ATTR_NOT_SPECIFIED
4242

4343
if subnet_id:
4444
try:

f5lbaasdriver/v2/bigip/plugin_rpc.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,21 @@
1515
# limitations under the License.
1616
#
1717

18-
from oslo_log import helpers as log_helpers
19-
from oslo_log import log as logging
18+
from f5lbaasdriver.v2.bigip import constants_v2 as constants
2019

21-
from neutron.api.v2 import attributes
2220
from neutron.common import rpc as neutron_rpc
2321
from neutron.db import agents_db
2422
from neutron.extensions import portbindings
2523
from neutron.plugins.common import constants as plugin_constants
24+
2625
from neutron_lbaas.db.loadbalancer import models
2726
from neutron_lbaas.services.loadbalancer import constants as nlb_constant
27+
2828
from neutron_lib import constants as neutron_const
2929

30-
from f5lbaasdriver.v2.bigip import constants_v2 as constants
30+
from oslo_log import helpers as log_helpers
31+
from oslo_log import log as logging
32+
3133

3234
LOG = logging.getLogger(__name__)
3335

@@ -510,7 +512,7 @@ def create_port_on_subnet(self, context, subnet_id=None,
510512
subnet_id
511513
)
512514
if not mac_address:
513-
mac_address = attributes.ATTR_NOT_SPECIFIED
515+
mac_address = neutron_const.ATTR_NOT_SPECIFIED
514516
fixed_ip = {'subnet_id': subnet['id']}
515517
if fixed_address_count > 1:
516518
fixed_ips = []
@@ -540,6 +542,10 @@ def create_port_on_subnet(self, context, subnet_id=None,
540542
port_data[portbindings.VNIC_TYPE] = vnic_type
541543
port_data[portbindings.PROFILE] = binding_profile
542544

545+
if ('binding:capabilities' in
546+
portbindings.EXTENDED_NEUTRON_CONST_2_0['ports']):
547+
port_data['binding:capabilities'] = {
548+
'port_filter': False}
543549
port = self.driver.plugin.db._core_plugin.create_port(
544550
context, {'port': port_data})
545551
# Because ML2 marks ports DOWN by default on creation
@@ -678,7 +684,7 @@ def create_port_on_network(self, context, network_id=None,
678684
)
679685

680686
if not mac_address:
681-
mac_address = attributes.ATTR_NOT_SPECIFIED
687+
mac_address = neutron_const.ATTR_NOT_SPECIFIED
682688
if not host:
683689
host = ''
684690
if not name:
@@ -692,7 +698,7 @@ def create_port_on_network(self, context, network_id=None,
692698
'admin_state_up': True,
693699
'device_owner': 'network:f5lbaasv2',
694700
'status': neutron_const.PORT_STATUS_ACTIVE,
695-
'fixed_ips': attributes.ATTR_NOT_SPECIFIED
701+
'fixed_ips': neutron_const.ATTR_NOT_SPECIFIED
696702
}
697703
if device_id:
698704
port_data['device_id'] = device_id

0 commit comments

Comments
 (0)