diff --git a/.zuul.yaml b/.zuul.yaml index 7c8c420d..b6df1dcf 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -2,8 +2,6 @@ name: x/networking-arista templates: - openstack-lower-constraints-jobs-neutron - - openstack-python-jobs-neutron - - openstack-python35-jobs-neutron - openstack-python36-jobs-neutron - openstack-python37-jobs-neutron - check-requirements diff --git a/lower-constraints.txt b/lower-constraints.txt index e0c976b1..0f1c9848 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -14,7 +14,7 @@ cmd2==0.8.0 contextlib2==0.4.0 coverage==4.0 ddt==1.0.1 -debtcollector==1.19.0 +debtcollector>=1.19.0 decorator==3.4.0 deprecation==1.0 docutils==0.11 @@ -40,7 +40,7 @@ jmespath==0.9.0 jsonpatch==1.16 jsonpointer==1.13 jsonschema==2.6.0 -keystoneauth1==3.14.0 +keystoneauth1>=3.14.0 keystonemiddleware==4.17.0 kombu==4.0.0 linecache2==1.0.0 @@ -56,11 +56,11 @@ msgpack-python==0.4.0 munch==2.1.0 netaddr==0.7.18 netifaces==0.10.4 -neutron-lib==1.29.1 +neutron-lib==2.0.0 openstackdocstheme==1.30.0 openstacksdk==0.31.2 os-client-config==1.28.0 -os-service-types==1.7.0 +os-service-types>=1.7.0 os-xenapi==0.3.1 osc-lib==1.8.0 oslo.cache==1.26.0 @@ -85,7 +85,7 @@ oslosphinx==4.7.0 oslotest==3.2.0 osprofiler==2.3.0 ovs==2.8.0 -ovsdbapp==0.12.1 +ovsdbapp==1.0.0 Paste==2.0.2 PasteDeploy==1.5.0 pbr==4.0.0 @@ -97,7 +97,7 @@ positional==1.2.1 prettytable==0.7.2 psutil==3.2.2 pycadf==1.1.0 -pycodestyle==2.4.0 +pycodestyle<2.1,>=2.0 pycparser==2.18 pyflakes==0.8.1 Pygments==2.2.0 @@ -106,7 +106,7 @@ pylint==2.2.0 PyMySQL==0.7.6 pyparsing==2.1.0 pyperclip==1.5.27 -pyroute2==0.5.3 +pyroute2==0.5.7 python-dateutil==2.5.3 python-designateclient==2.7.0 python-editor==1.0.3 @@ -138,7 +138,7 @@ statsd==3.2.1 stestr==1.0.0 stevedore==1.20.0 Tempita==0.5.2 -tenacity==3.2.1 +tenacity==4.4.0 testrepository==0.0.18 testresources==2.0.0 testscenarios==0.4 diff --git a/networking_arista/db/migration/alembic_migrations/versions/queens/contract/39c2eeb67116_drop_aristaprovisionednets.py b/networking_arista/db/migration/alembic_migrations/versions/queens/contract/39c2eeb67116_drop_aristaprovisionednets.py index 4e7a9102..b3f7f526 100644 --- a/networking_arista/db/migration/alembic_migrations/versions/queens/contract/39c2eeb67116_drop_aristaprovisionednets.py +++ b/networking_arista/db/migration/alembic_migrations/versions/queens/contract/39c2eeb67116_drop_aristaprovisionednets.py @@ -12,6 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. # +from alembic import op """Drop AristaProvisionedNets @@ -27,8 +28,6 @@ down_revision = 'dc7bf9c1ab4d' branch_labels = None depends_on = None -from alembic import op - def upgrade(): op.drop_table('arista_provisioned_nets') diff --git a/networking_arista/db/migration/alembic_migrations/versions/queens/contract/941bad5630c1_drop_aristaprovisionedvms.py b/networking_arista/db/migration/alembic_migrations/versions/queens/contract/941bad5630c1_drop_aristaprovisionedvms.py index 9bef565f..366cf0cd 100644 --- a/networking_arista/db/migration/alembic_migrations/versions/queens/contract/941bad5630c1_drop_aristaprovisionedvms.py +++ b/networking_arista/db/migration/alembic_migrations/versions/queens/contract/941bad5630c1_drop_aristaprovisionedvms.py @@ -12,6 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. # +from alembic import op """Drop AristaProvisionedVms @@ -27,8 +28,6 @@ down_revision = '39c2eeb67116' branch_labels = None depends_on = None -from alembic import op - def upgrade(): op.drop_table('arista_provisioned_vms') diff --git a/networking_arista/db/migration/alembic_migrations/versions/queens/contract/dc7bf9c1ab4d_drop_aristaprovisionedtenants.py b/networking_arista/db/migration/alembic_migrations/versions/queens/contract/dc7bf9c1ab4d_drop_aristaprovisionedtenants.py index 0645487d..e05c9f38 100644 --- a/networking_arista/db/migration/alembic_migrations/versions/queens/contract/dc7bf9c1ab4d_drop_aristaprovisionedtenants.py +++ b/networking_arista/db/migration/alembic_migrations/versions/queens/contract/dc7bf9c1ab4d_drop_aristaprovisionedtenants.py @@ -12,6 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. # +from alembic import op """Drop AristaProvisionedTenants @@ -27,8 +28,6 @@ down_revision = '47036dc8697a' branch_labels = None depends_on = None -from alembic import op - def upgrade(): op.drop_table('arista_provisioned_tenants') diff --git a/networking_arista/l3Plugin/arista_l3_driver.py b/networking_arista/l3Plugin/arista_l3_driver.py index 3bbe439d..561ef608 100644 --- a/networking_arista/l3Plugin/arista_l3_driver.py +++ b/networking_arista/l3Plugin/arista_l3_driver.py @@ -235,8 +235,8 @@ class AristaL3Driver(object): except ValueError: self._raise_invalid_protected_vlans(vlan_string) - if not (const.MIN_VLAN_TAG <= min_vlan - <= max_vlan <= const.MAX_VLAN_TAG): + if not (const.MIN_VLAN_TAG <= min_vlan <= + max_vlan <= const.MAX_VLAN_TAG): self._raise_invalid_protected_vlans(vlan_string) vlans.update(range(min_vlan, max_vlan + 1)) return vlans diff --git a/networking_arista/l3Plugin/l3_arista.py b/networking_arista/l3Plugin/l3_arista.py index 6e39fcf6..9f4ecee2 100644 --- a/networking_arista/l3Plugin/l3_arista.py +++ b/networking_arista/l3Plugin/l3_arista.py @@ -157,10 +157,10 @@ class AristaL3SyncWorker(worker.BaseWorker): for server in self._servers: eos_svis = self.get_svis(server) eos_vlans = self.get_vlans(server) - svis_to_delete = (eos_svis - self._protected_vlans - - expected_vlans) - vlans_to_delete = (eos_vlans - self._protected_vlans - - expected_vlans) + svis_to_delete = (eos_svis - self._protected_vlans - + expected_vlans) + vlans_to_delete = (eos_vlans - self._protected_vlans - + expected_vlans) delete_cmds = [] delete_cmds.extend('no interface vlan %s' % svi for svi in svis_to_delete) diff --git a/networking_arista/ml2/mechanism_arista.py b/networking_arista/ml2/mechanism_arista.py index 952b35ee..a468abc9 100644 --- a/networking_arista/ml2/mechanism_arista.py +++ b/networking_arista/ml2/mechanism_arista.py @@ -349,8 +349,8 @@ class AristaDriver(driver_api.MechanismDriver): if (segment_type == n_const.TYPE_VXLAN and self.manage_fabric): if self._bind_fabric(context, segment): continue - elif (port.get(portbindings.VNIC_TYPE) - == portbindings.VNIC_BAREMETAL): + elif (port.get(portbindings.VNIC_TYPE) == + portbindings.VNIC_BAREMETAL): if (not self.managed_physnets or physnet in self.managed_physnets): if self._bind_baremetal_port(context, segment): diff --git a/networking_arista/tests/unit/ml2/mechanism_ha_simulator.py b/networking_arista/tests/unit/ml2/mechanism_ha_simulator.py index 14fa765e..520714d3 100644 --- a/networking_arista/tests/unit/ml2/mechanism_ha_simulator.py +++ b/networking_arista/tests/unit/ml2/mechanism_ha_simulator.py @@ -94,6 +94,6 @@ class AristaHAScaleSimulationDriver(AristaHASimulationDriver): 'host': host} if vif_type == 'ovs': self.plugin_rpc.update_device_up(self.context, **device_dict) - elif (port.get(portbindings.VNIC_TYPE) == 'normal' - and vif_type == 'unbound'): + elif (port.get(portbindings.VNIC_TYPE) == 'normal' and + vif_type == 'unbound'): self.plugin_rpc.update_device_down(self.context, **device_dict) diff --git a/networking_arista/tests/unit/ml2/ml2_test_base.py b/networking_arista/tests/unit/ml2/ml2_test_base.py index 6277549d..d2c966ee 100644 --- a/networking_arista/tests/unit/ml2/ml2_test_base.py +++ b/networking_arista/tests/unit/ml2/ml2_test_base.py @@ -167,8 +167,8 @@ class MechTestBase(test_plugin.Ml2PluginV2TestCase): trunk_rpc = self.trunk_plugin._rpc_backend._skeleton trunk_rpc.update_trunk_status( self.context, port['trunk_details']['trunk_id'], 'ACTIVE') - elif (port.get(portbindings.VNIC_TYPE) == 'normal' - and vif_type == 'unbound'): + elif (port.get(portbindings.VNIC_TYPE) == 'normal' and + vif_type == 'unbound'): device_dict = {'agent_id': agent_id, 'device': port['id'], 'host': port.get(portbindings.HOST_ID)} diff --git a/networking_arista/tests/unit/ml2/rpc/test_arista_json_rpc_wrapper.py b/networking_arista/tests/unit/ml2/rpc/test_arista_json_rpc_wrapper.py index cf4d962c..9d2f336a 100644 --- a/networking_arista/tests/unit/ml2/rpc/test_arista_json_rpc_wrapper.py +++ b/networking_arista/tests/unit/ml2/rpc/test_arista_json_rpc_wrapper.py @@ -73,7 +73,8 @@ class TestAristaJSONRPCWrapper(testlib_api.SqlTestCase): if unordered_dict_list: wrapper = functools.partial(_UnorderedDictList, sort_key='id') else: - wrapper = lambda x: x + def wrapper(x): + return x expected_calls = [ mock.call(c[0], c[1], *(wrapper(d) for d in c[2:])) for c in calls diff --git a/requirements.txt b/requirements.txt index 1fec9b60..9f2f39db 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ pbr>=4.0.0 # Apache-2.0 alembic>=0.8.10 # MIT -neutron-lib>=1.29.1 # Apache-2.0 +neutron-lib>=2.0.0 # Apache-2.0 oslo.i18n>=3.15.3 # Apache-2.0 oslo.config>=5.2.0 # Apache-2.0 oslo.log>=3.36.0 # Apache-2.0 diff --git a/test-requirements.txt b/test-requirements.txt index 67484973..adfcc890 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,7 +1,7 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 +hacking>=1.1.0,<1.2.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 mock>=3.0.0 # BSD diff --git a/tox.ini b/tox.ini index e3dcd044..ccdbda5c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27-dev,py3-dev,pep8-dev +envlist = py3-dev,pep8-dev minversion = 2.0 skipsdist = True @@ -23,12 +23,6 @@ commands = commands = pip install -q -e "git+https://git.openstack.org/openstack/neutron#egg=neutron" -[testenv:py27-dev] -commands = - {[testenv:dev]commands} - pip freeze - stestr run {posargs} - [testenv:py3-dev] basepython = python3 commands =