summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliboNet <libo.zhu@intel.com>2019-05-25 07:57:55 +0800
committerliboNet <libo.zhu@intel.com>2019-05-25 07:57:55 +0800
commit0566fc507f64578ab37c4bce1abaaad8d5528169 (patch)
tree128b31d08044d5ebac0d4b14c51f3f2fad1f3101
parent8b38222e46064156985f0e6425207479fd2c975e (diff)
Fix data incomplete and not json format
the user needs to know the resource information and need to get the json format Change-Id: Id17be27016082bd7c42f8aa6f7a8aa25017e2c8b Issue-ID: MULTICLOUD-651 Signed-off-by: liboNet <libo.zhu@intel.com>
-rw-r--r--artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java
index 48ee0ea..a2c8b05 100644
--- a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java
+++ b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java
@@ -274,7 +274,9 @@ public class SdcReceptionHandler extends AbstractReceptionHandler implements INo
//store the service level info to serivce-meta.json
filePath = Paths.get("/data",vfModule.getVfModuleModelCustomizationUUID(),
"service-meta.json").toString();
- writeFileByFileWriter(filePath, notificationData.toString());
+ try(FileWriter writer = new FileWriter(filePath)){
+ new Gson().toJson(resource, writer);
+ }
LOGGER.debug("pass to create directory artifact file");
} catch (final IOException exp) {
LOGGER.error("Failed to create directory artifact file", exp);