summaryrefslogtreecommitdiffstats
path: root/huawei/vnfmadapter/VnfmadapterService
diff options
context:
space:
mode:
Diffstat (limited to 'huawei/vnfmadapter/VnfmadapterService')
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/AuthRoa.java5
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfRoa.java34
2 files changed, 34 insertions, 5 deletions
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/AuthRoa.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/AuthRoa.java
index 34943770..2e7e28ca 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/AuthRoa.java
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/AuthRoa.java
@@ -43,7 +43,10 @@ import net.sf.json.JSONObject;
* Provide interfaces for authInfo
* <br/>
* <p>
- * </p>
+ * auth tokens interface is provided by platform
+ * not in nfvo for vnfm
+ * differences from other interface
+ * </p>
*
* @author
* @version VFC 1.0 Aug 24, 2016
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfRoa.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfRoa.java
index f40f741d..6ed28a81 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfRoa.java
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfRoa.java
@@ -87,17 +87,18 @@ public class VnfRoa {
/**
* Scale VNF
- *
+ *
+ * @param vnfmId
+ * @param vnfInstanceId
+ * @param resp
* @param context
- * * {
+ * {
* "vnfInstanceId":"5",
* "type":"SCALE_OUT",
* "aspectId":"101",
* "numberOfSteps":"1",
* "additionalParam":{}
* }
- * @param resp
- * @param vnfmId
* @return
* {
* "jobId":"1"
@@ -372,4 +373,29 @@ public class VnfRoa {
LOG.info("function=getVms, restJson: {}", restJson);
return restJson.getString("data");
}
+
+ /**
+ * <br>
+ * Query job status from vnfm version 18.1
+ *
+ * @param jobId
+ * @param vnfmId
+ * @param responseId
+ * @return
+ * @throws ServiceException
+ * @since VFC 1.0
+ */
+ public String getJobFromVnfm(@PathParam("jobId") String jobId, @PathParam("vnfmId") String vnfmId,
+ @Context HttpServletResponse resp, @QueryParam("@responseId") String responseId) throws ServiceException {
+ LOG.warn("function=getJobFromVnfm, msg=enter to get a job: jobId: {}, responseId: {}", jobId, responseId);
+ JSONObject restJson = vnfMgr.getJobFromVnfm(jobId, vnfmId);
+
+ if(restJson.getInt(Constant.RETCODE) == Constant.REST_FAIL) {
+ LOG.error("function=getJobFromVnfm, msg=getJobFromVnfm fail");
+ resp.setStatus(Constant.HTTP_INNERERROR);
+ return restJson.toString();
+ }
+
+ return vnfMgr.transferToLcm(restJson);
+ }
}