- blueprint = None
- with zipfile.ZipFile(Config.VSPFILE, 'r') as package:
- with package.open("CBA.zip", 'r') as cba:
- blueprint = Blueprint(cba.read())
+ mypath = os.path.dirname(os.path.realpath(__file__))
+ config = Config(env_dict=VariablesDict.env_variable)
+ for vnf in config.service_model["vnfs"]:
+ file = vnf["vsp"]["vsp_file"]
+ file_path = os.path.join(mypath, file)
+ with zipfile.ZipFile(file_path, 'r') as package:
+ cba_io = BytesIO(package.read("CBA.zip"))
+ cba_io.seek(0)
+ blueprint = Blueprint(cba_io.read())
+
+ healthcheck: Workflow = blueprint.get_workflow_by_name('health-check')
+ serv_id, vnf_id = resolve_hc_inputs(config)
+ cds_input = {"health-check-properties":
+ {
+ "service-instance-id": serv_id,
+ "vnf-id": vnf_id
+ }
+ }