Fix requirements for Queens branch
Change-Id: Ifff24bcf1c8fffbb37fb6efbaea0d8316fe5934c
This commit is contained in:
parent
ef2e1aaa60
commit
a064a02fba
|
@ -94,7 +94,8 @@ disable=
|
|||
too-many-statements,
|
||||
cyclic-import,
|
||||
no-name-in-module,
|
||||
bad-super-call
|
||||
bad-super-call,
|
||||
inconsistent-return-statements
|
||||
|
||||
[BASIC]
|
||||
# Variable names can be 1 to 31 characters long, with lowercase and underscores
|
||||
|
|
17
.zuul.yaml
17
.zuul.yaml
|
@ -5,7 +5,6 @@
|
|||
- openstack-python35-jobs-neutron
|
||||
check:
|
||||
jobs:
|
||||
- vmware-tox-lower-constraints
|
||||
- openstack-tox-pep8:
|
||||
required-projects:
|
||||
- openstack/neutron
|
||||
|
@ -44,7 +43,6 @@
|
|||
gate:
|
||||
queue: vmware-nsx
|
||||
jobs:
|
||||
- vmware-tox-lower-constraints
|
||||
- openstack-tox-pep8:
|
||||
required-projects:
|
||||
- openstack/neutron
|
||||
|
@ -80,18 +78,3 @@
|
|||
- openstack/neutron-dynamic-routing
|
||||
- openstack/neutron-vpnaas
|
||||
- x/tap-as-a-service
|
||||
|
||||
- job:
|
||||
name: vmware-tox-lower-constraints
|
||||
parent: openstack-tox-lower-constraints
|
||||
timeout: 5400
|
||||
required-projects:
|
||||
- openstack/neutron
|
||||
- x/networking-l2gw
|
||||
- openstack/networking-sfc
|
||||
- openstack/neutron-lbaas
|
||||
- x/vmware-nsxlib
|
||||
- openstack/neutron-fwaas
|
||||
- openstack/neutron-dynamic-routing
|
||||
- openstack/neutron-vpnaas
|
||||
- x/tap-as-a-service
|
||||
|
|
|
@ -253,7 +253,7 @@ class VSMClient(object):
|
|||
# Query all firewall sections
|
||||
response = self.get()
|
||||
# Get layer3 sections related to security group
|
||||
if response.status_code is 200:
|
||||
if response.status_code == 200:
|
||||
l3_sections = response.json()['layer3Sections']['layer3Sections']
|
||||
# do not delete the default section, or sections created by the
|
||||
# service composer
|
||||
|
@ -289,7 +289,7 @@ class VSMClient(object):
|
|||
self.__set_endpoint("/services/securitygroup/scope/globalroot-0")
|
||||
# Query all security groups
|
||||
response = self.get()
|
||||
if response.status_code is 200:
|
||||
if response.status_code == 200:
|
||||
sg_all = response.json()
|
||||
else:
|
||||
print("ERROR: wrong response status code! Exiting...")
|
||||
|
@ -323,7 +323,7 @@ class VSMClient(object):
|
|||
self.__set_endpoint("/services/spoofguard/policies/")
|
||||
# Query all spoofguard policies
|
||||
response = self.get()
|
||||
if response.status_code is not 200:
|
||||
if response.status_code == 200:
|
||||
print("ERROR: Faield to get spoofguard policies")
|
||||
return
|
||||
sgp_all = response.json()
|
||||
|
@ -395,7 +395,7 @@ def ceil(a, b):
|
|||
if b == 0:
|
||||
return 0
|
||||
div = a / b
|
||||
mod = 0 if a % b is 0 else 1
|
||||
mod = 0 if a % b == 0 else 1
|
||||
return int(div + mod)
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
# 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.
|
||||
sphinx!=1.6.6,>=1.6.2 # BSD
|
||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
|
||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
|
||||
oslosphinx>=4.7.0 # Apache-2.0
|
||||
openstackdocstheme>=1.18.1 # Apache-2.0
|
||||
oslotest>=3.2.0 # Apache-2.0
|
||||
reno>=2.5.0 # Apache-2.0
|
||||
|
||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
testresources>=2.0.0 # Apache-2.0/BSD
|
||||
testscenarios>=0.4 # Apache-2.0/BSD
|
||||
oslotest>=3.2.0 # Apache-2.0
|
||||
|
|
|
@ -1,154 +1,50 @@
|
|||
alabaster==0.7.10
|
||||
alembic==0.8.10
|
||||
amqp==2.1.1
|
||||
appdirs==1.4.3
|
||||
asn1crypto==0.23.0
|
||||
Babel==2.3.4
|
||||
beautifulsoup4==4.6.0
|
||||
cachetools==2.0.0
|
||||
cffi==1.8.2
|
||||
cliff==2.8.0
|
||||
cmd2==0.8.0
|
||||
contextlib2==0.4.0
|
||||
amqp==2.5.0
|
||||
coverage==4.0
|
||||
debtcollector==1.2.0
|
||||
decorator==3.4.0
|
||||
deprecation==1.0
|
||||
docutils==0.11
|
||||
dogpile.cache==0.6.2
|
||||
dulwich==0.15.0
|
||||
eventlet==0.18.2
|
||||
extras==1.0.0
|
||||
fasteners==0.7.0
|
||||
fixtures==3.0.0
|
||||
flake8==2.5.5
|
||||
flake8-import-order==0.12
|
||||
future==0.16.0
|
||||
futurist==1.2.0
|
||||
greenlet==0.4.10
|
||||
hacking==0.12.0
|
||||
flake8-import-order==0.15
|
||||
hacking==2.0.0
|
||||
httplib2==0.9.1
|
||||
idna==2.6
|
||||
imagesize==0.7.1
|
||||
iso8601==0.1.11
|
||||
Jinja2==2.10
|
||||
jmespath==0.9.0
|
||||
jsonpatch==1.16
|
||||
jsonpointer==1.13
|
||||
jsonschema==2.6.0
|
||||
keystonemiddleware==4.17.0
|
||||
kombu==4.0.0
|
||||
linecache2==1.0.0
|
||||
logilab-common==1.4.1
|
||||
logutils==0.3.5
|
||||
Mako==0.4.0
|
||||
MarkupSafe==1.0
|
||||
mccabe==0.2.1
|
||||
mock==2.0.0
|
||||
monotonic==0.6
|
||||
mox3==0.20.0
|
||||
msgpack-python==0.4.0
|
||||
munch==2.1.0
|
||||
netaddr==0.7.18
|
||||
netifaces==0.10.4
|
||||
neutron-lib==1.13.0
|
||||
neutron-lbaas===12.0.0
|
||||
openstackdocstheme==1.18.1
|
||||
openstacksdk==0.11.2
|
||||
os-client-config==1.28.0
|
||||
os-service-types==1.2.0
|
||||
os-testr==1.0.0
|
||||
os-xenapi==0.3.1
|
||||
osc-lib==1.8.0
|
||||
oslo.cache==1.26.0
|
||||
oslo.concurrency==3.26.0
|
||||
oslo.config==5.2.0
|
||||
oslo.concurrency==3.25.0
|
||||
oslo.config==5.1.0
|
||||
oslo.context==2.19.2
|
||||
oslo.db==4.27.0
|
||||
oslo.i18n==3.15.3
|
||||
oslo.log==3.36.0
|
||||
oslo.messaging==5.29.0
|
||||
oslo.middleware==3.31.0
|
||||
oslo.policy==1.30.0
|
||||
oslo.privsep==1.23.0
|
||||
oslo.reports==1.18.0
|
||||
oslo.rootwrap==5.8.0
|
||||
oslo.serialization==2.18.0
|
||||
oslo.service==1.24.0
|
||||
oslo.utils==3.33.0
|
||||
oslo.versionedobjects==1.31.2
|
||||
oslo.vmware==2.17.0
|
||||
oslotest==3.2.0
|
||||
osprofiler==1.4.0
|
||||
ovs==2.8.0
|
||||
ovsdbapp==0.10.0
|
||||
paramiko==2.0.0
|
||||
Paste==2.0.2
|
||||
PasteDeploy==1.5.0
|
||||
paramiko==2.4.3
|
||||
pbr==2.0.0
|
||||
pecan==1.0.0
|
||||
pep8==1.5.7
|
||||
pika==0.10.0
|
||||
pika-pool==0.1.3
|
||||
positional==1.2.1
|
||||
prettytable==0.7.1
|
||||
psycopg2==2.6.2
|
||||
psutil==3.2.2
|
||||
pycadf==1.1.0
|
||||
pycodestyle==2.3.1
|
||||
pycparser==2.18
|
||||
pyflakes==0.8.1
|
||||
Pygments==2.2.0
|
||||
pyinotify==0.9.6
|
||||
pylint==1.7.1
|
||||
pyparsing==2.1.0
|
||||
pyperclip==1.5.27
|
||||
python-dateutil==2.5.3
|
||||
python-designateclient==2.7.0
|
||||
python-editor==1.0.3
|
||||
python-keystoneclient==3.8.0
|
||||
python-mimeparse==1.6.0
|
||||
python-neutronclient==6.7.0
|
||||
python-novaclient==9.1.0
|
||||
python-openstackclient==3.12.0
|
||||
python-subunit==1.0.0
|
||||
pytz==2013.6
|
||||
PyMySQL==0.7.6
|
||||
PyYAML==3.12
|
||||
prettytable==0.7.2
|
||||
psycopg2==2.8
|
||||
PyMySQL==0.7.10
|
||||
reno==2.5.0
|
||||
repoze.lru==0.7
|
||||
requests==2.14.2
|
||||
requests-mock==1.2.0
|
||||
requestsexceptions==1.2.0
|
||||
rfc3986==0.3.1
|
||||
Routes==2.3.1
|
||||
ryu==4.14
|
||||
simplejson==3.5.1
|
||||
six==1.10.0
|
||||
snowballstemmer==1.2.1
|
||||
Sphinx==1.6.5
|
||||
sphinxcontrib-websupport==1.0.1
|
||||
SQLAlchemy==1.0.10
|
||||
sqlalchemy-migrate==0.11.0
|
||||
sqlparse==0.2.2
|
||||
statsd==3.2.1
|
||||
Sphinx==1.6.2
|
||||
SQLAlchemy==1.0.19
|
||||
stestr==1.0.0
|
||||
stevedore==1.20.0
|
||||
tempest==17.1.0
|
||||
Tempita==0.5.2
|
||||
tenacity==4.4.0
|
||||
testrepository==0.0.18
|
||||
testresources==2.0.0
|
||||
testscenarios==0.4
|
||||
testtools==2.2.0
|
||||
tinyrpc==0.6
|
||||
traceback2==1.4.0
|
||||
tooz==1.58.0
|
||||
unittest2==1.1.0
|
||||
urllib3==1.21.1
|
||||
vine==1.1.4
|
||||
vmware-nsxlib==13.1.0
|
||||
waitress==1.1.0
|
||||
WebOb==1.7.1
|
||||
WebTest==2.0.27
|
||||
wrapt==1.7.0
|
||||
# Neutron related projects
|
||||
vmware-nsxlib==12.0.4
|
||||
neutron==12.0.6
|
||||
networking-l2gw==12.0.1
|
||||
networking-sfc==6.0.0
|
||||
neutron-fwaas==12.0.2
|
||||
neutron-vpnaas==12.0.1
|
||||
neutron-dynamic-routing==12.0.1
|
||||
|
|
|
@ -7,7 +7,7 @@ enum34>=1.0.4;python_version=='2.7' or python_version=='2.6' or python_version==
|
|||
eventlet!=0.18.3,!=0.20.1,<0.21.0,>=0.18.2 # MIT
|
||||
httplib2>=0.9.1 # MIT
|
||||
netaddr>=0.7.18 # BSD
|
||||
tenacity>=3.2.1 # Apache-2.0
|
||||
tenacity>=4.4.0 # Apache-2.0
|
||||
SQLAlchemy!=1.1.5,!=1.1.6,!=1.1.7,!=1.1.8,>=1.0.10 # MIT
|
||||
six>=1.10.0 # MIT
|
||||
stevedore>=1.20.0 # Apache-2.0
|
||||
|
@ -24,7 +24,7 @@ oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
|
|||
oslo.service!=1.28.1,>=1.24.0 # Apache-2.0
|
||||
oslo.utils>=3.33.0 # Apache-2.0
|
||||
oslo.vmware>=2.17.0 # Apache-2.0
|
||||
PrettyTable<0.8,>=0.7.1 # BSD
|
||||
PrettyTable<0.8,>=0.7.2 # BSD
|
||||
tooz>=1.58.0 # Apache-2.0
|
||||
decorator>=3.4.0 # BSD
|
||||
mock>=2.0.0 # BSD
|
||||
|
@ -32,11 +32,11 @@ mock>=2.0.0 # BSD
|
|||
|
||||
# These repos are installed from git in OpenStack CI if the job
|
||||
# configures them as required-projects
|
||||
neutron<13.0.0 # Apache-2.0
|
||||
networking-l2gw<13.0.0 # Apache-2.0
|
||||
networking-sfc<7.0.0 # Apache-2.0
|
||||
neutron-lbaas<13.0.0 # Apache-2.0
|
||||
neutron-fwaas<13.0.0 # Apache-2.0
|
||||
neutron-vpnaas<13.0.0 # Apache-2.0
|
||||
neutron-dynamic-routing<13.0.0 # Apache-2.0
|
||||
vmware-nsxlib<14.0.0 # Apache-2.0
|
||||
neutron>=12.0.6,<13.0.0 # Apache-2.0
|
||||
networking-l2gw>=12.0.1,<13.0.0 # Apache-2.0
|
||||
networking-sfc>=6.0.0,<7.0.0 # Apache-2.0
|
||||
neutron-lbaas>=12.0.0,<13.0.0 # Apache-2.0
|
||||
neutron-fwaas>=12.0.2,<13.0.0 # Apache-2.0
|
||||
neutron-vpnaas>=12.0.1,<13.0.0 # Apache-2.0
|
||||
neutron-dynamic-routing>=12.0.1,<13.0.0 # Apache-2.0
|
||||
vmware-nsxlib>=12.0.4,<14.0.0 # Apache-2.0
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# 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>=2.0.0,<3.0.0 # Apache-2.0
|
||||
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
flake8-import-order==0.12 # LGPLv3
|
||||
flake8-import-order==0.15,<0.17.1 # LGPLv3
|
||||
mock>=2.0.0 # BSD
|
||||
|
||||
psycopg2>=2.6.2 # LGPL/ZPL
|
||||
|
@ -18,8 +18,8 @@ testresources>=2.0.0 # Apache-2.0/BSD
|
|||
testtools>=2.2.0 # MIT
|
||||
testscenarios>=0.4 # Apache-2.0/BSD
|
||||
WebTest>=2.0.27 # MIT
|
||||
bandit>=1.1.0 # Apache-2.0
|
||||
tempest>=17.1.0 # Apache-2.0
|
||||
pylint==1.7.6 # GPLv2
|
||||
pylint==1.9.2 # GPLv2
|
||||
isort>=4.2.5,<=4.3.0
|
||||
python-openstackclient>=3.12.0 # Apache-2.0
|
||||
requests-mock>=1.1.0 # Apache-2.0
|
||||
|
|
5
tox.ini
5
tox.ini
|
@ -5,6 +5,7 @@ skipsdist = True
|
|||
|
||||
[testenv]
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
EDITOR=vi
|
||||
PYTHONWARNINGS=default::DeprecationWarning
|
||||
passenv = TRACE_FAILONLY GENERATE_HASHES http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
||||
usedevelop = True
|
||||
|
@ -144,11 +145,13 @@ commands = sphinx-build -b html doc/source doc/build/html
|
|||
# H404 multi line docstring should start with a summary
|
||||
# H405 multi line docstring summary not separated with an empty line
|
||||
# H904 Wrap long lines in parentheses instead of a backslash
|
||||
# I202 Additional newline in a group of imports
|
||||
# W504 line break after binary operator
|
||||
# TODO(dougwig) -- uncomment this to test for remaining linkages
|
||||
# N530 direct neutron imports not allowed
|
||||
# N531 translations hints
|
||||
# TODO(boden): fix warnings for W503,E731,E266,E402
|
||||
ignore = E125,E126,E128,E129,E265,H305,H307,H404,H405,H904,N530,N531,W503,E731,E266,E402
|
||||
ignore = E125,E126,E128,E129,E265,H305,H307,H404,H405,H904,N530,N531,W503,E731,E266,E402,I202,W504
|
||||
show-source = true
|
||||
builtins = _
|
||||
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,.ropeproject
|
||||
|
|
|
@ -151,5 +151,6 @@ class EventletApiClient(base.ApiClientBase):
|
|||
|
||||
return cookie
|
||||
|
||||
|
||||
# Register as subclass.
|
||||
base.ApiClientBase.register(EventletApiClient)
|
||||
|
|
|
@ -49,6 +49,7 @@ class NetworkTypes(object):
|
|||
VLAN = 'vlan'
|
||||
BRIDGE = 'bridge'
|
||||
|
||||
|
||||
# Attribute Map for Network Gateway Resource
|
||||
# TODO(salvatore-orlando): add admin state as other neutron resources
|
||||
RESOURCE_ATTRIBUTE_MAP = {
|
||||
|
|
|
@ -108,6 +108,7 @@ def convert_to_unsigned_int_or_none_max_63(val):
|
|||
# compatibility perspective to change the default value for DSCP in order to
|
||||
# avoid this peculiar behaviour
|
||||
|
||||
|
||||
RESOURCE_ATTRIBUTE_MAP = {
|
||||
'qos_queues': {
|
||||
'id': {'allow_post': False, 'allow_put': False,
|
||||
|
|
|
@ -84,9 +84,9 @@ def format_exception(etype, e, exception_locals):
|
|||
"""
|
||||
msg = [_("Error. %(type)s exception: %(exc)s.") %
|
||||
{'type': etype, 'exc': e}]
|
||||
l = dict((k, v) for k, v in six.iteritems(exception_locals)
|
||||
data = dict((k, v) for k, v in six.iteritems(exception_locals)
|
||||
if k != 'request')
|
||||
msg.append(_("locals=[%s]") % str(l))
|
||||
msg.append(_("locals=[%s]") % str(data))
|
||||
return ' '.join(msg)
|
||||
|
||||
|
||||
|
|
|
@ -933,7 +933,7 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
|||
if self._vcm:
|
||||
try:
|
||||
h, switch = self.nsx_v.vcns.get_vdn_switch(dvs_id)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
LOG.warning('DVS %s not registered on NSX. Unable to '
|
||||
'update teaming for network %s',
|
||||
dvs_id, net_id)
|
||||
|
|
|
@ -343,6 +343,7 @@ def nsx_fix_name_mismatch(resource, event, trigger, **kwargs):
|
|||
'Edge %s has no backup prefix on NSX', edge_id)
|
||||
return
|
||||
|
||||
|
||||
registry.subscribe(nsx_list_backup_edges,
|
||||
constants.BACKUP_EDGES,
|
||||
shell.Operations.LIST.value)
|
||||
|
|
|
@ -327,7 +327,7 @@ def change_edge_ha(ha, edge_id):
|
|||
'enabled': ha}
|
||||
try:
|
||||
nsxv.enable_ha(edge_id, request)
|
||||
except nsxv_exceptions.ResourceNotFound as e:
|
||||
except nsxv_exceptions.ResourceNotFound:
|
||||
LOG.error("Edge %s not found", edge_id)
|
||||
except exceptions.NeutronException as e:
|
||||
LOG.error("%s", str(e))
|
||||
|
@ -353,7 +353,7 @@ def change_edge_syslog(properties):
|
|||
edge_id = properties.get('edge-id')
|
||||
try:
|
||||
nsxv.update_edge_syslog(edge_id, request)
|
||||
except nsxv_exceptions.ResourceNotFound as e:
|
||||
except nsxv_exceptions.ResourceNotFound:
|
||||
LOG.error("Edge %s not found", edge_id)
|
||||
except exceptions.NeutronException as e:
|
||||
LOG.error("%s", str(e))
|
||||
|
@ -362,7 +362,7 @@ def change_edge_syslog(properties):
|
|||
def delete_edge_syslog(edge_id):
|
||||
try:
|
||||
nsxv.delete_edge_syslog(edge_id)
|
||||
except nsxv_exceptions.ResourceNotFound as e:
|
||||
except nsxv_exceptions.ResourceNotFound:
|
||||
LOG.error("Edge %s not found", edge_id)
|
||||
except exceptions.NeutronException as e:
|
||||
LOG.error("%s", str(e))
|
||||
|
@ -404,7 +404,7 @@ def change_edge_loglevel(properties):
|
|||
try:
|
||||
edge_utils.update_edge_loglevel(nsxv, edge_id, module, level)
|
||||
|
||||
except nsxv_exceptions.ResourceNotFound as e:
|
||||
except nsxv_exceptions.ResourceNotFound:
|
||||
LOG.error("Edge %s not found", edge_id)
|
||||
except exceptions.NeutronException as e:
|
||||
LOG.error("%s", str(e))
|
||||
|
@ -422,7 +422,7 @@ def change_edge_appliance_size(properties):
|
|||
try:
|
||||
nsxv.change_edge_appliance_size(
|
||||
properties.get('edge-id'), size)
|
||||
except nsxv_exceptions.ResourceNotFound as e:
|
||||
except nsxv_exceptions.ResourceNotFound:
|
||||
LOG.error("Edge %s not found", properties.get('edge-id'))
|
||||
except exceptions.NeutronException as e:
|
||||
LOG.error("%s", str(e))
|
||||
|
@ -462,7 +462,7 @@ def change_edge_appliance(edge_id):
|
|||
request = {'appliances': appliances, 'applianceSize': size}
|
||||
try:
|
||||
nsxv.change_edge_appliance(edge_id, request)
|
||||
except nsxv_exceptions.ResourceNotFound as e:
|
||||
except nsxv_exceptions.ResourceNotFound:
|
||||
LOG.error("Edge %s not found", edge_id)
|
||||
except exceptions.NeutronException as e:
|
||||
LOG.error("%s", str(e))
|
||||
|
@ -503,7 +503,7 @@ def change_edge_appliance_reservations(properties):
|
|||
request = {'appliances': appliances}
|
||||
try:
|
||||
nsxv.change_edge_appliance(edge_id, request)
|
||||
except nsxv_exceptions.ResourceNotFound as e:
|
||||
except nsxv_exceptions.ResourceNotFound:
|
||||
LOG.error("Edge %s not found", edge_id)
|
||||
except exceptions.NeutronException as e:
|
||||
LOG.error("%s", str(e))
|
||||
|
|
|
@ -67,6 +67,7 @@ class Operations(enum.Enum):
|
|||
SHOW = 'show'
|
||||
VALIDATE = 'validate'
|
||||
|
||||
|
||||
ops = [op.value for op in Operations]
|
||||
|
||||
|
||||
|
|
|
@ -354,9 +354,9 @@ class LsnManagerTestCase(base.BaseTestCase):
|
|||
|
||||
def _test_lsn_delete_by_network_with_exc(self, exc):
|
||||
self.mock_lsn_api.lsn_for_network_get.side_effect = exc
|
||||
with mock.patch.object(lsn_man.LOG, 'warning') as l:
|
||||
with mock.patch.object(lsn_man.LOG, 'warning') as log_mock:
|
||||
self.manager.lsn_delete_by_network(mock.ANY, self.net_id)
|
||||
self.assertEqual(1, l.call_count)
|
||||
self.assertEqual(1, log_mock.call_count)
|
||||
|
||||
def test_lsn_delete_by_network_with_not_found(self):
|
||||
self._test_lsn_delete_by_network_with_exc(n_exc.NotFound)
|
||||
|
@ -430,10 +430,10 @@ class LsnManagerTestCase(base.BaseTestCase):
|
|||
|
||||
def _test_lsn_port_delete_with_exc(self, exc):
|
||||
self.mock_lsn_api.lsn_port_delete.side_effect = exc
|
||||
with mock.patch.object(lsn_man.LOG, 'warning') as l:
|
||||
with mock.patch.object(lsn_man.LOG, 'warning') as log_mock:
|
||||
self.manager.lsn_port_delete(mock.ANY, mock.ANY, mock.ANY)
|
||||
self.assertEqual(1, self.mock_lsn_api.lsn_port_delete.call_count)
|
||||
self.assertEqual(1, l.call_count)
|
||||
self.assertEqual(1, log_mock.call_count)
|
||||
|
||||
def test_lsn_port_delete_with_not_found(self):
|
||||
self._test_lsn_port_delete_with_exc(n_exc.NotFound)
|
||||
|
@ -658,9 +658,9 @@ class LsnManagerTestCase(base.BaseTestCase):
|
|||
def test_lsn_port_dispose_api_error(self):
|
||||
self.mock_lsn_api.lsn_port_delete.side_effect = (
|
||||
exception.NsxApiException)
|
||||
with mock.patch.object(lsn_man.LOG, 'warning') as l:
|
||||
with mock.patch.object(lsn_man.LOG, 'warning') as log_mock:
|
||||
self.manager.lsn_port_dispose(mock.ANY, self.net_id, self.mac)
|
||||
self.assertEqual(1, l.call_count)
|
||||
self.assertEqual(1, log_mock.call_count)
|
||||
|
||||
def test_lsn_port_host_conf(self):
|
||||
with mock.patch.object(self.manager,
|
||||
|
|
|
@ -40,7 +40,6 @@ NVP_INI_DEPR_PATH = vmware.get_fake_conf('nvp.ini.full.test')
|
|||
class NSXClusterTest(base.BaseTestCase):
|
||||
|
||||
cluster_opts = {'default_tz_uuid': uuidutils.generate_uuid(),
|
||||
'default_l2_gw_service_uuid': uuidutils.generate_uuid(),
|
||||
'default_l2_gw_service_uuid': uuidutils.generate_uuid(),
|
||||
'nsx_user': 'foo',
|
||||
'nsx_password': 'bar',
|
||||
|
|
|
@ -946,8 +946,7 @@ class TestPortsV2(test_plugin.TestPortsV2, NsxV3PluginTestCaseMixin,
|
|||
'device_id': 'fake_device',
|
||||
'device_owner': 'fake_owner',
|
||||
'fixed_ips': [{'subnet_id': s1['subnet']['id']}]
|
||||
}
|
||||
}
|
||||
}}
|
||||
count = 1
|
||||
address_pairs = []
|
||||
while count < 129:
|
||||
|
|
Loading…
Reference in New Issue