Create common object to consolidate AAI response 59/14659/1
authorJoseph Chou <jc2555@att.com>
Fri, 22 Sep 2017 15:37:03 +0000 (11:37 -0400)
committerJoseph Chou <jc2555@att.com>
Fri, 22 Sep 2017 15:39:00 +0000 (11:39 -0400)
Create base object for AAI GET query

Change-Id: I874b10f89054d8adcc28b1e601e9ff15ee884784
Issue-ID: POLICY-228
Signed-off-by: Joseph Chou <jc2555@att.com>
controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETResponse.java
controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETResponseWrapper.java [deleted file]
controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETVnfResponse.java
controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETVserverResponse.java

index d2e2d71..46a4e50 100644 (file)
@@ -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 (file)
index a641383..0000000
+++ /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
index 24361c7..a95502c 100644 (file)
@@ -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() {
        }
 
index 8ab94e9..527bbe5 100644 (file)
@@ -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() {
        }