Contributors
References
https://wiki.onap.org/download/attachments/44467093/AAI_Schema_Service_ONAP.pptx
User Story
- As a developer of the CCVPN Use Case in ONAP, I would like to change the AAI schema to support all the new data and relationships as needed. It would be nicer to use an API to dynamically update the schema, rather than using a static configuration file.
Glossary
Description | OXM terminology | XSD terminology | Java terminology |
---|---|---|---|
"schema element" "java-type" "class" | "java-type" XML tag | "xs:element" XML tag as outer container | Java class |
"attribute" "java-attribute" | "xml-element" XML tag inside "java-attributes" XML tag
| "xs:element" XML tag as inner container
| Java field/member variable |
"relationship" | "xml-element" XML tag inside "java-attributes" XML tag
| "xs:element" XML tag as inner container
| Java field/member variable |
"metadata" "xml-property" | "xml-property" XML tag inside "xml-properties" XML tag | "xs:annotation" XML tag containing "annox:annotate" metadata | N/A. There are various hard-coded behaviours for each individual item of metadata. |
"namespace" | special "java-type" that
| "xs:element" XML tag as outer container
| N/A. There is special hard-coded behaviour for a specific set of "namespaces". |
"top-level" | a "relationship" of a "namespace" | N/A. There is special hard-coded behaviour that prevents "top-level" classes from also being used as "sub-components". | |
"sub-component" | a "relationship" of a "java-type" that is not a "namespace" | N/A. There is special hard-coded behaviour that prevents "top-level" classes from also being used as "sub-components". | |
"EdgeRule" | a separate JSON configuration file that regulates the behaviour of the "relationship" | N/A. There is special hard-coded behaviours for each individual item of metadata. | |
"cousin edge" |
| N/A. There is special hard-coded behaviour that handles the "relationship-list" for "cousin edges". |
Analysis from CCVPN Schema Changes in Casablanca Release
See also:
- AAI-CCVPN Schema Proposal for Casablanca Release
- - AAI-1353Getting issue details... STATUS
Schema Change Description | CCVPN Example | Other Examples | |
---|---|---|---|
1 | Add new top-level "java-type"
| AAI-1353-1 ("Network" and "Business" namespaces) AAI-1353-3 ("connectivity") AAI-1353-5 ("sp-partner") AAI-1353-7 ("lan-port-config") AAI-1353-8 ("site-resource") AAI-1353-10 ("network-resource") AAI-1353-12 ("ext-aai-networks") AAI-1353-13 ("sdwan-vpn") AAI-1353-14 ("device") AAI-1353-15 ("wan-port-config") | |
2 | Add new "attribute" to existing "java-type" | ||
3 | Add new sub-component "java-type"
| AAI-1353-7b ("dhcp-service") "lan-port-config" to "dhcp-service" | |
4 | Add new "cousin edge"
| "vpn-binding" to "p-interface" "sp-partner" to "service-instance" "connectivity" to "service-instance" "connectivity" to "vpn-binding" "lan-port-config" to "service-instance" "network-resource" to "vpn-binding" "pnf" to "network-resource" "site-resource" to "service-instance" "site-resource" to "allotted-resource" "site-resource" to "complex" "sdwan-vpn" to "service-instance" "sdwan-vpn" to "tenant" "sdwan-vpn" to "vpn-binding" "device" to "service-instance" "device" to "generic-vnf" "wan-port-config" to "service-instance" "logical-link" to "ext-aai-network" "vpn-binding" to "ext-aai-network" "pnf" to "ext-aai-network" "connectivity" to "ext-aai-network" "lan-port-config" to "ext-aai-network" "network-resource" to "ext-aai-network" "site-resource" to "ext-aai-network" "sdwan-vpn" to "ext-aai-network" "device" to "ext-aai-network" "wan-port-config" to "ext-aai-network" | |
5 | Change existing "EdgeRule", e.g. cardinality | ||
6 | Add new "namespace" | AAI-1353-12 ("ext-aai"), see workaround "ext-aai-networks" | |
7 | Add new sub-component relationship using existing top-level "java-type" | AAI-1353-12 ("ext-aai"), see workaround "ext-aai-networks" "logical-link" to "ext-aai-network" "vpn-binding" to "ext-aai-network" "pnf" to "ext-aai-network" "connectivity" to "ext-aai-network" "lan-port-config" to "ext-aai-network" "network-resource" to "ext-aai-network" "site-resource" to "ext-aai-network" "sdwan-vpn" to "ext-aai-network" "device" to "ext-aai-network" "wan-port-config" to "ext-aai-network" | |
8 | Add new top-level relationship using existing sub-component "java-type" | AAI-1353-12 ("ext-aai"), see workaround "ext-aai-networks" | |
9 | Expose previously hidden "java-type" as sub-component relationship | ||
10 | Add new metadata to existing "java-type" | "uriTemplate" "privateEdge" "defaultValue" | |
11 | Update existing metadata in "java-type" | "indexedProps" "uniqueProps" "dependentOn" | "defaultValue" |
4 Comments
Pavel Paroulek
Hi,
does the CCVPN business use-case require dynamic schema or the developer wants it, but in “production” this feature will not be used? If the latter what are the specifics of the CCVPN use-case such that this feature is needed? What are the alternative solutions?
Keong Lim
The CCVPN use case itself does not require dynamic schema changes, but the use case serves as an example of something that would/could/should be contributed by:
At the start of Casablanca, there was the idea that if dynamic schema changes were available, then it would have been the preferred way to introduce the use case support.
As it stands, this analysis only documents the kinds of schema changes that were actually used, so that future dynamic behaviour can be justified with data.
Xiaoxiao He
hi,
<uniqueProps> ,For what purpose, why is it designed as "properties marked as unique in the DB schema"? It results in two different tables reporting "Uniqueness constraint violated...".
Keong Lim
Moved to onap-discuss list: https://lists.onap.org/g/onap-discuss/message/15610