When we request something from SSL wrapped app using py3 and we do
not get answer at all. In case of unit tests we face test timeout.
So, skip these tests until related bug is fixed. This also enables
other test cases in this module.
Related-Bug: #1482633
Partially-Implements: blueprint goal-python35
Change-Id: I4933e47b0759716f387ec26e3bd8a4e725eb4f91
The tests for XenAPI plugins were introduced with change [1].
This change also appended them to the python3 test whitelist,
as the functionality could only be executed on python2.4 environment.
The aforementioned changes were removed with change [2], but
the whitelist item was left behind. This change removes the obsolete
line.
[1] 2aa81e9ef6d04f2fdf1c69e16ceeef156cefedfa
[2] 21149582ff944585fb0a815ebe9515c1ec38eb7f
Change-Id: Ibc15e9a06adf34512eda904d0bb3eba1eed04784
Enable unstable test one by one and figure out failure easily when
it fails again.
Partially-Implements: blueprint goal-python35
Change-Id: I6c373abff887fc44add59a6dbb6620af0340915d
Enable unstable test one by one and figure out failure easily when
it fails again.
Partially-Implements: blueprint goal-python35
Change-Id: I15d5562b46bb87cd6849a01670f81d31418bf971
* we can't compare str and int in Python 3, and code make sure
product_version must be a tuple of 3 integers[1], so we can remove
invalid tests.
* Set correct exception type to catch
[1]3304115b73/nova/virt/xenapi/client/session.py (L173)
Partially-Implements: blueprint goal-python35
Change-Id: I0ba1e1f2ef37ade9bdc6d19066e4a33a07246416
We can't compare int or None with str on Python 3, need convert str
into int or just skip. We do this comprehensively for vlan by ensuring
that it is initially parsed as an int.
Partially-Implements: blueprint goal-python35
Co-Authored-By: Matthew Booth <mbooth@redhat.com>
Change-Id: I000839a341aa6164343b6c44e29a8b7d79084b73
* Replace filter() with a list-comprehension to get a list on Python 3
* Decode proecess_input if it is bytes according to recent change in
1a2db4cdc00f9225411f8d089c9c7d70fa08928a
Partially-Implements: blueprint goal-python35
Change-Id: Ic7e087c165074df7aaae082e4477fffd9f241e35
* Don't compare mock with int on Python 3
* Can't compare None with int on Python 3
* Ensure libvirt secret is bytes
Partially-Implements: blueprint goal-python35
Change-Id: I564039f48f7b41798bb71768b6eeaf5d2f854a9c
It takes about 2.5 seconds to run this test, seems the issue
has gone. Not sure this is fixed by eventlet now. Let's enable
it now and figure out root cause and fix the issue.
Related-Bug: #1558105
Partially-Implements: blueprint goal-python35
Change-Id: I6826a4ba3ea5656471cdffbaa2883b522b4b22f0
* Use encode_utils.safe_decode from oslo.utils
to decode result of urllib.parse.unquote(cidr)
Partially-Implements: blueprint goal-python35
Change-Id: If139d093f8951f59753c06a88a59b4fb2f878940
Use base64 module from oslo.serialization to handle
base64 encoding and decoding.
Partially-Implements: blueprint goal-python35
Change-Id: I973c4932f5f71e09d4b6c4b3077bdc5119af41dc
Enable unstable test one by one and figure out failure easily when
it fails again.
Partially-Implements: blueprint goal-python35
Change-Id: I2fb79178184cb9b300023e38a414621a0ca6ccbc
Enable unstable test one by one and figure out failure easily when
it fails again.
Partially-Implements: blueprint goal-python35
Change-Id: Ie396241de6e677cdb25778c1dfb2307b40156bfa
Method pprint.pformat(OrderedDict)'s output is different on Python 2
and Python 3. Its outputs equals "DictMatches({0})".format(OrderedDict)
only on Python 2. Let's just use pprint.pformat.
Partially-Implements: blueprint goal-python35
Change-Id: I220a7edf4f8f35ecb3763e4e3817c6c6c024efd9
ldapdns module is used for nova-network which was depecated, and
Python-ldap sometimes behaves poorly when receiving unicode strings,
so we can just skip tests if using Python3.
Partially-Implements: blueprint goal-python35
Change-Id: I9fa0b6b0d397318b52f0fe3784d6e7047aefaab2
* Stop explicitly encoding strings we pass to rbd: the library
supports multiple string types now.
* We mock module rbd from rbd_utils.py, also need set module rbd's
specific exceptions with object inherit from BaseException to avoid
TypeError like: 'TypeError: catching classes that do not inherit from
BaseException is not allowed'
Partially-Implements: blueprint goal-python35
Co-Authored-By: Davanum Srinivas <davanum@gmail.com>
Change-Id: I3eec213ad9bc13f0a371a5c4f28d3df377796125
Add optional parameters 'limit' and 'marker' to the
os-simple-tenant-usage endpoints for pagaination.
/os-simple-tenant-usage?limit={limit}&marker={instance_uuid}
/os-simple-tenant-usage/{tenant}?limit={limit}&marker={instance_uuid}
The aggregate usage totals may no longer reflect all instances for a
tenant, but rather just the instances for a given page. API consumers
will need to stitch the aggregate data back together (add the totals)
if a tenant's instances span several pages.
Implements blueprint paginate-simple-tenant-usage
Change-Id: Ic8e9f869f1b855f968967bedbf77542f287f26c0
This test cases was removed during ec2 removal, just remove it
from tests-py3.txt.
Partially-Implements: blueprint goal-python35
Change-Id: I2de52025b517dcd75c60c3f77c4eafbbfd21c52c
This is follow-up of dda8d45c0d6ba53d20f6d00c6cc466a9b2c9634b,
just enable following tests:
nova.tests.unit.virt.test_virt_drivers.FakeConnectionTestCase
nova.tests.unit.virt.test_virt_drivers.LibvirtConnTestCase
Implements: blueprint goal-python35
Change-Id: I8c3eb6e072e1771581db83e6260eecb152446a03
os.listdir also accepts file descriptor on Python 3,
need make sure path is string in _fake_listdir_nbd_devices.
Partially-Implements: blueprint goal-python35
Change-Id: I882d3feaa6a68212b6ce3bea4aedbe85dcbd5092
This is follow-up of a3382747209fe12455,
these tests can run on Python 3, just enable them:
nova.tests.unit.api.openstack.compute.test_extended_availability_zone.ExtendedAvailabilityZoneTestV21
nova.tests.unit.api.openstack.compute.test_hide_server_addresses.HideServerAddressesTestV21
nova.tests.unit.api.openstack.compute.test_limits.WsgiLimiterProxyTest
nova.tests.unit.api.openstack.compute.test_scheduler_hints.SchedulerHintsTestCaseV21
nova.tests.unit.api.openstack.compute.test_urlmap.UrlmapTest
nova.tests.unit.api.openstack.compute.test_volumes.BootFromVolumeTest
nova.tests.unit.api.test_compute_req_id.RequestIdTest
nova.tests.unit.test_configdrive2.ConfigDriveTestCase
Partially-Implements: blueprint goal-python35
Change-Id: Ie2a6c44f3cbcd82e37da2e0c002e866d25823eda
* Use base64 module from oslo.serialization to convert things
as needed
* Replace filter() with a list-comprehension to get a list on
Python 3
Partially-Implements: blueprint goal-python35
Change-Id: Ibe7e212cea5e6dd32b9b92a814c3ad8222ed2bc6
* Use binary files, not text files, in fake_libvirt_utils.file_open()
* Use byte strings for XML
* Set disk size to 0 in mocks to avoid fix TypeError on comparison
on Python 3
* Replace filter() and map() with a list-comprehension to get a list
on Python 3
* Replace six.moves.range() with range() in driver.py: there is
a "from six.moves import range" import at top level
* Replace six.iteritems(dict) with dict.items() to cleanup the code.
* Make sure call mox.UnsetStubs at last to make mox work properly on
Python 3.
Co-Authored-By: Davanum Srinivas <davanum@gmail.com>
Co-Authored-By: Victor Stinner <vstinner@redhat.com>
Change-Id: I568c72c611024d32c35dd0629cc041ca5c5969b8
Partially-Implements: blueprint goal-python35
* Use sorted(dict.keys()) because dict.keys() has no sort() method
on Python 3
* Dicts are not orderable in Python 3, need work around. For more
information, please see:
http://stackoverflow.com/questions/22333388/dicts-are-not-orderable-in-python-3
Partially-Implements: blueprint goal-python35
Co-Authored-By: Davanum Srinivas <davanum@gmail.com>
Change-Id: Icf7fd0e392fc0d174d6312badf024367ba72fd8f
* webob response body should be bytes not strings
* response headers must be utf-8 strings
Partially-Implements: blueprint goal-python35
Change-Id: I85f4719feddb1eb2cc0043c692c0702087130cd8