Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Kilo #935

Open
wants to merge 2 commits into
base: support-kilo
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ before_install:
install:
- pip install hacking pytest coverage
- pip install -r requirements.test.txt
before_script:
# Workaround
- SITE=$(pip --version | awk '{ print $4 }')
- sed -i "/^VALID = (/i PROCESS = 'process'" ${SITE}/neutron/callbacks/resources.py
- sed -i "/^VALID = (/a PROCESS," ${SITE}/neutron/callbacks/resources.py
- cat ${SITE}/neutron/callbacks/resources.py
- sed -i "/^VALID = (/i AFTER_INIT = 'after_init'" ${SITE}/neutron/callbacks/events.py
- sed -i "/^VALID = (/a AFTER_INIT," ${SITE}/neutron/callbacks/events.py
- cat ${SITE}/neutron/callbacks/events.py
script:
- flake8 ./f5lbaasdriver
- coverage run --source f5lbaasdriver -m py.test f5lbaasdriver/v2/bigip/
Expand Down
5 changes: 2 additions & 3 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,8 +51,8 @@ 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'],
filter_dynamic=None)
segments = db.get_network_segments(context, network['id'],
filter_dynamic=None)

for segment in segments:
LOG.debug("F5 disconnected service check segment: %s" % segment)
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
2 changes: 1 addition & 1 deletion f5lbaasdriver/v2/bigip/test/test_driver_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


class FakeNoEligibleAgentExc(lbaas_agentschedulerv2.NoEligibleLbaasAgent):
msg = 'test exception'
message = 'test exception'


class FakeLB(object):
Expand Down
2 changes: 1 addition & 1 deletion f5lbaasdriver/v2/bigip/test/test_plugin_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import pytest

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

import f5lbaasdriver.v2.bigip.plugin_rpc

Expand Down
8 changes: 4 additions & 4 deletions requirements.test.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-e .

git+https://github.com/openstack/neutron.git@stable/ocata
git+https://github.com/F5Networks/neutron-lbaas.git@stable/ocata
git+https://github.com/openstack/neutron.git@kilo-eol
git+https://github.com/F5Networks/neutron-lbaas.git@stable/kilo
git+https://github.com/F5Networks/pytest-symbols.git
git+https://github.com/F5Networks/f5-openstack-test.git@stable/newton

Expand All @@ -16,10 +16,10 @@ f5-sdk==2.3.3
-c https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata

mock==IGNORED # See section comment
pytest==IGNORED # See section comment
pytest==3.0.6 # See section comment
decorator==IGNORED # See section comment
paramiko==IGNORED # See section comment
python-glanceclient==IGNORED
python-heatclient==IGNORED
tempest==IGNORED # See section comment
tempest==10.0.0 # See section comment
pytest-cov==2.2.1