Merge "Test cases added for RequestError.java"
authorJames Forsyth <jf2512@att.com>
Wed, 19 Sep 2018 17:06:04 +0000 (17:06 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 19 Sep 2018 17:06:04 +0000 (17:06 +0000)
aai-core/pom.xml
aai-core/src/test/java/org/onap/aai/domain/restPolicyException/PolicyExceptionTest.java [new file with mode: 0644]
aai-core/src/test/java/org/onap/aai/util/MapperUtilTest.java
aai-schema-ingest/pom.xml
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v14.xsd
aai-schema/src/main/resources/onap/dbedgerules/v14/DbEdgeRules_ccvpn_v14.json
aai-schema/src/main/resources/onap/dbedgerules/v14/DbEdgeRules_pnp_v14.json [new file with mode: 0644]
aai-schema/src/main/resources/onap/oxm/v14/aai_oxm_v14.xml
aai-schema/src/main/resources/onap/oxm/v14/aai_pnp_oxm_v14.xml [new file with mode: 0644]
aai-utils/pom.xml

index 4715bcf..6ba7699 100644 (file)
         <eelf.core.version>1.0.0</eelf.core.version>
         <logback.version>1.2.3</logback.version>
         <freemarker.version>2.3.21</freemarker.version>
-        <activemq.version>5.15.3</activemq.version>
+        <activemq.version>5.15.6</activemq.version>
         <jacoco.line.coverage.limit>0.50</jacoco.line.coverage.limit>
         <gremlin.version>3.2.2</gremlin.version>
-        <jetty.version>9.4.6.v20170531</jetty.version>
+       <groovy.version>2.4.15</groovy.version>
+        <jetty.version>9.4.11.v20180605</jetty.version>
 
         <!-- Start of Default ONAP Schema Properties -->
         <aai.wiki.link>https://wiki.onap.org/</aai.wiki.link>
                     <groupId>org.slf4j</groupId>
                     <artifactId>slf4j-log4j12</artifactId>
                 </exclusion>
+                <exclusion>
+                    <groupId>dom4j</groupId>
+                    <artifactId>dom4j</artifactId>
+                </exclusion>
             </exclusions>
         </dependency>
         <dependency>
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-web</artifactId>
-            <version>4.3.6.RELEASE</version>
+            <version>4.3.18.RELEASE</version>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-context</artifactId>
-            <version>4.3.6.RELEASE</version>
+            <version>4.3.18.RELEASE</version>
         </dependency>
         <dependency>
             <groupId>javax.xml.bind</groupId>
             <artifactId>json-patch</artifactId>
             <version>1.9</version>
         </dependency>
+       <dependency>
+         <groupId>org.codehaus.groovy</groupId>
+         <artifactId>groovy</artifactId>
+         <version>${groovy.version}</version>
+         <classifier>indy</classifier>
+       </dependency>
          <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-test</artifactId>
-            <version>4.3.16.RELEASE</version>
+            <version>4.3.18.RELEASE</version>
             <scope>test</scope>
         </dependency>
         <dependency>
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-jms</artifactId>
-            <version>4.3.16.RELEASE</version>
+            <version>4.3.18.RELEASE</version>
         </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
diff --git a/aai-core/src/test/java/org/onap/aai/domain/restPolicyException/PolicyExceptionTest.java b/aai-core/src/test/java/org/onap/aai/domain/restPolicyException/PolicyExceptionTest.java
new file mode 100644 (file)
index 0000000..e537c3d
--- /dev/null
@@ -0,0 +1,68 @@
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Modifications Copyright © 2018 IBM.
+ * ================================================================================
+ * 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.aai.domain.restPolicyException;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.aai.AAISetup;
+
+public class PolicyExceptionTest extends AAISetup{
+    private PolicyException exception;
+    
+    @Before
+    public void setup() {
+        exception = new PolicyException();
+    }
+
+    @Test
+    public void testGetAdditionalProperty() throws Exception {
+        exception.setAdditionalProperty("property1", "value1");
+        assertEquals(exception.getAdditionalProperties().get("property1"), "value1");
+    }
+    
+    @Test
+    public void testGetMessageId() throws Exception {
+        exception.setMessageId("samplemessage");
+        assertEquals(exception.getMessageId(), "samplemessage");
+    }
+    
+    @Test
+    public void testGetText() throws Exception {
+        exception.setText("sampletext");
+        assertEquals(exception.getText(), "sampletext");
+    }
+
+    @Test
+    public void testGetVariables() throws Exception {
+        List<String> expectedVariables = new ArrayList<>();
+        expectedVariables.add("firstvariable");
+        expectedVariables.add("secondvariable");
+        exception.setVariables(expectedVariables);
+        assertEquals(exception.getVariables(), expectedVariables);
+        
+    }
+}
index 309d133..2d68f83 100644 (file)
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ *  Modifications Copyright © 2018 IBM.
+ * ================================================================================
  * 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
@@ -27,44 +29,61 @@ import static org.junit.Assert.assertEquals;
 
 public class MapperUtilTest {
 
-       public class SampleClass { 
-           private String color; 
-           private String shape; 
-           public SampleClass(String c, String s){
-               color = c; 
-               shape = s; 
-           }
+    
 
-               public String getColor() {
-                       return color;
-               }
+    private JSONObject expectedJson;
+    private JSONObject sampleJson;
 
-               public void setColor(String color) {
-                       this.color = color;
-               }
+    @Before
+    public void setup(){
+       expectedJson = new JSONObject();
+       sampleJson = new JSONObject();
+    }
 
-               public String getShape() {
-                       return shape;
-               }
+    @Test
+    public void writeAsJSONStringTest() throws Exception {
+        expectedJson.put("color", "black");
+        expectedJson.put("shape", "box");
+        SampleClass sample = new SampleClass("black", "box");
+        assertEquals(expectedJson.toString(), MapperUtil.writeAsJSONString(sample));
+    } 
+    
+    @Test
+    public void readAsObjectOfTest() throws Exception {
+        sampleJson.put("color", "black");
+        sampleJson.put("shape", "box");
+        SampleClass expectedObject = new SampleClass("black", "box");
+        SampleClass actualObject = MapperUtil.readAsObjectOf(SampleClass.class, sampleJson.toString());
+        assertEquals(expectedObject.getColor(), actualObject.getColor());
+        assertEquals(expectedObject.getShape(), actualObject.getShape());
+    } 
+}
 
-               public void setShape(String shape) {
-                       this.shape = shape;
-               }
-       }
+class SampleClass { 
+    private String color; 
+    private String shape; 
 
-       private JSONObject expectedJson;
+    public SampleClass() {
+        
+    }
+    public SampleClass(String c, String s){
+        color = c; 
+        shape = s; 
+    }
 
-       @Before
-       public void setup(){
-       expectedJson = new JSONObject();
-       }
+    public String getColor() {
+        return color;
+    }
+
+    public void setColor(String color) {
+        this.color = color;
+    }
+
+    public String getShape() {
+        return shape;
+    }
 
-       @Test
-       public void writeAsJSONStringTest() throws Exception {
-           expectedJson.put("color", "black");
-               expectedJson.put("shape", "box");
-               SampleClass sample = new SampleClass("black", "box");
-               assertEquals(expectedJson.toString(), MapperUtil.writeAsJSONString(sample));
-       } 
+    public void setShape(String shape) {
+        this.shape = shape;
+    }
 }
index ab8be11..71869c9 100644 (file)
             <artifactId>guava</artifactId>
             <version>16.0</version>
         </dependency>
+       <dependency>
+         <groupId>org.codehaus.groovy</groupId>
+         <artifactId>groovy</artifactId>
+         <version>2.4.15</version>
+         <classifier>indy</classifier>
+       </dependency>
         <dependency>
             <groupId>org.apache.tinkerpop</groupId>
             <artifactId>gremlin-core</artifactId>
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-context</artifactId>
-            <version>4.3.16.RELEASE</version>
+            <version>4.3.18.RELEASE</version>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-test</artifactId>
-            <version>4.3.16.RELEASE</version>
+            <version>4.3.18.RELEASE</version>
         </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
index 9725b6f..2ffbf47 100644 (file)
@@ -2212,11 +2212,11 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
           </xs:annotation>
         </xs:element>
         <xs:element name="openstack-region-id" type="xs:string" minOccurs="0">
-          <xs:annotation>\r
-            <xs:appinfo>\r
-              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="OpenStack region ID used by MultiCloud plugin to interact with an OpenStack instance.")</annox:annotate>\r
-            </xs:appinfo>\r
-          </xs:annotation>\r
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="OpenStack region ID used by MultiCloud plugin to interact with an OpenStack instance.")</annox:annotate>
+            </xs:appinfo>
+          </xs:annotation>
         </xs:element>
         <xs:element name="resource-version" type="xs:string" minOccurs="0">
           <xs:annotation>
