AAI-1481 Add network-resource for CCVPN usecase 63/60663/10
authorKeong Lim <keong.lim@huawei.com>
Wed, 15 Aug 2018 05:32:17 +0000 (15:32 +1000)
committerKeong Lim <keong.lim@huawei.com>
Mon, 10 Sep 2018 15:20:53 +0000 (01:20 +1000)
Issue-ID: AAI-1481
Add network-resource element to network namespace.
Add CCVPN EdgeRules for network-resource to vpn-binding and pnf.
Update multiplicity.
Change pnf from sub-component to COUSIN edge as workaround.

Change-Id: I4b288406a272ccdb6243d1e13555a02aa6354a83
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 3b34c95..0a9f198 100644 (file)
@@ -8759,6 +8759,65 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
       </xs:sequence>
     </xs:complexType>
   </xs:element>
+  <xs:element name="network-resource">
+    <xs:complexType>
+      <xs:annotation>
+        <xs:appinfo>
+          <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Instance of a network-resource",indexedProps="network-id,provider-id,client-id,te-topo-id",nameProps="network-id",searchable="network-id",uniqueProps="network-id",container="network-resources",namespace="network")</annox:annotate>
+        </xs:appinfo>
+      </xs:annotation>
+      <xs:sequence>
+        <xs:element name="network-id" type="xs:string">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(isKey=true,description="Uniquely identifies this network-resource by id")</annox:annotate>
+            </xs:appinfo>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="provider-id" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the id of the provider of this network-resource.")</annox:annotate>
+            </xs:appinfo>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="client-id" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the id of the client of this network-resource.")</annox:annotate>
+            </xs:appinfo>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="te-topo-id" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the id of the te-topo of this network-resource.")</annox:annotate>
+            </xs:appinfo>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="selflink" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:appinfo>
+              <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the link to get more information for this object.")</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="network-resources">
+    <xs:complexType>
+      <xs:annotation>
+        <xs:appinfo>
+          <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Collection of network-resources")</annox:annotate>
+        </xs:appinfo>
+      </xs:annotation>
+      <xs:sequence>
+        <xs:element ref="tns:network-resource" minOccurs="0" maxOccurs="5000"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
   <xs:element name="network">
     <xs:complexType>
       <xs:annotation>
@@ -8791,6 +8850,7 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
         <xs:element ref="tns:vlan-tags" minOccurs="0"/>
         <xs:element ref="tns:connectivities" minOccurs="0"/>
         <xs:element ref="tns:lan-port-configs" minOccurs="0"/>
+        <xs:element ref="tns:network-resources" minOccurs="0"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
index c5f2f1d..3f77fbb 100644 (file)
                "prevent-delete": "!${direction}",
                "default": "true",
                "description":"For CCVPN Usecase"
+       },
+       {
+               "from": "network-resource",
+               "to": "vpn-binding",
+               "label": "org.onap.relationships.inventory.Uses",
+               "direction": "OUT",
+               "multiplicity": "ONE2MANY",
+               "contains-other-v": "NONE",
+               "delete-other-v": "NONE",
+               "prevent-delete": "NONE",
+               "default": "true",
+               "description":"For CCVPN Usecase"
+       },
+       {
+               "from": "pnf",
+               "to": "network-resource",
+               "label": "tosca.relationships.network.LinksTo",
+               "direction": "OUT",
+               "multiplicity": "MANY2MANY",
+               "contains-other-v": "NONE",
+               "delete-other-v": "!${direction}",
+               "prevent-delete": "${direction}",
+               "default": "true",
+               "description":"For CCVPN Usecase"
        }
   ]
 }
index 3dde240..70881b5 100644 (file)
                 <xml-element java-attribute="vlanTags" name="vlan-tags" type="inventory.aai.onap.org.v14.VlanTags"/>
                                <xml-element java-attribute="connectivities" name="connectivities" type="inventory.aai.onap.org.v14.Connectivities" />
                                <xml-element java-attribute="lanPortConfigs" name="lan-port-configs" type="inventory.aai.onap.org.v14.LanPortConfigs" />
+                               <xml-element java-attribute="networkResources" name="network-resources" type="inventory.aai.onap.org.v14.NetworkResources" />
             </java-attributes>
         </java-type>
         <java-type name="Configurations">
                        </java-attributes>
                </java-type>
 
+               <java-type name="NetworkResource">
+                       <xml-root-element name="network-resource" />
+                       <java-attributes>
+                               <xml-element java-attribute="networkId" name="network-id" required="true" type="java.lang.String" xml-key="true">
+                                       <xml-properties>
+                                               <xml-property name="description" value="Uniquely identifies this network-resource by id" />
+                                       </xml-properties>
+                               </xml-element>
+                               <xml-element java-attribute="providerId" name="provider-id" type="java.lang.String">
+                                       <xml-properties>
+                                               <xml-property name="description" value="Store the id of the provider of this network-resource." />
+                                       </xml-properties>
+                               </xml-element>
+                               <xml-element java-attribute="clientId" name="client-id" type="java.lang.String">
+                                       <xml-properties>
+                                               <xml-property name="description" value="Store the id of the client of this network-resource." />
+                                       </xml-properties>
+                               </xml-element>
+                               <xml-element java-attribute="teTopoId" name="te-topo-id" type="java.lang.String">
+                                       <xml-properties>
+                                               <xml-property name="description" value="Store the id of the te-topo of this network-resource." />
+                                       </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." />
+                                       </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" />
+                       </java-attributes>
+                       <xml-properties>
+                               <xml-property name="description" value="Instance of a network-resource" />
+                               <xml-property name="indexedProps" value="network-id,provider-id,client-id,te-topo-id" />
+                               <xml-property name="nameProps" value="network-id" />
+                               <xml-property name="searchable" value="network-id" />
+                               <xml-property name="uniqueProps" value="network-id" />
+                               <xml-property name="container" value="network-resources" />
+                               <xml-property name="namespace" value="network" />
+                       </xml-properties>
+               </java-type>
+               <java-type name="NetworkResources">
+                       <xml-root-element name="network-resources" />
+                       <xml-properties>
+                               <xml-property name="description" value="Collection of network-resources" />
+                       </xml-properties>
+                       <java-attributes>
+                               <xml-element container-type="java.util.ArrayList" java-attribute="networkResource" name="network-resource" type="inventory.aai.onap.org.v14.NetworkResource" />
+                       </java-attributes>
+               </java-type>
+
        </java-types>
 </xml-bindings>