diff options
author | Marcin Krasowski <m.krasowski@samsung.com> | 2021-08-03 10:05:34 +0200 |
---|---|---|
committer | Marcin Krasowski <m.krasowski@samsung.com> | 2021-08-09 14:26:08 +0200 |
commit | cfd3f02ea5c9d6eb01d6d9ddd10c5da9778c35a1 (patch) | |
tree | a80bec54d1655306e878f7bd9a98ffa0eb101c42 | |
parent | 4c6f290ec55342952db093852eac3a25adc6b78d (diff) |
AAI information model extended with object to hold basic information
about k8s resources.
AAI was extended with the object to hold basic information on kubernetes
resources (CNF) and its relations to other entities like tenant, vnf
modules etc. More can be found here:
https://wiki.onap.org/display/DW/Simplified+K8S+Resource+Model+-+IM
Issue-ID: AAI-3205
Signed-off-by: Marcin Krasowski <m.krasowski@samsung.com>
Change-Id: Iec879011d604438c4ae0e2991bf945edd6f48e08
-rw-r--r-- | aai-schema/src/main/resources/onap/dbedgerules/v24/DbEdgeRules_v24.json | 35 | ||||
-rw-r--r-- | aai-schema/src/main/resources/onap/oxm/v24/aai_oxm_v24.xml | 68 |
2 files changed, 101 insertions, 2 deletions
diff --git a/aai-schema/src/main/resources/onap/dbedgerules/v24/DbEdgeRules_v24.json b/aai-schema/src/main/resources/onap/dbedgerules/v24/DbEdgeRules_v24.json index 6826a78..b289a6b 100644 --- a/aai-schema/src/main/resources/onap/dbedgerules/v24/DbEdgeRules_v24.json +++ b/aai-schema/src/main/resources/onap/dbedgerules/v24/DbEdgeRules_v24.json @@ -6352,6 +6352,39 @@ "prevent-delete": "NONE", "default": "true", "description":"Used by Auditing applications to identify appropriate audit models based on the platform associated with the given object" - } + },{ + "from": "k8s-resource", + "to": "tenant", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + },{ + "from": "vf-module", + "to": "k8s-resource", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + },{ + "from": "generic-vnf", + "to": "k8s-resource", + "label": "tosca.relationships.HostedOn", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + } ] } diff --git a/aai-schema/src/main/resources/onap/oxm/v24/aai_oxm_v24.xml b/aai-schema/src/main/resources/onap/oxm/v24/aai_oxm_v24.xml index 6c730a3..c0c2c87 100644 --- a/aai-schema/src/main/resources/onap/oxm/v24/aai_oxm_v24.xml +++ b/aai-schema/src/main/resources/onap/oxm/v24/aai_oxm_v24.xml @@ -1671,6 +1671,7 @@ <xml-element java-attribute="vservers" name="vservers" type="inventory.aai.onap.org.v24.Vservers"/> <xml-element java-attribute="nosServers" name="nos-servers" type="inventory.aai.onap.org.v24.NosServers"/> <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v24.RelationshipList"/> + <xml-element java-attribute="k8sResources" name="k8s-resources" type="inventory.aai.onap.org.v24.K8sResources"/> </java-attributes> <xml-properties> <xml-property name="description" value="Openstack tenant"/> @@ -15751,7 +15752,72 @@ <xml-property name="uriTemplate" value="/service-instances/service-instance/{service-instance-id}/slice-profiles/slice-profile/{profile-id}"/> <xml-property name="searcheable" value="profile-id"/> </xml-properties> - </java-type> + </java-type> + + <java-type name="K8sResources"> + <xml-properties> + <xml-property name="description" value="Collection of kubernetes resources."/> + </xml-properties> + <xml-root-element name="k8s-resources"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="k8sResource" name="k8s-resource" type="inventory.aai.onap.org.v24.K8sResource"/> + </java-attributes> + </java-type> + + <java-type name="K8sResource"> + <xml-root-element name="k8s-resource"/> + <java-attributes> + <xml-element java-attribute="id" name="id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of k8s resource. This is unique across the graph."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="name" name="name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the kubernetes resource."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="group" name="group" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Kubernetes resource group."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="version" name="version" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Resource version."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="kind" name="kind" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Resource kind as defined by kubernetes e.g. pod, service, etc."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="namespace" name="namespace" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Namespace in which resource is placed."/> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="labels" name="labels" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Kubernetes resource labels."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Query towards SO CNF adapter to retrieve full resource data."/> + </xml-properties> + </xml-element> + </java-attributes> + <xml-properties> + <xml-property name="description" value="General purpose kubernetes resource."/> + <xml-property name="indexedProps" value="id,name,kind"/> + <xml-property name="searchable" value="id"/> + <xml-property name="dependentOn" value="tenant"/> + <xml-property name="container" value="k8s-resources"/> + <xml-property name="uriTemplate" value="/k8s-resources/k8s-resource/{k8s-resource-id}"/> + <xml-property name="requiredProps" value="id,description,name,group,version,kind,namespace,selflink"/> + </xml-properties> + </java-type> </java-types> </xml-bindings> |