fix tox env issues

fix tox env issues by:
- update pbr version
- using oslo service's loopingcall
- fix py27 failed UT case

Change-Id: I87501ff2a3cd82126abacc03048a1d0048a57710
changes/64/203464/1
Huang Rui 7 years ago
parent 58f7a8d243
commit 7d5428d967
  1. 1
      .gitignore
  2. 2
      neutron/plugins/zvm/agent/zvm_neutron_agent.py
  3. 6
      neutron/tests/unit/plugins/zvm/test_zvm_utils.py
  4. 4
      requirements.txt

1
.gitignore vendored

@ -4,6 +4,7 @@
.coverage
.project
.pydevproject
.python-version
.settings
.testrepository
.tox

@ -20,13 +20,13 @@ import time
from oslo_config import cfg
from oslo_log import log as logging
from oslo_service import loopingcall
from neutron.agent import rpc as agent_rpc
from neutron.common import config as common_config
from neutron.common import constants as q_const
from neutron.common import topics
from neutron import context
from neutron.openstack.common import loopingcall
from neutron.plugins.common import constants as p_const
from neutron.i18n import _, _LE, _LI
from neutron.plugins.zvm.agent import zvm_network

@ -156,7 +156,7 @@ class TestZVMUtils(base.BaseTestCase):
'&password=fake_xcat_password&format=json')
body = [('command=/opt/zhcp/bin/smcli'
' Virtual_Network_Vswitch_Query -T zhcp_user -s fakevsw1')]
xcat_req.assert_any_called('PUT', url, body)
xcat_req.assert_any_call('PUT', url, body)
def test_add_vswitch_exist_not_changed(self):
self._utils.get_zhcp_userid = mock.MagicMock(
@ -210,9 +210,9 @@ class TestZVMUtils(base.BaseTestCase):
'&password=fake_xcat_password&format=json')
body = [('command=/opt/zhcp/bin/smcli'
' Virtual_Network_Vswitch_Create -T zhcp_user -n fakevsw1'
' -r 1000 -c 1 -q 8 -e 0 -t 2 -v 1'
' -r 1000 -c 1 -q 8 -e 0 -t 2 -v f-a'
' -p 1 -u 1 -G 2 -V 1')]
xcat_req.assert_any_called('PUT', url, body)
xcat_req.assert_any_call('PUT', url, body)
def test_set_vswitch_rdev(self):
res = {'errorcode': [['0']]}

@ -1,4 +1,4 @@
pbr>=0.5.21,<1.0
pbr<2.0,>=0.11
oslo.config>=1.9.0 # Apache-2.0
oslo.log>=0.1.0 # Apache-2.0
oslo.serialization>=1.0.0 # Apache-2.0
oslo.serialization>=1.0.0 # Apache-2.0

Loading…
Cancel
Save