@@ -2670,6 +2670,39 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
       </xs:sequence>
     </xs:complexType>
   </xs:element>
+  <xs:element name="hpa-capacity">
+    <xs:complexType>
+      <xs:annotation>
+        <xs:appinfo>
+          <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="HPA Capacity information for compute node",indexedProps="hpa-capacity-key",dependentOn="hpa-capacity")</annox:annotate>
+        </xs:appinfo>
+      </xs:annotation>
+      <xs:sequence>
+        <xs:element name="hpa-capacity-key" type="xs:string">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(isKey=true,description="Composite key formed with hpaFeature and append list of hpaFeatureAttributes needed for capacity check")</annox:annotate>
+            </xs:appinfo>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="hpa-capacity-value" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="JSON string specifying the capacity (total,free), unit and metadata of the specific HPA attribute")</annox:annotate>
+            </xs:appinfo>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="resource-version" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Used for optimistic concurrency.  Must be empty on create, valid on update and delete.")</annox:annotate>
+            </xs:appinfo>
+          </xs:annotation>
+        </xs:element>
+        <xs:element ref="tns:relationship-list" minOccurs="0"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
   <xs:element name="pserver">
     <xs:complexType>
       <xs:annotation>
@@ -2870,6 +2903,7 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
         <xs:element ref="tns:relationship-list" minOccurs="0"/>
         <xs:element ref="tns:p-interfaces" minOccurs="0"/>
         <xs:element ref="tns:lag-interfaces" minOccurs="0"/>
