Add fix for upgrade galera with mysql 5.7
--add update-mysql-version parametr for major upgrade
Related-Prod: PROD-36708
Change-Id: Ic1eb785c7f42a7532f55946aa6c024430810e0bf
diff --git a/tcp_tests/managers/reclass_manager.py b/tcp_tests/managers/reclass_manager.py
index 3952b5f..c7ec298 100644
--- a/tcp_tests/managers/reclass_manager.py
+++ b/tcp_tests/managers/reclass_manager.py
@@ -215,6 +215,26 @@
path=short_path
))
+ def create_yaml_with_context(self, yaml_context, short_path):
+ """
+ Create yaml file with context
+
+ :param yaml_context: string, yaml with extra context
+ :param short_path: string, path to reclass yaml file.
+ """
+ tmp_file = "/tmp/extra_context.yaml"
+ with open(tmp_file, "w") as f:
+ f.write(yaml_context)
+
+ self.ssh.upload(tmp_file, tmp_file)
+ self.ssh.check_call(
+ "cat {yaml} > \
+ /srv/salt/reclass/classes/{path}".format(
+ reclass_tools=self.reclass_tools_cmd,
+ yaml=tmp_file,
+ path=short_path
+ ))
+
def commit(self, text_commit):
self.ssh.check_call(
"cd /srv/salt/reclass; git add -u && git commit --allow-empty "