diff options
author | Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> | 2022-10-21 17:36:17 +0200 |
---|---|---|
committer | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2022-10-21 16:17:40 +0000 |
commit | b3dd50eff64544200c0678b2e49cd822fc373927 (patch) | |
tree | cc5be58f4ed30bbe4684ef2333afc415771231d5 /tutorials/ApacheCNF/automation/healthcheck.py | |
parent | fa39bef3f4532802314cb89721e13c37555634b1 (diff) |
[APACHECNF] Update healthcheck and add scale workflowjakarta
Issue-ID: INT-2164
Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl>
Change-Id: I7cf59f58592321ec06d8d812bd081293130ec74d
(cherry picked from commit 5762244a0c6282557169c8183e464f6950438122)
Diffstat (limited to 'tutorials/ApacheCNF/automation/healthcheck.py')
-rw-r--r-- | tutorials/ApacheCNF/automation/healthcheck.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tutorials/ApacheCNF/automation/healthcheck.py b/tutorials/ApacheCNF/automation/healthcheck.py index 9c33375e..6fe72397 100644 --- a/tutorials/ApacheCNF/automation/healthcheck.py +++ b/tutorials/ApacheCNF/automation/healthcheck.py @@ -1,5 +1,6 @@ # ============LICENSE_START======================================================= # Copyright (C) 2021 Samsung +# Modification Copyright (C) 2022 Deutsche Telekom AG # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,6 +17,7 @@ # ============LICENSE_END========================================================= import logging import os +import sys import zipfile from io import BytesIO @@ -61,7 +63,7 @@ def resolve_hc_inputs(config: Config): vnf_id = vnfs[0].vnf_id return service_id, vnf_id -def main(): +def main(status_count): mypath = os.path.dirname(os.path.realpath(__file__)) config = Config(env_dict=VariablesDict.env_variable) for vnf in config.service_model["vnfs"]: @@ -77,7 +79,8 @@ def main(): cds_input = {"health-check-properties": { "service-instance-id": serv_id, - "vnf-id": vnf_id + "vnf-id": vnf_id, + "status-check-max-count": int(status_count) } } @@ -90,4 +93,8 @@ def main(): logger.info("Please check cds-blueprints-processor logs to see exact status") if __name__ == "__main__": - main() + status_count = 1 + if len(sys.argv) > 1: + status_count = sys.argv[1] + print(f"Status Check Max Count: %s" % status_count) + main(status_count) |