Commit Graph

9 Commits

Author SHA1 Message Date
likui 7b525d8eeb Remove six
The Python 2.7 Support has been support
So remove hacking rules for compatibility between python 2 and 3

Change-Id: Ia0fe869b80d330551cc9dac06c23001faf229542
2020-11-16 06:52:57 +00:00
Andreas Jaeger dd7efc353e [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Cleanup tox.ini, remove install_command and add constraints to deps.
Replace mock with unittest.mock.

Change-Id: Idcac0b5310adf27a35223273bd54a4a154988c9b
2020-02-04 20:21:41 +01:00
Zane Bitter a825d9b283 Additional tests for region_name
Test that everything works when region_name is not supplied or is None.

Change-Id: Ia880447e27289fdb488a90d77a5a1f5f3d8b8c61
Task: 33529
Related-Bug: #1830967
2019-05-29 15:54:45 -04:00
Feilong Wang fdd6a5f537 Add region_name for heat-config-notify
Now there is no region name when heat-config-notify try to get the
heat endpoint or zaqar endpoint. As a result, it could be a wrong
one returned from Keystone because there is no region name specified.
This patch fixes it.

Please refer Iec6f3606c9fdf8474f393b0990356f34d38bcf75 for the change
in Heat.

Please refer I88182a9a9af74e9760b2ec9b500971f06293f0b8 for the change
in occ.

Task: 22720
Story: 2002781

Change-Id: I8e0518fa61e237ec055834dd4bebe0fc87cd6627
2018-07-08 08:20:34 +12:00
Zuul 10f28e8491 Merge "Use six StringIO" 2018-03-26 20:29:31 +00:00
ricolin def252eb96 Use six StringIO
On python3, sys.stdin/stdout are Text-mode streams, which can be
approximated with io.StringIO. On python2, there's no real
distinction between Text-mode and Binary-mode (except for line
endings, which sys.stdin/stdout also treat as Text-mode). Hence,
there's no need to explicitly use io.BytesIO on python2.
StringIO.StringIO is equally or more representative of how the
mocked streams behave.

Therefore, just use six.StringIO instead of different types for
python2 vs. python3.

Change-Id: Ib80e10a40e68ece946b344ce7bcfba5e182ce848
2018-03-26 20:09:41 +00:00
Alex Schultz 756fcafdf0 Retry logic for url request in heat-config-notify
Adds retry logic for software deployments using the url signals
to ensure that requests are retried if network connection issues
occur or a 500, 502, 503, or 504 is returned by the http or https
endpoint.

Note: this does not add retry logic to heatclient or zaqarclient
if they are used for signaling.

Change-Id: I82dff4a4b9fac05c5ec649db3eb379bdec71e208
Related-Bug: #1731540
2017-11-14 21:10:34 +00:00
Thomas Herve 25cd394bbe Add py3.5 support
Depends-On: Ibda89b467b461b8833515f50a0cf1cc3064cb917
Change-Id: I68ac61b7d1d0d180a7696ae2f0f75b1a4a969995
2017-07-17 13:43:43 +00:00
Thomas Herve d802d177c7 Move elements at the top level 2017-01-04 16:57:10 +01:00