Sync libraries & common files prior to freeze
* charm-helpers sync for classic charms * charms.ceph sync for ceph charms * rebuild for reactive charms * sync tox.ini files as needed * sync requirements.txt files to sync to standard Change-Id: I1bf6a834b3678f631f6335af9f0e8b779f863c66
This commit is contained in:
parent
1b813d1fd9
commit
a4635c13a8
File diff suppressed because it is too large
Load Diff
|
@ -15,6 +15,7 @@ def _add_path(path):
|
|||
if path not in sys.path:
|
||||
sys.path.insert(1, path)
|
||||
|
||||
|
||||
_add_path(_root)
|
||||
|
||||
|
||||
|
|
|
@ -227,7 +227,8 @@ def is_sufficient_peers():
|
|||
return False
|
||||
else:
|
||||
log("Sufficient number of peer units to form cluster {}"
|
||||
"".format(min_size, level=DEBUG))
|
||||
.format(min_size),
|
||||
level=DEBUG)
|
||||
return True
|
||||
else:
|
||||
log("min-cluster-size is not defined, race conditions may occur if "
|
||||
|
@ -275,7 +276,7 @@ def get_cluster_hosts():
|
|||
(unit, hostname, cluster_address), level=DEBUG)
|
||||
continue
|
||||
else:
|
||||
log("(unit=%s) hostname '{}' provided by cluster relation "
|
||||
log("(unit={}) hostname '{}' provided by cluster relation "
|
||||
"for addr {}".format(unit, hostname, cluster_address),
|
||||
level=DEBUG)
|
||||
|
||||
|
@ -459,7 +460,7 @@ def get_wsrep_value(key):
|
|||
try:
|
||||
cursor.execute("show status like '{}'".format(key))
|
||||
ret = cursor.fetchall()
|
||||
except:
|
||||
except Exception:
|
||||
log("Failed to get '%s'", ERROR)
|
||||
return None
|
||||
finally:
|
||||
|
@ -1129,8 +1130,8 @@ def get_wsrep_provider_options():
|
|||
'gcs.fc_limit={}'.format(config('gcs-fc-limit')))
|
||||
|
||||
peer_timeout = config('peer-timeout')
|
||||
if peer_timeout and(not peer_timeout.startswith('PT') or
|
||||
not peer_timeout.endswith('S')):
|
||||
if peer_timeout and (not peer_timeout.startswith('PT') or
|
||||
not peer_timeout.endswith('S')):
|
||||
raise ValueError("Invalid gcast.peer_timeout value: {}"
|
||||
.format(peer_timeout))
|
||||
elif peer_timeout:
|
||||
|
@ -1275,7 +1276,7 @@ def get_databases_to_replicate():
|
|||
return databases_to_replicate
|
||||
|
||||
|
||||
def check_invalid_chars(data, bad_chars_re="[\^\\/?%*:|\"'<>., ]"):
|
||||
def check_invalid_chars(data, bad_chars_re=r"[\^\\/?%*:|\"'<>., ]"):
|
||||
""" Check for invalid characters
|
||||
|
||||
Run a pattern check on the data and raise an InvalidCharacters exception
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
# requirements. They are intertwined. Also, Zaza itself should specify
|
||||
# all of its own requirements and if it doesn't, fix it there.
|
||||
#
|
||||
setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85
|
||||
pbr>=1.8.0,<1.9.0
|
||||
simplejson>=2.2.0
|
||||
netifaces>=0.10.4
|
||||
|
|
|
@ -7,10 +7,11 @@
|
|||
# requirements. They are intertwined. Also, Zaza itself should specify
|
||||
# all of its own requirements and if it doesn't, fix it there.
|
||||
#
|
||||
setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85
|
||||
charm-tools>=2.4.4
|
||||
requests>=2.18.4
|
||||
mock>=1.2
|
||||
flake8>=2.2.4,<=2.4.1
|
||||
flake8>=2.2.4
|
||||
stestr>=2.2.0
|
||||
coverage>=4.5.2
|
||||
pyudev # for ceph-* charm unit tests (need to fix the ceph-* charm unit tests/mocking)
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -116,5 +116,5 @@ commands =
|
|||
functest-run-suite --keep-model --bundle {posargs}
|
||||
|
||||
[flake8]
|
||||
ignore = E402,E226
|
||||
ignore = E402,E226,W503,W504
|
||||
exclude = */charmhelpers
|
||||
|
|
|
@ -28,6 +28,7 @@ def _add_path(path):
|
|||
if path not in sys.path:
|
||||
sys.path.insert(1, path)
|
||||
|
||||
|
||||
_add_path(_actions)
|
||||
_add_path(_hooks)
|
||||
_add_path(_charmhelpers)
|
||||
|
|
|
@ -744,7 +744,7 @@ class TestUpgradeCharm(CharmTestCase):
|
|||
CharmTestCase.tearDown(self)
|
||||
try:
|
||||
shutil.rmtree(self.tmpdir)
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def test_upgrade_charm_leader(self):
|
||||
|
|
Loading…
Reference in New Issue