Add workaround proposed in PROD-10894
diff --git a/tcp_tests/managers/envmanager_empty.py b/tcp_tests/managers/envmanager_empty.py
index 702d723..b9ab8e1 100644
--- a/tcp_tests/managers/envmanager_empty.py
+++ b/tcp_tests/managers/envmanager_empty.py
@@ -18,7 +18,7 @@
class EnvironmentManagerEmpty(object):
"""Class-helper for creating VMs via devops environments"""
- _config = None
+ __config = None
def __init__(self, config=None):
"""Initializing class instance and create the environment
@@ -28,12 +28,12 @@
:param config.hardware.current_snapshot: name of the snapshot that
descriebe environment status.
"""
- self._config = config
+ self.__config = config
def lvm_storages(self):
"""Returns data of lvm_storages on nodes in environment
- It's expected that data of self._config.lvm_storages will be
+ It's expected that data of self.__config.lvm_storages will be
like this:
{
"node1": {
@@ -48,7 +48,7 @@
}
:rtype: dict
"""
- return self._config.underlay.lvm
+ return self.__config.underlay.lvm
def get_ssh_data(self, roles=None):
raise Exception("EnvironmentManagerEmpty doesn't have SSH details. "
@@ -60,24 +60,24 @@
- Store the state of the environment <name> to the 'config' object
- Save 'config' object to a file 'config_<name>.ini'
"""
- self._config.hardware.current_snapshot = name
- settings_oslo.save_config(self._config, name)
+ self.__config.hardware.current_snapshot = name
+ settings_oslo.save_config(self.__config, name)
def revert_snapshot(self, name):
"""Check the current state <name> of the environment
- Check that the <name> matches the current state of the environment
- that is stored in the 'self._config.hardware.current_snapshot'
+ that is stored in the 'self.__config.hardware.current_snapshot'
- Try to reload 'config' object from a file 'config_<name>.ini'
If the file not found, then pass with defaults.
- Set <name> as the current state of the environment after reload
:param name: string
"""
- if self._config.hardware.current_snapshot != name:
+ if self.__config.hardware.current_snapshot != name:
raise Exception(
"EnvironmentManagerEmpty cannot revert nodes from {} to {}"
- .format(self._config.hardware.current_snapshot, name))
+ .format(self.__config.hardware.current_snapshot, name))
def start(self):
"""Start environment"""
@@ -96,10 +96,10 @@
pass
def has_snapshot(self, name):
- return self._config.hardware.current_snapshot == name
+ return self.__config.hardware.current_snapshot == name
def has_snapshot_config(self, name):
- return self._config.hardware.current_snapshot == name
+ return self.__config.hardware.current_snapshot == name
def delete_environment(self):
"""Delete environment"""