Synchronize requirements with neutron

This commit is removing support fro python2 in networking-arista and
synchrinizing the package requirements with neutron. Because of this
some code changes have been performed in order for the pep8 test to pass

Change-Id: I829d7eec72cb22d1142782894b9833769f432a66
changes/29/705129/2
Alin Iorga 2020-01-30 14:41:59 -08:00
parent ccde7a48be
commit 9b721aa315
14 changed files with 28 additions and 38 deletions

View File

@ -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

View File

@ -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

View File

@ -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')

View File

@ -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')

View File

@ -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')

View File

@ -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

View File

@ -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)

View File

@ -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):

View File

@ -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)

View File

@ -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)}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 =