summaryrefslogtreecommitdiffstats
path: root/huawei/vnfmadapter/VnfmadapterService/service
diff options
context:
space:
mode:
authorluxin <luxin7@huawei.com>2017-10-26 16:46:14 +0800
committerluxin <luxin7@huawei.com>2017-10-26 16:46:14 +0800
commitad168f1c43063da685c3745bffe62283cf7f2bd3 (patch)
tree29bcf5e203077f05629510201edf37624fb757f9 /huawei/vnfmadapter/VnfmadapterService/service
parent4afd4ca9884405638160ea3062fbef1214381552 (diff)
Fix vnfd file path in csar
Change-Id: Idad89fdacf434bd5dac5a68be01b317f1f4d82a9 Issue-Id:VFC-552 Signed-off-by: luxin <luxin7@huawei.com>
Diffstat (limited to 'huawei/vnfmadapter/VnfmadapterService/service')
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/adapter/impl/AdapterResourceManager.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/adapter/impl/AdapterResourceManager.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/adapter/impl/AdapterResourceManager.java
index 420d8eb0..e3bc1b29 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/adapter/impl/AdapterResourceManager.java
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/adapter/impl/AdapterResourceManager.java
@@ -32,6 +32,7 @@ import org.apache.commons.net.ftp.FTPReply;
import org.apache.commons.net.ftp.FTPSClient;
import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.common.DownloadCsarManager;
import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.common.VnfmException;
+import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.common.VnfmUtil;
import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.common.restclient.RestfulResponse;
import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.common.restclient.SystemEnvVariablesFactory;
import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.common.servicetoken.VNFRestfulUtil;
@@ -145,7 +146,8 @@ public class AdapterResourceManager implements IResourceManager {
vnfmMap.put("methodType", Constant.GET);
// get VNFM connection info
- JSONObject vnfmObject = getVnfmConnInfo(vnfmMap);
+ // getVnfmConnInfo(vnfmMap)
+ JSONObject vnfmObject = VnfmUtil.getVnfmById(vnfmid);
if(Integer.valueOf(vnfmObject.get(Constant.RETCODE).toString()) != Constant.HTTP_OK) {
LOG.error("get Vnfm Connection Info fail.", vnfmObject.get(Constant.RETCODE));
resultObj.put(Constant.REASON, vnfmObject.get(Constant.REASON).toString());
@@ -297,7 +299,7 @@ public class AdapterResourceManager implements IResourceManager {
LOG.info("makeDirectory: " + ftpClient.makeDirectory(vnfpkg.getString(VNFD_FILE_PATH)));
ftpClient.changeWorkingDirectory(vnfpkg.getString(VNFD_FILE_PATH));
LOG.info("changeWorkingDirectory: " + ftpClient.changeWorkingDirectory(vnfpkg.getString(VNFD_FILE_PATH)));
- String vnfdPath = csarfilepath + "Artifacts/Other/";
+ String vnfdPath = csarfilepath + "Artifacts/Deployment/OTHER/";
LOG.info("vnfd_file_name: " + vnfdPath + vnfpkg.getString("vnfd_file_name"));
InputStream inputStream = new FileInputStream(new File(vnfdPath + vnfpkg.getString("vnfd_file_name")));
flag = ftpClient.storeFile(vnfpkg.getString("vnfd_file_name"), inputStream);