diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index 5bcb87bf..80e2a217 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -147,13 +147,14 @@ def __init__(self, config): "floating_ip_network" ] self.AVAIALABILITY_ZONE = cfg["openstack_connection"]["availability_zone"] + # try to initialize forc connection try: self.RE_BACKEND_URL = cfg["forc"]["forc_url"] self.FORC_API_KEY = os.environ["FORC_API_KEY"] self.logger.info(msg="Forc-Backend url loaded: {0}".format(self.RE_BACKEND_URL)) except Exception as e: self.logger.exception(e) - self.logger.info("Forc-Backend url not loaded.") + self.logger.info("Forc-Backend not loaded.") self.RE_BACKEND_URL = None self.FORC_API_KEY = None if self.USE_GATEWAY: diff --git a/VirtualMachineService/ancon/Playbook.py b/VirtualMachineService/ancon/Playbook.py index 944f7402..4be47b15 100644 --- a/VirtualMachineService/ancon/Playbook.py +++ b/VirtualMachineService/ancon/Playbook.py @@ -16,13 +16,13 @@ class Playbook(object): PLAYBOOK_FAILED = "PLAYBOOK_FAILED" def __init__(self, ip, port, playbooks_information, osi_private_key, public_key, logger, pool): - self.redis = redis.Redis(connection_pool=pool) - self.yaml_exec = ruamel.yaml.YAML() - self.vars_files = [] - self.tasks = [] + self.redis = redis.Redis(connection_pool=pool) # redis connection + self.yaml_exec = ruamel.yaml.YAML() # yaml writer/reader + self.vars_files = [] # _vars_file.yml to read + self.tasks = [] # task list self.always_tasks = [] self.logger = logger - self.process = None + self.process = None # init process, returncode, standard output, standard error output self.returncode = -1 self.stdout = "" self.stderr = ""