Contributors

{"contextEntityId":45292374}

References

2018-10-17 AAI Meeting Notes

2018-10-10 AAI Meeting Notes

https://wiki.onap.org/download/attachments/44467093/AAI_Schema_Service_ONAP.pptx

AAI Schema Service

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

DescriptionOXM terminologyXSD terminologyJava terminology

"schema element"

"java-type"

"class"

"java-type" XML tag"xs:element" XML tag as outer containerJava class

"attribute"

"java-attribute"

"xml-element" XML tag inside "java-attributes" XML tag

  • having a "type" relating to basic Java values, such as String, Integer, Boolean, etc.

"xs:element" XML tag as inner container

  • having "type" relating to basic values such as "xs:string", "xs:unsignedInt", "xs:boolean", etc.
Java field/member variable
"relationship"

"xml-element" XML tag inside "java-attributes" XML tag

  • having a "type" relating to another "java-type"

"xs:element" XML tag as inner container

  • having "ref" relating to another "xs:element" as outer container
  • having the value prefixed by "tns:"
Java field/member variable

"metadata"

"xml-property"

"xml-property" XML tag inside "xml-properties" XML tag"xs:annotation" XML tag containing "annox:annotate" metadataN/A. There are various hard-coded behaviours for each individual item of metadata.
"namespace"

special "java-type" that

  • is at the root of the object graph and root of the REST URL path
  • does not have any "attributes", only top-level "relationships"

"xs:element" XML tag as outer container

  • that never appears anywhere else as a "relationship" of another "xs:element"
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"
  • a "relationship" via the "relationship-list" java-type
  • an "EdgeRule" with a specific configuration (the "java-type" does not "contain" the other "java-type")

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:


Schema Change DescriptionCCVPN ExampleOther Examples
1

Add new top-level "java-type"

  • Add "relationship" into "namespace"
  • Define new "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")


2Add new "attribute" to existing "java-type"

AAI-1353-2 ("service-instance")

AAI-1353-4 ("vpn-binding")

AAI-1353-6 ("allotted-resource")

AAI-1353-9 ("complex")

AAI-1353-11 ("p-interface")

AAI-1353-16 ("pnf")

AAI-1552 - Getting issue details... STATUS


3

Add new sub-component "java-type"

  • Add "relationship" into existing "java-type"
  • Define new "java-type"
  • Add new "EdgeRule"
  • Add or Update "dependentOn" metadata

AAI-1353-7b ("dhcp-service")

"lan-port-config" to "dhcp-service"


4

Add new "cousin edge"

  • Add "relationship-list" into existing "java-type", unless already present
  • Add new "EdgeRule"

"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"


5Change existing "EdgeRule", e.g. cardinality

AAI-1671 - Getting issue details... STATUS


6Add new "namespace"AAI-1353-12 ("ext-aai"), see workaround "ext-aai-networks"
7Add 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"


8Add new top-level relationship using existing sub-component "java-type"AAI-1353-12 ("ext-aai"), see workaround "ext-aai-networks"
9Expose previously hidden "java-type" as sub-component relationship

AAI-1353-12 ("esr-system-info")

"ext-aai-network" to "esr-system-info"

AAI-1555 - Getting issue details... STATUS


10Add new metadata to existing "java-type"

AAI-1635 - Getting issue details... STATUS


"uriTemplate"

"privateEdge"

"defaultValue"

11Update existing metadata in "java-type"

"indexedProps"

"uniqueProps"

"dependentOn"

"defaultValue"

  • No labels

4 Comments

  1. 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?

    1. 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:

      • modelling it in SDC
      • pushing it from SDC to the rest of ONAP

      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.


  2. 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...".