aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNOValidator.java37
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNOValidatorImpl.java54
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Body.java77
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Input.java79
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/RequestHealthDiagnostic.java185
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/ResultInfo.java116
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/SDNO.java131
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/dmaap/SDNOHealthCheckDmaapConsumer.java156
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/dmaap/SDNOHealthCheckDmaapPublisher.java50
9 files changed, 0 insertions, 885 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNOValidator.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNOValidator.java
deleted file mode 100644
index df30e43822..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNOValidator.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. 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.openecomp.mso.client.sdno;
-
-import java.io.IOException;
-
-public interface SDNOValidator {
-
- /**
- * Issues a health diagnostic request for a given vnf to SDN-O
- *
- * @param vnfId
- * @param requestingUserId
- * @throws IOException
- * @throws Exception
- */
- public void healthDiagnostic(String vnfId, String requestingUserId) throws IOException, Exception;
-
-}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNOValidatorImpl.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNOValidatorImpl.java
deleted file mode 100644
index bdb4aa94ee..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNOValidatorImpl.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. 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.openecomp.mso.client.sdno;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.Optional;
-
-import org.openecomp.mso.client.dmaap.Consumer;
-import org.openecomp.mso.client.dmaap.DmaapConsumer;
-import org.openecomp.mso.client.dmaap.DmaapPublisher;
-import org.openecomp.mso.client.exceptions.SDNOException;
-import org.openecomp.mso.jsonpath.JsonPathUtil;
-
-public class SDNOValidatorImpl implements SDNOValidator {
-
- private final static String aafUserName = "something";
- private final static String clientName = "MSO";
- private final static String healthDiagnosticPath = "body.output.response-healthdiagnostic";
- private final static String producerFilePath = "";
- private String uuid;
- private boolean continuePolling = true;
- @Override
- public void healthDiagnostic(String vnfName, String uuid) {
- //Query A&AI data
- // setup SDNO Entity
- //Call SDNO for Health Diagnostic
- //create producer file for MRClient https://wiki.web.att.com/display/MessageRouter/DMaaP_MR_JavaReferenceClient
- // final MRBatchingPublisher pub = MRClientFactory.createBatchingPublisher(producerFilePath);
- // pub.send("Mypartitionkey",JSON.toString(object));
- //create consumer file for MRClient https://wiki.web.att.com/display/MessageRouter/DMaaP_MR_JavaReferenceClient
- //check for error in subscription feed filter via jsonpath
- //block and continue to poll waiting for response
- }
-
-}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Body.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Body.java
deleted file mode 100644
index 26c74b0615..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Body.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. 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.openecomp.mso.client.sdno.beans;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
- "input"
-})
-public class Body implements Serializable
-{
-
- @JsonProperty("input")
- private Input input;
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<>();
- private final static long serialVersionUID = 9101706044452851559L;
-
- @JsonProperty("input")
- public Input getInput() {
- return input;
- }
-
- @JsonProperty("input")
- public void setInput(Input input) {
- this.input = input;
- }
-
- public Body withInput(Input input) {
- this.input = input;
- return this;
- }
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- public Body withAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- return this;
- }
-
-}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Input.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Input.java
deleted file mode 100644
index 579f481ba8..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Input.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. 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.openecomp.mso.client.sdno.beans;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
- "request-healthdiagnostic",
- "request-hd-custom"
-})
-public class Input implements Serializable
-{
-
- @JsonProperty("request-healthdiagnostic")
- private RequestHealthDiagnostic RequestHealthDiagnostic;
-
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<>();
- private final static long serialVersionUID = 7155546785389227528L;
-
- @JsonProperty("request-healthdiagnostic")
- public RequestHealthDiagnostic getRequestHealthDiagnostic() {
- return RequestHealthDiagnostic;
- }
-
- @JsonProperty("request-healthdiagnostic")
- public void setRequestHealthDiagnostic(RequestHealthDiagnostic RequestHealthDiagnostic) {
- this.RequestHealthDiagnostic = RequestHealthDiagnostic;
- }
-
- public Input withRequestHealthDiagnostic(RequestHealthDiagnostic RequestHealthDiagnostic) {
- this.RequestHealthDiagnostic = RequestHealthDiagnostic;
- return this;
- }
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- public Input withAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- return this;
- }
-
-}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/RequestHealthDiagnostic.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/RequestHealthDiagnostic.java
deleted file mode 100644
index 2cddd0331e..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/RequestHealthDiagnostic.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. 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.openecomp.mso.client.sdno.beans;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
- "request-client-name",
- "request-node-name",
- "request-node-ip",
- "request-id",
- "request-user-id",
- "request-node-type",
- "health-diagnostic-code"
-})
-public class RequestHealthDiagnostic implements Serializable
-{
-
- @JsonProperty("request-client-name")
- private String requestClientName;
- @JsonProperty("request-node-name")
- private String requestNodeName;
- @JsonProperty("request-node-ip")
- private String requestNodeIp;
- @JsonProperty("request-id")
- private String requestId;
- @JsonProperty("request-user-id")
- private String requestUserId;
- @JsonProperty("request-node-type")
- private String requestNodeType;
- @JsonProperty("health-diagnostic-code")
- private String healthDiagnosticCode;
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<>();
- private final static long serialVersionUID = 1166788526178388021L;
-
- @JsonProperty("request-client-name")
- public String getRequestClientName() {
- return requestClientName;
- }
-
- @JsonProperty("request-client-name")
- public void setRequestClientName(String requestClientName) {
- this.requestClientName = requestClientName;
- }
-
- public RequestHealthDiagnostic withRequestClientName(String requestClientName) {
- this.requestClientName = requestClientName;
- return this;
- }
-
- @JsonProperty("request-node-name")
- public String getRequestNodeName() {
- return requestNodeName;
- }
-
- @JsonProperty("request-node-name")
- public void setRequestNodeName(String requestNodeName) {
- this.requestNodeName = requestNodeName;
- }
-
- public RequestHealthDiagnostic withRequestNodeName(String requestNodeName) {
- this.requestNodeName = requestNodeName;
- return this;
- }
-
- @JsonProperty("request-node-ip")
- public String getRequestNodeIp() {
- return requestNodeIp;
- }
-
- @JsonProperty("request-node-ip")
- public void setRequestNodeIp(String requestNodeIp) {
- this.requestNodeIp = requestNodeIp;
- }
-
- public RequestHealthDiagnostic withRequestNodeIp(String requestNodeIp) {
- this.requestNodeIp = requestNodeIp;
- return this;
- }
-
- @JsonProperty("request-id")
- public String getRequestId() {
- return requestId;
- }
-
- @JsonProperty("request-id")
- public void setRequestId(String requestId) {
- this.requestId = requestId;
- }
-
- public RequestHealthDiagnostic withRequestId(String requestId) {
- this.requestId = requestId;
- return this;
- }
-
- @JsonProperty("request-user-id")
- public String getRequestUserId() {
- return requestUserId;
- }
-
- @JsonProperty("request-user-id")
- public void setRequestUserId(String requestUserId) {
- this.requestUserId = requestUserId;
- }
-
- public RequestHealthDiagnostic withRequestUserId(String requestUserId) {
- this.requestUserId = requestUserId;
- return this;
- }
-
- @JsonProperty("request-node-type")
- public String getRequestNodeType() {
- return requestNodeType;
- }
-
- @JsonProperty("request-node-type")
- public void setRequestNodeType(String requestNodeType) {
- this.requestNodeType = requestNodeType;
- }
-
- public RequestHealthDiagnostic withRequestNodeType(String requestNodeType) {
- this.requestNodeType = requestNodeType;
- return this;
- }
-
- @JsonProperty("health-diagnostic-code")
- public String getHealthDiagnosticCode() {
- return healthDiagnosticCode;
- }
-
- @JsonProperty("health-diagnostic-code")
- public void setHealthDiagnosticCode(String healthDiagnosticCode) {
- this.healthDiagnosticCode = healthDiagnosticCode;
- }
-
- public RequestHealthDiagnostic withHealthDiagnosticCode(String healthDiagnosticCode) {
- this.healthDiagnosticCode = healthDiagnosticCode;
- return this;
- }
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- public RequestHealthDiagnostic withAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- return this;
- }
-
-}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/ResultInfo.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/ResultInfo.java
deleted file mode 100644
index 976f5b9a33..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/ResultInfo.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. 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.openecomp.mso.client.sdno.beans;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-"client-name",
-"code",
-"processing-host",
-"request-id",
-"status"
-})
-public class ResultInfo {
-
-@JsonProperty("client-name")
-private String clientName;
-@JsonProperty("code")
-private String code;
-@JsonProperty("processing-host")
-private String processingHost;
-@JsonProperty("request-id")
-private String requestId;
-@JsonProperty("status")
-private String status;
-@JsonIgnore
-private Map<String, Object> additionalProperties = new HashMap<>();
-
-@JsonProperty("client-name")
-public String getClientName() {
-return clientName;
-}
-
-@JsonProperty("client-name")
-public void setClientName(String clientName) {
-this.clientName = clientName;
-}
-
-@JsonProperty("code")
-public String getCode() {
-return code;
-}
-
-@JsonProperty("code")
-public void setCode(String code) {
-this.code = code;
-}
-
-@JsonProperty("processing-host")
-public String getProcessingHost() {
-return processingHost;
-}
-
-@JsonProperty("processing-host")
-public void setProcessingHost(String processingHost) {
-this.processingHost = processingHost;
-}
-
-@JsonProperty("request-id")
-public String getRequestId() {
-return requestId;
-}
-
-@JsonProperty("request-id")
-public void setRequestId(String requestId) {
-this.requestId = requestId;
-}
-
-@JsonProperty("status")
-public String getStatus() {
-return status;
-}
-
-@JsonProperty("status")
-public void setStatus(String status) {
-this.status = status;
-}
-
-@JsonAnyGetter
-public Map<String, Object> getAdditionalProperties() {
-return this.additionalProperties;
-}
-
-@JsonAnySetter
-public void setAdditionalProperty(String name, Object value) {
-this.additionalProperties.put(name, value);
-}
-
-}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/SDNO.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/SDNO.java
deleted file mode 100644
index 8505ec9a74..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/SDNO.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. 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.openecomp.mso.client.sdno.beans;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
- "operation",
- "nodeLoc",
- "nodeType",
- "body"
-})
-public class SDNO implements Serializable
-{
-
- @JsonProperty("operation")
- private String operation;
- @JsonProperty("nodeLoc")
- private String nodeLoc;
- @JsonProperty("nodeType")
- private String nodeType;
- @JsonProperty("body")
- private Body body;
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<>();
- private final static long serialVersionUID = -5303297382564282650L;
-
- @JsonProperty("operation")
- public String getOperation() {
- return operation;
- }
-
- @JsonProperty("operation")
- public void setOperation(String operation) {
- this.operation = operation;
- }
-
- @JsonProperty("nodeLoc")
- public String getNodeLoc() {
- return nodeLoc;
- }
-
- @JsonProperty("nodeLoc")
- public void setNodeLoc(String nodeLoc) {
- this.nodeLoc = nodeLoc;
- }
-
- public SDNO withNodeLoc(String nodeLoc) {
- this.nodeLoc = nodeLoc;
- return this;
- }
-
- public SDNO withOperation(String operation) {
- this.operation = operation;
- return this;
- }
-
- @JsonProperty("nodeType")
- public String getNodeType() {
- return nodeType;
- }
-
- @JsonProperty("nodeType")
- public void setNodeType(String nodeType) {
- this.nodeType = nodeType;
- }
-
- public SDNO withNodeType(String nodeType) {
- this.nodeType = nodeType;
- return this;
- }
-
- @JsonProperty("body")
- public Body getBody() {
- return body;
- }
-
- @JsonProperty("body")
- public void setBody(Body body) {
- this.body = body;
- }
-
- public SDNO withBody(Body body) {
- this.body = body;
- return this;
- }
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- public SDNO SDNO (String name, Object value) {
- this.additionalProperties.put(name, value);
- return this;
- }
-
-}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/dmaap/SDNOHealthCheckDmaapConsumer.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/dmaap/SDNOHealthCheckDmaapConsumer.java
deleted file mode 100644
index f23d882b53..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/dmaap/SDNOHealthCheckDmaapConsumer.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. 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.openecomp.mso.client.sdno.dmaap;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.Optional;
-
-import org.openecomp.mso.client.dmaap.DmaapConsumer;
-import org.openecomp.mso.client.exceptions.SDNOException;
-import org.openecomp.mso.jsonpath.JsonPathUtil;
-
-public class SDNOHealthCheckDmaapConsumer extends DmaapConsumer {
-
- private final String uuid;
- private boolean continuePolling = true;
- private final static String healthDiagnosticPath = "body.output.*";
-
- public SDNOHealthCheckDmaapConsumer() throws FileNotFoundException, IOException {
- this("none");
- }
-
- public SDNOHealthCheckDmaapConsumer(String uuid) throws FileNotFoundException, IOException {
- super();
- this.uuid = uuid;
- }
-
- @Override
- public String getUserName() {
- return msoProperties.get("sdno.health-check.dmaap.username");
- }
-
- @Override
- public String getPassword() {
- return msoProperties.get("sdno.health-check.dmaap.password");
- }
-
- @Override
- public String getTopic() {
- return msoProperties.get("sdno.health-check.dmaap.subscriber.topic");
- }
-
- @Override
- public boolean continuePolling() {
- return continuePolling;
- }
-
- @Override
- public void stopProcessingMessages() {
- continuePolling = false;
- }
- @Override
- public void processMessage(String message) throws Exception {
- if (isHealthDiagnostic(message, this.getRequestId())) {
- if (!healthDiagnosticSuccessful(message)) {
- Optional<String> statusMessage = this.getStatusMessage(message);
- if (statusMessage.isPresent()) {
- throw new SDNOException("failed with message " + statusMessage.get());
- } else {
- throw new SDNOException("failed with no status message");
- }
- } else {
- auditLogger.info("successful health diagnostic found for request: " + this.getRequestId());
- stopProcessingMessages();
- }
- }
- }
-
- @Override
- public boolean isAccepted(String message) {
- if (isResultInfo(message)) {
- Optional<String> code = isAccepted(message, this.getRequestId());
- if (code.isPresent()) {
- if ("202".equals(code.get())) {
- return true;
- } else {
- //TODO check other statuses 400 and 500
- }
- } else {
- //TODO throw error
- }
- }
-
- return false;
- }
-
- @Override
- public boolean isFailure(String message) {
- if (isResultInfo(message)) {
- Optional<String> code = isFailure(message, this.getRequestId());
- if (code.isPresent()) {
- if ("500".equals(code.get())) {
- return true;
- } else {
- //TODO check other statuses 400 and 500
- }
- } else {
- //TODO throw error
- }
- }
-
- return false;
- }
-
- @Override
- public String getRequestId() {
- return uuid;
- }
-
- protected Optional<String> isAccepted(String json, String uuid) {
- return JsonPathUtil.getInstance().locateResult(json, String.format("$.result-info[?(@.status=='ACCEPTED' && @.request-id=='%s')].code", uuid));
- }
-
- protected Optional<String> isFailure(String json, String uuid) {
- return JsonPathUtil.getInstance().locateResult(json, String.format("$.result-info[?(@.status=='FAILURE' && @.request-id=='%s')].code", uuid));
- }
-
- protected boolean isResultInfo(String json) {
- return JsonPathUtil.getInstance().pathExists(json, "$[?(@.result-info)]");
- }
-
- protected boolean isHealthDiagnostic(String json, String uuid) {
- return JsonPathUtil.getInstance().pathExists(json, String.format("$[?(@.result-info.request-id=='%s')].%s", uuid, healthDiagnosticPath));
- }
-
- protected boolean healthDiagnosticSuccessful(String json) {
- return JsonPathUtil.getInstance().pathExists(json, "$." + healthDiagnosticPath + "[?(@.response-status=='Success')]");
- }
-
- protected Optional<String> getStatusMessage(String json) {
- return JsonPathUtil.getInstance().locateResult(json, "$." + healthDiagnosticPath + ".error-message");
- }
-
- @Override
- public int getMaximumElapsedTime() {
- return 300000;
- }
-}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/dmaap/SDNOHealthCheckDmaapPublisher.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/dmaap/SDNOHealthCheckDmaapPublisher.java
deleted file mode 100644
index 73f06b8e58..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/dmaap/SDNOHealthCheckDmaapPublisher.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. 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.openecomp.mso.client.sdno.dmaap;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-
-import org.openecomp.mso.client.dmaap.DmaapPublisher;
-
-public class SDNOHealthCheckDmaapPublisher extends DmaapPublisher {
-
- public SDNOHealthCheckDmaapPublisher() throws FileNotFoundException, IOException {
- super();
- }
-
- @Override
- public String getUserName() {
- return msoProperties.get("sdno.health-check.dmaap.username");
- }
-
- @Override
- public String getPassword() {
- return msoProperties.get("sdno.health-check.dmaap.password");
- }
-
- @Override
- public String getTopic() {
- return msoProperties.get("sdno.health-check.dmaap.publisher.topic");
- }
-
-
-}