+        <xs:element ref="tns:hpa-capacity" minOccurs="0" maxOccurs="5000"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
@@ -3948,6 +3982,34 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
             </xs:appinfo>
           </xs:annotation>
         </xs:element>
+        <xs:element name="operational-status" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the operational-status for this sp-partner.")</annox:annotate>
+            </xs:appinfo>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="model-customization-id" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the model-customization-id for this sp-partner.")</annox:annotate>
+            </xs:appinfo>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="model-invariant-id" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="the ASDC model id for this sp-partner model.",visibility="deployment",requires="model-version-id",dbAlias="model-invariant-id-local")</annox:annotate>
+            </xs:appinfo>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="model-version-id" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="the ASDC model version for this sp-partner model.",visibility="deployment",requires="model-invariant-id",dbAlias="model-version-id-local",privateEdge="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}")</annox:annotate>
+            </xs:appinfo>
+          </xs:annotation>
+        </xs:element>
         <xs:element ref="tns:relationship-list" minOccurs="0"/>
       </xs:sequence>
     </xs:complexType>
@@ -9080,7 +9142,7 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
     <xs:complexType>
       <xs:annotation>
         <xs:appinfo>
-          <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Instance of a device",indexedProps="device-id,device-name,esn,vendor,class,type,version,system-ip,operational-status",nameProps="device-name",searchable="device-id",uniqueProps="device-id",container="devices",namespace="network")</annox:annotate>
+          <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Instance of a device",indexedProps="device-id,device-name,esn,vendor,class,type,version,system-ip,system-ipv4,system-ipv6,operational-status",nameProps="device-name",searchable="device-id",uniqueProps="device-id",container="devices",namespace="network")</annox:annotate>
         </xs:appinfo>
       </xs:annotation>
       <xs:sequence>
@@ -9147,6 +9209,20 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
             </xs:appinfo>
           </xs:annotation>
         </xs:element>
+        <xs:element name="system-ipv4" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the system-ipv4 of this device.")</annox:annotate>
+            </xs:appinfo>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="system-ipv6" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the system-ipv6 of this device.")</annox:annotate>
+            </xs:appinfo>
+          </xs:annotation>
+        </xs:element>
         <xs:element name="selflink" type="xs:string" minOccurs="0">
           <xs:annotation>
             <xs:appinfo>
@@ -9209,7 +9285,7 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
     <xs:complexType>
       <xs:annotation>
         <xs:appinfo>
