AAI-1552 Add resource-version property to CCVPN uc 75/63375/6
authorKeong Lim <keong.lim@huawei.com>
Wed, 29 Aug 2018 05:32:13 +0000 (15:32 +1000)
committerKeong Lim <keong.lim@huawei.com>
Mon, 10 Sep 2018 16:36:11 +0000 (02:36 +1000)
Issue-ID: AAI-1552
Add resource-version property to all the new CCVPN schema elements.
The other ONAP components expect to have this property available for
optimistic concurrency control usage.

Change-Id: I69071d48cb0b784fe67498d51361bb304a22ead9
Signed-off-by: Keong Lim <keong.lim@huawei.com>
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v14.xsd
aai-schema/src/main/resources/onap/oxm/v14/aai_oxm_v14.xml

index 3058980..c31850d 100644 (file)
@@ -3934,6 +3934,13 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
             </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>
@@ -8547,6 +8554,13 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
             </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>
@@ -8648,6 +8662,13 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
             </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>
@@ -8742,6 +8763,13 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
             </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:dhcp-services" minOccurs="0"/>
         <xs:element ref="tns:relationship-list" minOccurs="0"/>
       </xs:sequence>
@@ -8802,6 +8830,13 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
             </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>
@@ -8903,6 +8938,13 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
             </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>
@@ -9004,6 +9046,13 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
             </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>
@@ -9126,6 +9175,13 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
             </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>
@@ -9283,6 +9339,13 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
             </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>
@@ -9321,6 +9384,13 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
             </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:esr-system-info" minOccurs="0"/>
         <xs:element ref="tns:relationship-list" minOccurs="0"/>
       </xs:sequence>
index a369c50..b05a867 100644 (file)
                         <xml-property name="description" value="Store the callsource of this sp-partner." />
                     </xml-properties>
                 </xml-element>
+                               <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String">
+                                       <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="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="resourceVersion" name="resource-version" type="java.lang.String">
+                                       <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 output-bandwidth of this lan-port-config." />
                                        </xml-properties>
                                </xml-element>
+                               <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String">
+                                       <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="dhcpServices" name="dhcp-services" type="inventory.aai.onap.org.v14.DhcpServices" />
                                <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v14.RelationshipList" />
                        </java-attributes>
                                                <xml-property name="description" value="Store the nbns of this dhcp-service." />
                                        </xml-properties>
                                </xml-element>
+                               <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String">
+                                       <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 link to get more information for this object." />
                                        </xml-properties>
                                </xml-element>
+                               <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String">
+                                       <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>
+
                                <!-- Want to use pnf as sub-component, but workaround is to use COUSIN edge in relationship-list.
                                <xml-element java-attribute="pnfs" name="pnfs" type="inventory.aai.onap.org.v14.Pnfs" /> -->
                                <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v14.RelationshipList" />
                                                <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="resourceVersion" name="resource-version" type="java.lang.String">
+                                       <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="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="resourceVersion" name="resource-version" type="java.lang.String">
+                                       <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="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="resourceVersion" name="resource-version" type="java.lang.String">
+                                       <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="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="resourceVersion" name="resource-version" type="java.lang.String">
+                                       <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="Schema version of the referenced AAI." />
                                        </xml-properties>
                                </xml-element>
+                               <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String">
+                                       <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="esrSystemInfo" name="esr-system-info" type="inventory.aai.onap.org.v14.EsrSystemInfo" />
 
                                <!-- Want to use these as sub-components, but workaround is to use COUSIN edges in relationship-list.