From dbcb4f97a3ef6950d6f0a867f66a836b7037633a Mon Sep 17 00:00:00 2001 From: jananib Date: Tue, 25 Feb 2020 14:08:52 +0530 Subject: Status query Request Bean Bean addition for NSSMF adapter Change-Id: I6fe2a329341e2d3e91d0e23cd4438a8a0dc590e4 Issue-ID: SO-2544 Signed-off-by: jananib --- .../org/onap/so/beans/nsmf/JobStatusRequest.java | 70 ++++++++++++++++ .../org/onap/so/beans/nsmf/JobStatusResponse.java | 37 +++++++++ .../java/org/onap/so/beans/nsmf/NssiResponse.java | 47 +++++++++++ .../java/org/onap/so/beans/nsmf/NssmiReqInfo.java | 57 +++++++++++++ .../java/org/onap/so/beans/nsmf/NssmiResInfo.java | 47 +++++++++++ .../java/org/onap/so/beans/nsmf/PnfErrorList.java | 47 +++++++++++ .../org/onap/so/beans/nsmf/ResponseDescriptor.java | 85 +++++++++++++++++++ .../org/onap/so/beans/nsmf/ResponseHistory.java | 94 ++++++++++++++++++++++ .../java/org/onap/so/beans/nsmf/VnfErrorList.java | 47 +++++++++++ 9 files changed, 531 insertions(+) create mode 100644 common/src/main/java/org/onap/so/beans/nsmf/JobStatusRequest.java create mode 100644 common/src/main/java/org/onap/so/beans/nsmf/JobStatusResponse.java create mode 100644 common/src/main/java/org/onap/so/beans/nsmf/NssiResponse.java create mode 100644 common/src/main/java/org/onap/so/beans/nsmf/NssmiReqInfo.java create mode 100644 common/src/main/java/org/onap/so/beans/nsmf/NssmiResInfo.java create mode 100644 common/src/main/java/org/onap/so/beans/nsmf/PnfErrorList.java create mode 100644 common/src/main/java/org/onap/so/beans/nsmf/ResponseDescriptor.java create mode 100644 common/src/main/java/org/onap/so/beans/nsmf/ResponseHistory.java create mode 100644 common/src/main/java/org/onap/so/beans/nsmf/VnfErrorList.java (limited to 'common/src/main/java') diff --git a/common/src/main/java/org/onap/so/beans/nsmf/JobStatusRequest.java b/common/src/main/java/org/onap/so/beans/nsmf/JobStatusRequest.java new file mode 100644 index 0000000000..cc8503c250 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/JobStatusRequest.java @@ -0,0 +1,70 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.beans.nsmf; + +import com.fasterxml.jackson.annotation.JsonInclude; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public class JobStatusRequest { + + public final static String URL = "/api/rest/provMns/v1/NSS/jobs/%s"; + + private String nsiId; + + private String nssiId; + + private String responseId; + + private EsrInfo esrInfo; + + public String getNsiId() { + return nsiId; + } + + public void setNsiId(String nsiId) { + this.nsiId = nsiId; + } + + public String getNssiId() { + return nssiId; + } + + public void setNssiId(String nssiId) { + this.nssiId = nssiId; + } + + + public String getResponseId() { + return responseId; + } + + public void setResponseId(String responseId) { + this.responseId = responseId; + } + + public EsrInfo getEsrInfo() { + return esrInfo; + } + + public void setEsrInfo(EsrInfo esrInfo) { + this.esrInfo = esrInfo; + } +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/JobStatusResponse.java b/common/src/main/java/org/onap/so/beans/nsmf/JobStatusResponse.java new file mode 100644 index 0000000000..9259d51591 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/JobStatusResponse.java @@ -0,0 +1,37 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.beans.nsmf; + +import com.fasterxml.jackson.annotation.JsonInclude; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public class JobStatusResponse { + + private ResponseDescriptor responseDescriptor; + + public ResponseDescriptor getResponseDescriptor() { + return responseDescriptor; + } + + public void setResponseDescriptor(ResponseDescriptor responseDescriptor) { + this.responseDescriptor = responseDescriptor; + } +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/NssiResponse.java b/common/src/main/java/org/onap/so/beans/nsmf/NssiResponse.java new file mode 100644 index 0000000000..66368be6b8 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/NssiResponse.java @@ -0,0 +1,47 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.beans.nsmf; + +import com.fasterxml.jackson.annotation.JsonInclude; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public class NssiResponse { + + private String nssiId; + + private String jobId; + + public String getNssiId() { + return nssiId; + } + + public void setNssiId(String nssiId) { + this.nssiId = nssiId; + } + + public String getJobId() { + return jobId; + } + + public void setJobId(String jobId) { + this.jobId = jobId; + } +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/NssmiReqInfo.java b/common/src/main/java/org/onap/so/beans/nsmf/NssmiReqInfo.java new file mode 100644 index 0000000000..093825f0ff --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/NssmiReqInfo.java @@ -0,0 +1,57 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.beans.nsmf; + +import com.fasterxml.jackson.annotation.JsonInclude; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public class NssmiReqInfo { + + private String nsiId; + + private String nssiId; + + private EsrInfo esrInfo; + + public String getNsiId() { + return nsiId; + } + + public void setNsiId(String nsiId) { + this.nsiId = nsiId; + } + + public String getNssiId() { + return nssiId; + } + + public void setNssiId(String nssiId) { + this.nssiId = nssiId; + } + + public EsrInfo getEsrInfo() { + return esrInfo; + } + + public void setEsrInfo(EsrInfo esrInfo) { + this.esrInfo = esrInfo; + } +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/NssmiResInfo.java b/common/src/main/java/org/onap/so/beans/nsmf/NssmiResInfo.java new file mode 100644 index 0000000000..e75934a7a9 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/NssmiResInfo.java @@ -0,0 +1,47 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.beans.nsmf; + +import com.fasterxml.jackson.annotation.JsonInclude; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public class NssmiResInfo { + + private String jobId; + + private String status; + + public String getJobId() { + return jobId; + } + + public void setJobId(String jobId) { + this.jobId = jobId; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/PnfErrorList.java b/common/src/main/java/org/onap/so/beans/nsmf/PnfErrorList.java new file mode 100644 index 0000000000..66bfbdcea9 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/PnfErrorList.java @@ -0,0 +1,47 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.beans.nsmf; + +import com.fasterxml.jackson.annotation.JsonInclude; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public class PnfErrorList { + + private String pnfId; + + private String pnfErrorDesc; + + public String getPnfId() { + return pnfId; + } + + public void setPnfId(String pnfId) { + this.pnfId = pnfId; + } + + public String getPnfErrorDesc() { + return pnfErrorDesc; + } + + public void setPnfErrorDesc(String pnfErrorDesc) { + this.pnfErrorDesc = pnfErrorDesc; + } +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/ResponseDescriptor.java b/common/src/main/java/org/onap/so/beans/nsmf/ResponseDescriptor.java new file mode 100644 index 0000000000..469d212ef9 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/ResponseDescriptor.java @@ -0,0 +1,85 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.beans.nsmf; + +import com.fasterxml.jackson.annotation.JsonInclude; +import java.util.List; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ResponseDescriptor { + + @JsonInclude(JsonInclude.Include.NON_DEFAULT) + private int progress; + + private String status; + + private String statusDescription; + + private String errorCode; + + private List vnfErrorList; + + private List pnfErrorList; + + private String responseId; + + private List responseHistoryList; + + public int getProgress() { + return progress; + } + + public void setProgress(int progress) { + this.progress = progress; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getStatusDescription() { + return statusDescription; + } + + public void setStatusDescription(String statusDescription) { + this.statusDescription = statusDescription; + } + + public String getResponseId() { + return responseId; + } + + public void setResponseId(String responseId) { + this.responseId = responseId; + } + + public List getResponseHistoryList() { + return responseHistoryList; + } + + public void setResponseHistoryList(List responseHistoryList) { + this.responseHistoryList = responseHistoryList; + } +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/ResponseHistory.java b/common/src/main/java/org/onap/so/beans/nsmf/ResponseHistory.java new file mode 100644 index 0000000000..c71441a80a --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/ResponseHistory.java @@ -0,0 +1,94 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.beans.nsmf; + +import com.fasterxml.jackson.annotation.JsonInclude; +import java.util.List; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ResponseHistory { + + private int progress; + + private String status; + + private String errorCode; + + private String statusDescription; + + private String responseId; + + private List vnfErrorList; + + private List pnfErrorList; + + public int getProgress() { + return progress; + } + + public void setProgress(int progress) { + this.progress = progress; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getStatusDescription() { + return statusDescription; + } + + public void setStatusDescription(String statusDescription) { + this.statusDescription = statusDescription; + } + + public String getResponseId() { + return responseId; + } + + public void setResponseId(String responseId) { + this.responseId = responseId; + } + + public String getErrorCode() { + return errorCode; + } + + public void setErrorCode(String errorCode) { + this.errorCode = errorCode; + } + + public List getVnfErrorList() { + return vnfErrorList; + } + + public List getPnfErrorList() { + return pnfErrorList; + } + + public void setPnfErrorList(List pnfErrorList) { + this.pnfErrorList = pnfErrorList; + } +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/VnfErrorList.java b/common/src/main/java/org/onap/so/beans/nsmf/VnfErrorList.java new file mode 100644 index 0000000000..6388ca6106 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/VnfErrorList.java @@ -0,0 +1,47 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.beans.nsmf; + +import com.fasterxml.jackson.annotation.JsonInclude; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public class VnfErrorList { + + private String vnfInstanceId; + + private String vnfErrorDesc; + + public String getVnfInstanceId() { + return vnfInstanceId; + } + + public void setVnfInstanceId(String vnfInstanceId) { + this.vnfInstanceId = vnfInstanceId; + } + + public String getVnfErrorDesc() { + return vnfErrorDesc; + } + + public void setVnfErrorDesc(String vnfErrorDesc) { + this.vnfErrorDesc = vnfErrorDesc; + } +} -- cgit 1.2.3-korg