-          <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Instance of a wan-port-config",indexedProps="wan-port-config-id,wan-port-config-name,device-id,ip-address,port-type,port-number,device-port-id,wan-port-id,operational-status",nameProps="wan-port-config-name",searchable="wan-port-config-id",uniqueProps="wan-port-config-id",container="wan-port-configs",namespace="network")</annox:annotate>
+          <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Instance of a wan-port-config",indexedProps="wan-port-config-id,wan-port-config-name,device-id,ip-address,ipv4-address,ipv6-address,port-type,port-number,device-port-id,wan-port-id,operational-status",nameProps="wan-port-config-name",searchable="wan-port-config-id",uniqueProps="wan-port-config-id",container="wan-port-configs",namespace="network")</annox:annotate>
         </xs:appinfo>
       </xs:annotation>
       <xs:sequence>
@@ -9248,6 +9324,20 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
             </xs:appinfo>
           </xs:annotation>
         </xs:element>
+        <xs:element name="ipv4-address" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the ipv4-address of this wan-port-config.")</annox:annotate>
+            </xs:appinfo>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="ipv6-address" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the ipv6-address of this wan-port-config.")</annox:annotate>
+            </xs:appinfo>
+          </xs:annotation>
+        </xs:element>
         <xs:element name="provider-ip-address" type="xs:string" minOccurs="0">
           <xs:annotation>
             <xs:appinfo>
@@ -9255,6 +9345,20 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
             </xs:appinfo>
           </xs:annotation>
         </xs:element>
+        <xs:element name="provider-ipv4-address" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the provider-ipv4-address of this wan-port-config.")</annox:annotate>
+            </xs:appinfo>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="provider-ipv6-address" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the provider-ipv6-address of this wan-port-config.")</annox:annotate>
+            </xs:appinfo>
+          </xs:annotation>
+        </xs:element>
         <xs:element name="input-bandwidth" type="xs:string" minOccurs="0">
           <xs:annotation>
             <xs:appinfo>
index a43c756..1b6d940 100644 (file)
                "default": "true",
                "description":"For CCVPN Usecase"
        },
+       {
+               "from": "sdwan-vpn",
+               "to": "tenant",
+               "label": "org.onap.relationships.inventory.PartOf",
+               "direction": "OUT",
+               "multiplicity": "ONE2MANY",
+               "contains-other-v": "NONE",
+               "delete-other-v": "NONE",
+               "prevent-delete": "NONE",
+               "default": "true",
+               "description":"For CCVPN Usecase"
+       },
+       {
+               "from": "sdwan-vpn",
+               "to": "vpn-binding",
+               "label": "org.onap.relationships.inventory.PartOf",
+               "direction": "OUT",
+               "multiplicity": "ONE2MANY",
+               "contains-other-v": "NONE",
+               "delete-other-v": "NONE",
+               "prevent-delete": "NONE",
+               "default": "true",
+               "description":"For CCVPN Usecase"
+       },
        {
                "from": "device",
                "to": "service-instance",
diff --git a/aai-schema/src/main/resources/onap/dbedgerules/v14/DbEdgeRules_pnp_v14.json b/aai-schema/src/main/resources/onap/dbedgerules/v14/DbEdgeRules_pnp_v14.json
new file mode 100644 (file)
index 0000000..5f8f430
--- /dev/null
@@ -0,0 +1,17 @@
+{
+  "rules": [
+    {
+      "from": "software-version",
+      "to": "pnf",
+      "label": "org.onap.relationships.inventory.BelongsTo",
+      "direction": "OUT",
+      "multiplicity": "MANY2ONE",
+      "contains-other-v": "!${direction}",
+      "delete-other-v": "NONE",
+      "SVC-INFRA": "NONE",
+      "prevent-delete": "!${direction}",
+      "default": "true",
+      "description":""
+    }
+  ]
+}
index 263703b..2b698e2 100644 (file)
                                                <xml-property name="description" value="Used for optimistic concurrency.  Must be empty on create, valid on update and delete."/>
                                        </xml-properties>
                                </xml-element>
+                               <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String">
+                                       <xml-properties>
+                                               <xml-property name="description" value="Store the operational-status for this sp-partner." />
+                                       </xml-properties>
+                               </xml-element>
+                               <xml-element java-attribute="modelCustomizationId" name="model-customization-id" type="java.lang.String">
+                                       <xml-properties>
+                                               <xml-property name="description" value="Store the model-customization-id for this sp-partner." />
+                                       </xml-properties>
+                               </xml-element>
+                               <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String">
+                                       <xml-properties>
+                                               <xml-property name="description" value="the ASDC model id for this sp-partner model." />
+                                               <xml-property name="visibility" value="deployment" />
+                                               <xml-property name="requires" value="model-version-id" />
+                                               <xml-property name="dbAlias" value="model-invariant-id-local" />
+                                       </xml-properties>
+                               </xml-element>
+                               <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String">
+                                       <xml-properties>
+                                               <xml-property name="description" value="the ASDC model version for this sp-partner model." />
+                                               <xml-property name="visibility" value="deployment" />
+                                               <xml-property name="requires" value="model-invariant-id" />
+                                               <xml-property name="dbAlias" value="model-version-id-local" />
+                                               <xml-property name="privateEdge" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}"/>
+                                       </xml-properties>
+                               </xml-element>
+
                 <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v14.RelationshipList" />
             </java-attributes>
             <xml-properties>
                                                <xml-property name="description" value="Used for optimistic concurrency.  Must be empty on create, valid on update and delete."/>
                                        </xml-properties>
                                </xml-element>
