aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl
diff options
context:
space:
mode:
authorVidyashree Rama <vidyashree.rama@huawei.com>2019-04-02 14:40:35 +0530
committerVidyashree Rama <vidyashree.rama@huawei.com>2019-04-05 12:02:38 +0530
commitc4c99f0d6cb5eeb7475ccac5c00c960b1d8f83ed (patch)
treed5312c789d268ea676273570d01c19df0d7a62b3 /controlloop/common/model-impl
parent6b3e0fcc0b0c362ce6067f0d6604ec60f984f850 (diff)
Add CCVPN Bandwidth on demand policy
CCVPN Bandwidth on demand policy Issue-ID: POLICY-1405 Change-Id: I67bceb35e5a849933b3e46772c9cbbbaab1e9a75 Signed-off-by: Vidyashree Rama <vidyashree.rama@huawei.com>
Diffstat (limited to 'controlloop/common/model-impl')
-rw-r--r--controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequest.java23
-rw-r--r--controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParameter.java54
-rw-r--r--controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParametersInfo.java50
-rw-r--r--controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleRequestInput.java43
-rw-r--r--controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVnfInfo.java43
-rw-r--r--controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java4
-rw-r--r--controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java11
7 files changed, 224 insertions, 4 deletions
diff --git a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequest.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequest.java
index 74122b845..983084878 100644
--- a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequest.java
+++ b/controlloop/common/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 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.
@@ -38,6 +38,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
}
@@ -74,4 +80,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/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParameter.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParameter.java
new file mode 100644
index 000000000..0ad772301
--- /dev/null
+++ b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParameter.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 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.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/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParametersInfo.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParametersInfo.java
new file mode 100644
index 000000000..0463c6a5a
--- /dev/null
+++ b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParametersInfo.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 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.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/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleRequestInput.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleRequestInput.java
new file mode 100644
index 000000000..98cfc7ee7
--- /dev/null
+++ b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleRequestInput.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 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.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/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVnfInfo.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVnfInfo.java
new file mode 100644
index 000000000..16a6203ec
--- /dev/null
+++ b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVnfInfo.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 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.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/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java
index 9d8c9798e..c5ce6b295 100644
--- a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java
+++ b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2018 Huawei. All rights reserved.
+ * Copyright (C) 2018-2019 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Samsung Electronics Co., Ltd.
@@ -96,7 +96,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/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java
index ad824f6c9..7590c0da4 100644
--- a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java
+++ b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2018 Huawei. All rights reserved.
+ * Copyright (C) 2018-2019 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.
@@ -29,6 +29,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 +61,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;
+ }
}