summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-impl/sdnc
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-04-05 08:43:33 -0400
committerPamela Dragosh <pdragosh@research.att.com>2019-04-05 08:43:39 -0400
commit97ff0d774d4c41f5ca968d9ea5df07c978e77032 (patch)
tree0d28a64b727235f14790b2a6696377faf5bbb819 /models-interactions/model-impl/sdnc
parentb0bb6076e2298c7a016a00adcaefb7ed75eac641 (diff)
Update SDNC changes
Per this review: https://gerrit.onap.org/r/#/c/83945/ Copying those changes into policy/models before removal in drools-applications. Issue-ID: POLICY-1264 Change-Id: I151816e78293af813d24ca1164ca364a3c54f87c Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'models-interactions/model-impl/sdnc')
-rw-r--r--models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequest.java23
-rw-r--r--models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParameter.java55
-rw-r--r--models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParametersInfo.java51
-rw-r--r--models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleRequestInput.java44
-rw-r--r--models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVnfInfo.java44
-rw-r--r--models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java2
-rw-r--r--models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java11
7 files changed, 228 insertions, 2 deletions
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequest.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequest.java
index 88645d517..70e81d89f 100644
--- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequest.java
+++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2018 Huawei. All rights reserved.
+ * Copyright (C) 2018-2019 Huawei. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -39,6 +39,12 @@ public class SdncHealRequest implements Serializable {
@SerializedName("network-information")
private SdncHealNetworkInfo networkInfo;
+ @SerializedName("vnf-information")
+ private SdncHealVnfInfo vnfInfo;
+
+ @SerializedName("vf-module-request-input")
+ private SdncHealVfModuleRequestInput vfModuleRequestInput;
+
public SdncHealRequest() {
// Default constructor for SdncHealRequest
}
@@ -75,4 +81,19 @@ public class SdncHealRequest implements Serializable {
this.networkInfo = networkInfo;
}
+ public SdncHealVnfInfo getVnfInfo() {
+ return vnfInfo;
+ }
+
+ public void setVnfInfo(SdncHealVnfInfo vnfInfo) {
+ this.vnfInfo = vnfInfo;
+ }
+
+ public SdncHealVfModuleRequestInput getVfModuleRequestInput() {
+ return vfModuleRequestInput;
+ }
+
+ public void setVfModuleRequestInput(SdncHealVfModuleRequestInput input) {
+ this.vfModuleRequestInput = input;
+ }
}
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParameter.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParameter.java
new file mode 100644
index 000000000..0fe82bb44
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParameter.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved.
+ * Modifications Copyright (C) 2019 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.onap.policy.sdnc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SdncHealVfModuleParameter implements Serializable {
+
+ private static final long serialVersionUID = 3208673205100673119L;
+
+ @SerializedName("name")
+ private String name;
+
+ @SerializedName("value")
+ private String value;
+
+ public SdncHealVfModuleParameter() {
+ // Default constructor for SdncHealVfModuleParameter
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+}
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParametersInfo.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParametersInfo.java
new file mode 100644
index 000000000..4515b9790
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParametersInfo.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved.
+ * Modifications Copyright (C) 2019 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.onap.policy.sdnc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.util.LinkedList;
+import java.util.List;
+
+public class SdncHealVfModuleParametersInfo implements Serializable {
+
+ private static final long serialVersionUID = 3208673205100673119L;
+
+ @SerializedName("param")
+ private List<SdncHealVfModuleParameter> parameters;
+
+ public SdncHealVfModuleParametersInfo() {
+ // Default constructor for SdncHealVfModuleParametersInfo
+ parameters = new LinkedList<>();
+ }
+
+ public List<SdncHealVfModuleParameter> getParameters() {
+ return parameters;
+ }
+
+ public void setParameters(List<SdncHealVfModuleParameter> parameters) {
+ this.parameters = parameters;
+ }
+
+ public void addParameters(SdncHealVfModuleParameter parameter) {
+ parameters.add(parameter);
+ }
+}
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleRequestInput.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleRequestInput.java
new file mode 100644
index 000000000..c903c77fa
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleRequestInput.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved.
+ * Modifications Copyright (C) 2019 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.onap.policy.sdnc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SdncHealVfModuleRequestInput implements Serializable {
+
+ private static final long serialVersionUID = 3208673205100673119L;
+
+ @SerializedName("vf-module-input-parameters")
+ private SdncHealVfModuleParametersInfo vfModuleParametersInfo;
+
+ public SdncHealVfModuleRequestInput() {
+ // Default constructor for SdncHealVfModuleRequestInput
+ }
+
+ public SdncHealVfModuleParametersInfo getVfModuleParametersInfo() {
+ return vfModuleParametersInfo;
+ }
+
+ public void setVfModuleParametersInfo(SdncHealVfModuleParametersInfo info) {
+ this.vfModuleParametersInfo = info;
+ }
+}
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVnfInfo.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVnfInfo.java
new file mode 100644
index 000000000..67eaa3b93
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVnfInfo.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved.
+ * Modifications Copyright (C) 2019 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.onap.policy.sdnc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SdncHealVnfInfo implements Serializable {
+
+ private static final long serialVersionUID = 3208673205100673119L;
+
+ @SerializedName("vnf-id")
+ private String vnfId;
+
+ public SdncHealVnfInfo() {
+ // Default constructor for SdncHealVnfInfo
+ }
+
+ public String getVnfId() {
+ return vnfId;
+ }
+
+ public void setVnfId(String vnfId) {
+ this.vnfId = vnfId;
+ }
+}
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java
index 5770a23c5..864ddf506 100644
--- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java
+++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java
@@ -97,7 +97,7 @@ public final class SdncManager implements Runnable {
responseError.setResponseOutput(responseOutput);
headers.put("Accept", "application/json");
- String sdncUrl = sdncUrlBase + "/GENERIC-RESOURCE-API:network-topology-operation";
+ String sdncUrl = sdncUrlBase + sdncRequest.getUrl();
try {
String sdncRequestJson = Serialization.gsonPretty.toJson(sdncRequest);
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java
index 4aaa844cd..b2be02035 100644
--- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java
+++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Huawei. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019 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.
@@ -20,6 +21,7 @@
package org.onap.policy.sdnc;
import com.google.gson.annotations.SerializedName;
+
import java.io.Serializable;
import java.util.UUID;
@@ -29,6 +31,7 @@ public class SdncRequest implements Serializable {
// These fields are not serialized and not part of JSON
private transient String nsInstanceId;
private transient UUID requestId;
+ private transient String url;
@SerializedName("input")
private SdncHealRequest healRequest;
@@ -60,4 +63,12 @@ public class SdncRequest implements Serializable {
public void setHealRequest(SdncHealRequest healRequest) {
this.healRequest = healRequest;
}
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
}