summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorajay priyadarshi <ajay.priyadarshi@ril.com>2018-03-14 11:19:45 +0530
committerajay priyadarshi <ajay.priyadarshi@ril.com>2018-03-14 11:19:45 +0530
commitdb9b9c7217edf4fe2cdeaed36b8970990f656c3e (patch)
treec4b0440a4f1d730247a3045636b38e52897788b9
parent6caea5a826752aa3177e0dbc2897923d247580a8 (diff)
sonar fix:Adaptor service bug fixes
adaptor/Cbam2DriverResponseConverter.java file name: Driver2CbamRequestConverter.java Change-Id: I1e022a227671f26aea4e73e8f530e73be913cf0e Issue-ID: VFC-812 Signed-off-by: ajay priyadarshi <ajay.priyadarshi@ril.com>
-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;
}