summaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl/aai
diff options
context:
space:
mode:
authorJoseph Chou <jc2555@att.com>2017-09-22 11:37:03 -0400
committerJoseph Chou <jc2555@att.com>2017-09-22 11:39:00 -0400
commit5cbb85e6bbd2ade9f35931980b55bc6bc48da9a2 (patch)
tree17a1c3a36d6529d373b18715c96ca42a933757c6 /controlloop/common/model-impl/aai
parent7d39eea7a0537b4a1dd6f0d1ac9d30b268e1d91d (diff)
Create common object to consolidate AAI response
Create base object for AAI GET query Change-Id: I874b10f89054d8adcc28b1e601e9ff15ee884784 Issue-ID: POLICY-228 Signed-off-by: Joseph Chou <jc2555@att.com>
Diffstat (limited to 'controlloop/common/model-impl/aai')
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETResponse.java14
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETResponseWrapper.java43
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETVnfResponse.java19
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETVserverResponse.java16
4 files changed, 16 insertions, 76 deletions
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETResponse.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETResponse.java
index d2e2d710f..46a4e5080 100644
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETResponse.java
+++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETResponse.java
@@ -27,10 +27,22 @@ import com.google.gson.annotations.SerializedName;
public class AAIGETResponse implements Serializable {
/**
- *
+ * define common fields for AAIGETVnfResponse and AAIGETVserverResponse
*/
private static final long serialVersionUID = 7311418432051756161L;
+ @SerializedName("in-maint")
+ public String inMaint;
+
+ @SerializedName("is-closed-loop-disabled")
+ public String isClosedLoopDisabled;
+
+ @SerializedName("model-invariant-id")
+ public String modelInvariantId;
+
+ @SerializedName("resource-version")
+ public String resourceVersion;
+
@SerializedName("relationship-list")
public RelationshipList relationshipList;
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETResponseWrapper.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETResponseWrapper.java
deleted file mode 100644
index a641383df..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETResponseWrapper.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.onap.policy.aai;
-
-import java.io.Serializable;
-import java.util.UUID;
-import org.onap.policy.aai.AAIGETResponse;
-
-public class AAIGETResponseWrapper implements Serializable {
- /**
- *
- */
- private static final long serialVersionUID = 9167822470867043968L;
-
- public UUID requestID;
- public AAIGETResponse aairesponse;
-
- public AAIGETResponseWrapper() {
-
- }
-
- public AAIGETResponseWrapper(UUID requestID, AAIGETResponse aairesponse){
- this.requestID = requestID;
- this.aairesponse = aairesponse;
- }
-} \ No newline at end of file
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETVnfResponse.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETVnfResponse.java
index 24361c7f6..a95502cca 100644
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETVnfResponse.java
+++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETVnfResponse.java
@@ -24,13 +24,13 @@ import java.io.Serializable;
import com.google.gson.annotations.SerializedName;
-public class AAIGETVnfResponse implements Serializable {
+public class AAIGETVnfResponse extends AAIGETResponse implements Serializable {
/**
*
*/
private static final long serialVersionUID = -6247505944905898870L;
-
+
@SerializedName("vnf-id")
public String vnfID;
@@ -46,21 +46,6 @@ public class AAIGETVnfResponse implements Serializable {
@SerializedName("orchestration-status")
public String orchestrationStatus;
- @SerializedName("in-maint")
- public String inMaint;
-
- @SerializedName("is-closed-loop-disabled")
- public String isClosedLoopDisabled;
-
- @SerializedName("resource-version")
- public String resourceVersion;
-
- @SerializedName("model-invariant-id")
- public String modelInvariantId;
-
- @SerializedName("relationship-list")
- public RelationshipList relationshipList;
-
public AAIGETVnfResponse() {
}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETVserverResponse.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETVserverResponse.java
index 8ab94e9a4..527bbe528 100644
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETVserverResponse.java
+++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETVserverResponse.java
@@ -24,7 +24,7 @@ import java.io.Serializable;
import com.google.gson.annotations.SerializedName;
-public class AAIGETVserverResponse implements Serializable {
+public class AAIGETVserverResponse extends AAIGETResponse implements Serializable {
/**
*
@@ -43,20 +43,6 @@ public class AAIGETVserverResponse implements Serializable {
@SerializedName("vserver-selflink")
public String vserverSelflink;
- @SerializedName("in-maint")
- public String inMaint;
-
- @SerializedName("is-closed-loop-disabled")
- public String isClosedLoopDisabled;
-
- @SerializedName("resource-version")
- public String resourceVersion;
-
- @SerializedName("model-invariant-id")
- public String modelInvariantId;
-
- public RelationshipList relationshipList;
-
public AAIGETVserverResponse() {
}