+
                                <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v14.RelationshipList" />
                        </java-attributes>
                        <xml-properties>
                                                <xml-property name="description" value="Store the system-ip of this device." />
                                        </xml-properties>
                                </xml-element>
+                               <xml-element java-attribute="systemIpv4" name="system-ipv4" type="java.lang.String">
+                                       <xml-properties>
+                                               <xml-property name="description" value="Store the system-ipv4 of this device." />
+                                       </xml-properties>
+                               </xml-element>
+                               <xml-element java-attribute="systemIpv6" name="system-ipv6" type="java.lang.String">
+                                       <xml-properties>
+                                               <xml-property name="description" value="Store the system-ipv6 of this device." />
+                                       </xml-properties>
+                               </xml-element>
                                <xml-element java-attribute="selflink" name="selflink" type="java.lang.String">
                                        <xml-properties>
                                                <xml-property name="description" value="Store the link to get more information for this object." />
                        </java-attributes>
                        <xml-properties>
                                <xml-property name="description" value="Instance of a device" />
-                               <xml-property name="indexedProps" value="device-id,device-name,esn,vendor,class,type,version,system-ip,operational-status" />
+                               <xml-property name="indexedProps" value="device-id,device-name,esn,vendor,class,type,version,system-ip,system-ipv4,system-ipv6,operational-status" />
                                <xml-property name="nameProps" value="device-name" />
                                <xml-property name="searchable" value="device-id" />
                                <xml-property name="uniqueProps" value="device-id" />
                                                <xml-property name="description" value="Store the ip-address of this wan-port-config." />
                                        </xml-properties>
                                </xml-element>
+                               <xml-element java-attribute="ipv4Address" name="ipv4-address" type="java.lang.String">
+                                       <xml-properties>
+                                               <xml-property name="description" value="Store the ipv4-address of this wan-port-config." />
+                                       </xml-properties>
+                               </xml-element>
+                               <xml-element java-attribute="ipv6Address" name="ipv6-address" type="java.lang.String">
+                                       <xml-properties>
+                                               <xml-property name="description" value="Store the ipv6-address of this wan-port-config." />
+                                       </xml-properties>
+                               </xml-element>
                                <xml-element java-attribute="providerIpAddress" name="provider-ip-address" type="java.lang.String">
                                        <xml-properties>
                                                <xml-property name="description" value="Store the provider-ip-address of this wan-port-config." />
                                        </xml-properties>
                                </xml-element>
+                               <xml-element java-attribute="providerIpv4Address" name="provider-ipv4-address" type="java.lang.String">
+                                       <xml-properties>
+                                               <xml-property name="description" value="Store the provider-ipv4-address of this wan-port-config." />
+                                       </xml-properties>
+                               </xml-element>
+                               <xml-element java-attribute="providerIpv6Address" name="provider-ipv6-address" type="java.lang.String">
+                                       <xml-properties>
+                                               <xml-property name="description" value="Store the provider-ipv6-address of this wan-port-config." />
+                                       </xml-properties>
+                               </xml-element>
                                <xml-element java-attribute="inputBandwidth" name="input-bandwidth" type="java.lang.String">
                                        <xml-properties>
                                                <xml-property name="description" value="Store the input-bandwidth of this wan-port-config." />
                        </java-attributes>
                        <xml-properties>
                                <xml-property name="description" value="Instance of a wan-port-config" />
