summaryrefslogtreecommitdiffstats
path: root/nokia/vnfmdriver
diff options
context:
space:
mode:
authorYan Yang <yangyanyj@chinamobile.com>2018-03-14 06:03:42 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-14 06:03:42 +0000
commit1b856ac5298e0f7bf4b1592593870f6b9ea7fc7b (patch)
treee0092719b99ca8692acfa091e4ff3a0e913d7c58 /nokia/vnfmdriver
parentf5b1c07d03b2c85b8bd8d9c30bfb8d97a4a67b65 (diff)
parentdb9b9c7217edf4fe2cdeaed36b8970990f656c3e (diff)
Merge "sonar fix:Adaptor service bug fixes"
Diffstat (limited to 'nokia/vnfmdriver')
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Cbam2DriverResponseConverter.java4
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Driver2CbamRequestConverter.java6
2 files changed, 5 insertions, 5 deletions
diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Cbam2DriverResponseConverter.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Cbam2DriverResponseConverter.java
index c153095b..6034b55b 100644
--- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Cbam2DriverResponseConverter.java
+++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Cbam2DriverResponseConverter.java
@@ -155,11 +155,11 @@ public class Cbam2DriverResponseConverter {
if (OperationType.INSTANTIATE == oper.getOperationType()) {
double instantiateProgress = (nowTime - jobInfo.getOperateStartTime())
- / adaptorEnv.getInstantiateTimeInterval();
+ / (double)(adaptorEnv.getInstantiateTimeInterval());
initialProgress = (int) (instantiateProgress + initialProgress);
} else if (OperationType.TERMINATE == oper.getOperationType()) {
double terminateProgress = (nowTime - jobInfo.getOperateStartTime())
- / adaptorEnv.getTerminateTimeInterval();
+ / (double)(adaptorEnv.getTerminateTimeInterval());
initialProgress = (int) (terminateProgress + initialProgress);
} else {
initialProgress = 0;
diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Driver2CbamRequestConverter.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Driver2CbamRequestConverter.java
index 493033c9..8c60cc67 100644
--- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Driver2CbamRequestConverter.java
+++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Driver2CbamRequestConverter.java
@@ -54,11 +54,11 @@ public class Driver2CbamRequestConverter {
}
public CBAMInstantiateVnfRequest instantiateRequestConvert(InstantiateVnfRequest driverRequest,
- NslcmGrantVnfResponse nslc, GrantInfo grant, VimComputeResourceFlavour vimco) throws Exception {
- Gson gson = new Gson();
+ NslcmGrantVnfResponse nslc, GrantInfo grant, VimComputeResourceFlavour vimco) throws IOException{
+ Gson gson = new Gson();
String inputJson = readcbamInputInfoFromJsonFile();
CBAMInstantiateVnfRequest request = gson.fromJson(inputJson, CBAMInstantiateVnfRequest.class);
-
+
return request;
}