From de6f924990082b7ec02400ee1151df1105206fd2 Mon Sep 17 00:00:00 2001 From: Bin Yang Date: Mon, 24 Jan 2022 15:46:23 +0800 Subject: [PATCH] Workaround the nfdeployment desc input param issue Issue-ID: INF-258 Signed-off-by: Bin Yang Change-Id: I4c5bf508d5323bbed9bb55bcfd965b36e76e738d --- o2dms/domain/dms.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/o2dms/domain/dms.py b/o2dms/domain/dms.py index 949f06c..2a8c144 100644 --- a/o2dms/domain/dms.py +++ b/o2dms/domain/dms.py @@ -14,6 +14,7 @@ from __future__ import annotations # from os import stat +import json from o2dms.domain import events from o2dms.domain.states import NfDeploymentState @@ -30,11 +31,18 @@ class NfDeploymentDesc(AgRoot, Serializer): self.deploymentManagerId = dmsId self.name = name self.description = description - self.inputParams = inputParams - self.outputParams = outputParams self.artifactRepoUrl = artifactRepoUrl self.artifactName = artifactName self.status = 0 + + if type(inputParams) is str: + inputParams = json.loads(inputParams) + self.inputParams = json.dumps(inputParams) + + if type(outputParams) is str: + outputParams = json.loads(outputParams) + self.outputParams = json.dumps(outputParams) + # self.extensions = [] -- 2.16.6