-                               <xml-property name="indexedProps" value="wan-port-config-id,wan-port-config-name,device-id,ip-address,port-type,port-number,device-port-id,wan-port-id,operational-status" />
+                               <xml-property name="indexedProps" value="wan-port-config-id,wan-port-config-name,device-id,ip-address,ipv4-address,ipv6-address,port-type,port-number,device-port-id,wan-port-id,operational-status" />
                                <xml-property name="nameProps" value="wan-port-config-name" />
                                <xml-property name="searchable" value="wan-port-config-id" />
                                <xml-property name="uniqueProps" value="wan-port-config-id" />
diff --git a/aai-schema/src/main/resources/onap/oxm/v14/aai_pnp_oxm_v14.xml b/aai-schema/src/main/resources/onap/oxm/v14/aai_pnp_oxm_v14.xml
new file mode 100644 (file)
index 0000000..11563c5
--- /dev/null
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  ============LICENSE_START=======================================================
+  org.onap.aai
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+  Copyright (C) 2018 Huawei Technologies (Australia) Pty 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=========================================================
+  -->
+
+<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.v14" xml-mapping-metadata-complete="true">
+       <xml-schema element-form-default="QUALIFIED">
+               <xml-ns namespace-uri="http://org.onap.aai.inventory/v14" />
+       </xml-schema>
+       <java-types>
+               <java-type name="Pnf">
+                       <xml-root-element name="pnf" />
+                       <java-attributes>
+                               <xml-element java-attribute="pnfIpv4Address" name="pnf-ipv4-address" type="java.lang.String">
+                                       <xml-properties>
+                                               <xml-property name="description" value="This is the IP address (IPv4) for the PNF itself. This is the IPv4 address that the PNF iself can be accessed at." />
+                                       </xml-properties>
+                               </xml-element>
+                               <xml-element java-attribute="pnfIpv6Address" name="pnf-ipv6-address" type="java.lang.String">
+                                       <xml-properties>
+                                               <xml-property name="description" value="This is the IP address (IPv6) for the PNF itself. This is the IPv6 address that the PNF iself can be accessed at." />
+                                       </xml-properties>
+                               </xml-element>
+                               <xml-element java-attribute="softwareVersions" name="software-versions" type="inventory.aai.onap.org.v14.SoftwareVersions" />
+                       </java-attributes>
+               </java-type>
+               <java-type name="SoftwareVersions">
+                       <xml-properties>
+                               <xml-property name="description" value="Collection of software versions." />
+                       </xml-properties>
+                       <xml-root-element name="software-versions" />
+                       <java-attributes>
+                               <xml-element container-type="java.util.ArrayList" java-attribute="softwareVersion" name="software-version" type="inventory.aai.onap.org.v14.SoftwareVersion" />
+                       </java-attributes>
+               </java-type>
+
+               <java-type name="SoftwareVersion">
+                       <xml-root-element name="software-version" />
+                       <java-attributes>
+                               <xml-element java-attribute="softwareVersionId" name="software-version-id" required="true" type="java.lang.String" xml-key="true">
+                                       <xml-properties>
+                                               <xml-property name="description" value="Identifier of the software version" />
+                                       </xml-properties>
+                               </xml-element>
+                               <xml-element default-value="false" java-attribute="isActiveSwVer" name="is-active-sw-ver" required="true" type="java.lang.Boolean">
+                                       <xml-properties>
+                                               <xml-property name="defaultValue" value="false"/>
+                                               <xml-property name="description" value="used to indicate whether or not this software-version is the active one (activeSw = true)" />
+                                       </xml-properties>
+                               </xml-element>
+                       </java-attributes>
+                       <xml-properties>
+                               <xml-property name="description" value="Software Version" />
+                               <xml-property name="indexedProps" value="softwareVersionId,isActiveSwVer" />
+                               <xml-property name="dependentOn" value="pnf" />
+                               <xml-property name="container" value="pnf" />
+                       </xml-properties>
+               </java-type>
+       </java-types>
+</xml-bindings>
index 5b2c702..4eadb51 100644 (file)
@@ -71,7 +71,7 @@
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-core</artifactId>
-            <version>4.3.10.RELEASE</version>
+            <version>4.3.18.RELEASE</version>
         </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>