From: Bin Yang Date: Mon, 24 Jan 2022 07:46:23 +0000 (+0800) Subject: Workaround the nfdeployment desc input param issue X-Git-Tag: 2.0.0-rc1~55 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=de6f924990082b7ec02400ee1151df1105206fd2;p=pti%2Fo2.git Workaround the nfdeployment desc input param issue Issue-ID: INF-258 Signed-off-by: Bin Yang Change-Id: I4c5bf508d5323bbed9bb55bcfd965b36e76e738d --- 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 = []