15 Commits

Author SHA1 Message Date
Hervé Beraud
8c96a4d856 Remove six and python 2.7 full support
Six is in use to help us to keep support for python 2.7.
Since the ussuri cycle we decide to remove the python 2.7
support so we can go ahead and also remove six usage from
the python code.

Review process and help
-----------------------
Removing six introduce a lot of changes and an huge amount of modified files
To simplify reviews we decided to split changes into several patches to avoid
painful reviews and avoid mistakes.

To review this patch you can use the six documentation [1] to obtain help and
understand choices.

Additional informations
-----------------------
Changes related to 'six.b(data)' [2]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

six.b [2] encode the given datas in latin-1 in python3 so I did the same
things in this patch.

Latin-1 is equal to iso-8859-1 [3].

This encoding is the default encoding [4] of certain descriptive HTTP
headers.

I suggest to keep latin-1 for the moment and to move to another encoding
in a follow-up patch if needed to move to most powerful encoding (utf8).

HTML4 support utf8 charset and utf8 is the default charset for HTML5 [5].

Note that this commit message is autogenerated and not necesserly contains
changes related to 'six.b'

[1] https://six.readthedocs.io/
[2] https://six.readthedocs.io/#six.b
[3] https://docs.python.org/3/library/codecs.html#standard-encodings
[4] https://www.w3schools.com/charsets/ref_html_8859.asp
[5] https://www.w3schools.com/html/html_charset.asp

Patch 28 of a serie of 28 patches
six fully removed now!
Thank you six for the rendered services!

Change-Id: If44ee4b565cc9390fa0422fba4dda080b4f90b98
2020-04-23 14:49:12 +02:00
Thomas Herve
9398dedd98 Skip integration tests when Swift is not available
Let's skip integration tests using Swift when the service is not
available. It will help turn the py3 gate green.

Change-Id: Ib3536583dbb3bbf50d9c64976e909fd352391d05
2017-03-23 11:20:14 +01:00
Thomas Herve
ff6d5b291e Fix swift key generation in python3
The swift key used in aws tests is generated in a fashion that doesn't
work in python3. This fixes it.

Change-Id: I31d7046f343987ca3803cfc95c189e5c9f6dcc8e
2017-02-01 13:54:38 +01:00
zhanghao
cf4acdf6f7 Remove unused LOG to keep code clean
TrivialFix

Change-Id: I2e1985306da45f8f9021122590ffdc8b5d44f476
2016-07-10 11:11:00 +00:00
Jenkins
6505388261 Merge "Use yaml.safe_load() instead of yaml.load()" 2016-02-18 12:21:25 +00:00
Bo Wang
d91eea03ac Use yaml.safe_load() instead of yaml.load()
yaml.load() provides the ability to construct an arbitrary python object
that may be dangerous. yaml.safe_load() limits this ability to simple
python objects like integers or lists.

ref: https://en.wikipedia.org/wiki/YAML#Security

Change-Id: I9c28c25f4265fb691d39e72e20ef9c99f5538bf5
2016-02-16 21:37:27 +08:00
Rabi Mishra
e80d27213c Accommodate v2 and v3 auth for integration tests
devstack has moved default Keystone API version to v3[1].

[1] f4ce44bf3f

Though the above patch has been reverted, this would help
if devstack removes v2 support in the future.

Change-Id: I393750d00b3712a015e48a3cf38ab5f95bb61dae
Closes-Bug: #1539692
2016-02-04 17:30:00 +05:30
Thomas Herve
0e9f78df82 Fix race condition in tests with swift key
In integration we publish templates in Swift using temporary URLs.
Unfortunately there is a race condition in the way we setup the key, as
we use the key global to the account. This switches to a container per
test and a key per container to work around that.

Change-Id: Ia19967696811847e5b3ba07df68848a1708c2316
Closes-Bug: #1491773
2016-01-06 11:19:42 +01:00
LiuNanke
208d2debd0 Using LOG.warning replace LOG.warn
*Python 3 deprecated the logger.warn method, see:
*https://docs.python.org/3/library/logging.html#logging.warning
*so we prefer to use warning to avoid DeprecationWarning.

Change-Id: I07ee9c97c3548c965aaf83d34b37b23e9baba584
2015-12-29 09:32:42 +00:00
Angus Salkeld
e9c6115ec9 Try polling swift object before creating stack
Change-Id: I185d13c8c89df7ee27a7b4740d8895b3367fafa6
Closes-bug: #1491773
2015-10-06 13:59:31 +10:00
Rabi Mishra
25becbcbf4 Add config entries to skip integration tests
This adds options to skip scenario and functional tests.
You can either skip the complete set of tests or list of specific
tests.

Following new config options are added:

`skip_scenario_tests` -  Skip all scenario tests
`skip_functional_tests` - Skip all functional tests
`skip_functional_test_list` - List of functional tests to skip
`skip_scenario_test_list` - List of scenario tests to skip
`skip_test_stack_action_list` - List of actions in tests to skip

Change-Id: I7a5233f5db1f065ccee5a97408c72203c108a656
Depends-On: I25c5e853f0499b88f2803b077d19e132140908f1
2015-08-07 07:29:20 +00:00
Sirushti Murugesan
19ce39d101 Update urllib/httplib/cStringIO to use six.moves
partial blueprint heat-python34-support

Change-Id: I00a7064560a95a33dcb1e621961765822d4e94d4
2015-04-23 19:45:36 +05:30
Angus Salkeld
bbb18e76f3 Use helper functions stack_suspend and stack_resume
These wait for the stack state to get to complete,
this wasn't done consistently. In test_autoscaling we were
only waiting for the resource state to get to SUSPEND_COMPLETE
and this lead to a time sensitive bug.

Change-Id: Id985d833dc0b4cab1e3cb9d8f67d5d8cc94b5863
Closes-bug: #1438717
2015-04-10 15:44:07 +10:00
Steve Baker
c21bca268a Use oslo.log for heat_integrationtests
Later the integration jobs can be tuned to have their own
logging settings.

This change also raises _log_console_output to info, so it is displayed
by default.

Change-Id: Ifcaa6faf76c655e0c8cfd7d76775b80de70062c4
2015-03-17 17:36:56 +13:00
Angus Salkeld
fe762a51fa Move aws nested stack tests to functional tests
- use swift to post templates to.
- move limit tests to test_stack_resource

Part of blueprint decouple-nested
Change-Id: Id11e86835addc21301b3534a559d1754a802425e
2015-02-03 18:53:30 +10:00