AAI-1467 Add sp-partner schema for CCVPN 63/60463/8
authorKeong Lim <keong.lim@huawei.com>
Mon, 13 Aug 2018 05:25:36 +0000 (15:25 +1000)
committerKeong Lim <keong.lim@huawei.com>
Fri, 24 Aug 2018 07:13:34 +0000 (17:13 +1000)
Issue-ID: AAI-1467
Add sp-partners sub-component to "business" namespace.
Add sp-partners element, which is sequence of "sp-partner".
Add sp-partner element, which has properties:
sp-partner-id, url, callsource, relationshipList
Make the following properties indexed:
sp-partner-id, url, callsource
Add CCVPN EdgeRules for sp-partner to service-instance.

Change-Id: I6de65ae843f0139cdd284f9261f993d36224dc1e
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/dbedgerules/v14/DbEdgeRules_ccvpn_v14.json
aai-schema/src/main/resources/onap/oxm/v14/aai_oxm_v14.xml

index 210bfb1..1d1ff72 100644 (file)
@@ -3841,6 +3841,51 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
       </xs:sequence>
     </xs:complexType>
   </xs:element>
+  <xs:element name="sp-partner">
+    <xs:complexType>
+      <xs:annotation>
+        <xs:appinfo>
+          <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Instance of an sp-partner",indexedProps="sp-partner-id,url,callsource",nameProps="sp-partner-id",searchable="sp-partner-id",uniqueProps="sp-partner-id",container="sp-partners",namespace="business")</annox:annotate>
+        </xs:appinfo>
+      </xs:annotation>
+      <xs:sequence>
+        <xs:element name="sp-partner-id" type="xs:string">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(isKey=true,description="Uniquely identifies this sp-partner by id")</annox:annotate>
+            </xs:appinfo>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="url" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the URL of this sp-partner.")</annox:annotate>
+            </xs:appinfo>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="callsource" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the callsource of this sp-partner.")</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="sp-partners">
+    <xs:complexType>
+      <xs:annotation>
+        <xs:appinfo>
+          <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Collection of sp-partners")</annox:annotate>
+        </xs:appinfo>
+      </xs:annotation>
+      <xs:sequence>
+        <xs:element ref="tns:sp-partner" minOccurs="0" maxOccurs="5000"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
   <xs:element name="business">
     <xs:complexType>
       <xs:annotation>
@@ -3855,6 +3900,7 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
         <xs:element ref="tns:owning-entities" minOccurs="0"/>
         <xs:element ref="tns:platforms" minOccurs="0"/>
         <xs:element ref="tns:projects" minOccurs="0"/>
+        <xs:element ref="tns:sp-partners" minOccurs="0"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
index cb1e0e6..468e6a8 100644 (file)
                "prevent-delete": "NONE",
                "default": "true",
                "description":"For CCVPN Usecase"
+       },
+       {
+               "from": "sp-partner",
+               "to": "service-instance",
+               "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"
        }
   ]
 }
index 92aa298..1f0e81b 100644 (file)
                                <xml-element java-attribute="owningEntities" name="owning-entities" type="inventory.aai.onap.org.v14.OwningEntities" />
                                <xml-element java-attribute="platforms" name="platforms" type="inventory.aai.onap.org.v14.Platforms" />
                                <xml-element java-attribute="projects" name="projects" type="inventory.aai.onap.org.v14.Projects" />
+
+                               <xml-element java-attribute="spPartners" name="sp-partners" type="inventory.aai.onap.org.v14.SpPartners" />
                        </java-attributes>
                </java-type>
 
                        </xml-properties>
                </java-type>
 
+               <java-type name="SpPartner">
+                       <xml-root-element name="sp-partner" />
+                       <java-attributes>
+                               <xml-element java-attribute="spPartnerId" name="sp-partner-id" required="true" type="java.lang.String" xml-key="true">
+                                       <xml-properties>
+                                               <xml-property name="description" value="Uniquely identifies this sp-partner by id" />
+                                       </xml-properties>
+                               </xml-element>
+                               <xml-element java-attribute="url" name="url" type="java.lang.String">
+                                       <xml-properties>
+                                               <xml-property name="description" value="Store the URL of this sp-partner." />
+                                       </xml-properties>
+                               </xml-element>
+                               <xml-element java-attribute="callsource" name="callsource" type="java.lang.String">
+                                       <xml-properties>
+                                               <xml-property name="description" value="Store the callsource of this sp-partner." />
+                                       </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="Instance of an sp-partner" />
+                               <xml-property name="indexedProps" value="sp-partner-id,url,callsource" />
+                               <xml-property name="nameProps" value="sp-partner-id" />
+                               <xml-property name="searchable" value="sp-partner-id" />
+                               <xml-property name="uniqueProps" value="sp-partner-id" />
+                               <xml-property name="container" value="sp-partners" />
+                               <xml-property name="namespace" value="business" />
+                       </xml-properties>
+               </java-type>
+               <java-type name="SpPartners">
+                       <xml-root-element name="sp-partners" />
+                       <xml-properties>
+                               <xml-property name="description" value="Collection of sp-partners" />
+                       </xml-properties>
+                       <java-attributes>
+                               <xml-element container-type="java.util.ArrayList" java-attribute="spPartner" name="sp-partner" type="inventory.aai.onap.org.v14.SpPartner" />
+                       </java-attributes>
+               </java-type>
+
        </java-types>
 </xml-bindings>