...
- Convert all applications to document storage storage
- performance improvements
- Keep our current APIs, all changes will be internal
- Provide an upgrade path to the new data structure and a rollback to the current structure
- Old ORM layer will be not removed during this step
- namespace and imports could be defined but not implemented
- Multi-service templates is initially disabled in ORM layerOld ORM layer will be not removed during this step
- Add multi-service templates support (related to POLICY-3236 - adjust flexibility of Tosca Service Template Handling)
- Remove old ORM layer
- Enable namespace and Multi-service templates in ORM layer
- Adapt the current APIs to handle Multi-service templates where it needs
- move common code in policy-model
- Define and support any other complex features not implemented yet
- Enable import support
...
ORM layer for ToscaServiceTemplate Proposed (during first step in Roadmap)
Simple-concepts entities will be maintained but not used.
Namespace and Import service templates (second and third step in Roadmap)
in In TOSCA language namespace is supposed to be a URI. Name and version of service template, are not defined in TOSCA language, not used in yaml files, and not present in all examples neither Unit Tests, but they are used as primary key of the ToscaServiceTemplate table and they are used in REST endpoints as id of a resource.
...
Validation in current ORM layer
As the first step of Roadmap is backward compatible, the current validation will be maintained as it is, but it should be adapted to new DocToscaEntities. In the second step do not need other changes.
"type" and "type_version" | Referenced to |
---|---|
"type" and "type_version" | Referenced to |
ToscaProperty | ToscaDataType |
ToscaPolicy | ToscaPolicyType |
ToscaNodeTemplate | ToscaNodeType |
"type_version" is optional and "0.0.0" is the default value. The "Key" is used for the validation to find if the ToscaEntity exists.
Examples:
Example | Key |
---|---|
type: onap.datatypes.ToscaConceptIdentifier | onap.datatypes.ToscaConceptIdentifier:0.0.0 |
type: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement | org.onap.policy.clamp.acm.PolicyAutomationCompositionElement:1.0.0 |
...
Example | Key |
---|---|
derivedFrom: onap.datatypes.ToscaConceptIdentifier | onap.datatypes.ToscaConceptIdentifier (any version):{last_version} |
derivedFrom: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement:1.0.0 | org.onap.policy.clamp.acm.PolicyAutomationCompositionElement:1.0.0 |
Validation
...
"type", "type_version" and "namespace"
...
in third step
In the last step, due the introduction of imports and namespace support, it needs to extend the validation.
"type_version" is optional and "0.0.0" is the default value, "host_namespace" is optional and "tosca" is the default value, type could be used as formatted string: {host_namespace}:{name}:{version}. The "Key" is used for the validation to find if the ToscaEntity exists in same ServiceTemplate or in other one.
...
Example | Key (if defined in same service template) | Key (for external service template) |
---|---|---|
type: onap.datatypes.ToscaConceptIdentifier | "onap.datatypes.ToscaConceptIdentifier:0.0.0" | "tosca:onap.datatypes.ToscaConceptIdentifier:0.0.0" |
type: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement | "org.onap.policy.clamp.acm.PolicyAutomationCompositionElement:1.0.0" | "tosca:org.onap.policy.clamp.acm.PolicyAutomationCompositionElement:1.0.0" |
type: onap.datatype.acm.Target:1.2.3 | "onap.datatype.acm.Target:1.2.3" | "tosca:onap.datatype.acm.Target:1.2.3" |
type: CustomNamespace:onap.datatype.acm.Operation:1.0.1 | "onap.datatype.acm.Operation:1.0.1" | "CustomNamespace:onap.datatype.acm.Operation:1.0.1" |
"derivedFrom" should have same logic as before and it could be used as formatted string: {host_namespace}:{name}:{version}.
Example | Key (if defined in same service template) | Key (for external service template) |
---|---|---|
derivedFrom: onap.datatypes.ToscaConceptIdentifier | "onap.datatypes.ToscaConceptIdentifier:0.0.0"{last_version} | "tosca:onap.datatypes.ToscaConceptIdentifier:0.0.0"{last_version} |
derivedFrom: onap.datatype.acm.Target:1.2.3 | "onap.datatype.acm.Target:1.2.3" | "tosca:onap.datatype.acm.Target:1.2.3" |
derivedFrom: CustomNamespace:onap.datatype.acm.Operation:1.0.1 | "onap.datatype.acm.Operation:1.0.1" | "CustomNamespace:onap.datatype.acm.Operation:1.0.1" |
Policy-Api
Current Api in policy-api | Api in policy-api with namespace support |
---|---|
POST /nodetemplates GET /policytypes | POST /servicetemplate/{name}/versions/{st_version}/nodetemplates GET /servicetemplate/{name}/versions/{st_version}/policytypes |
Update functionality (second and third step of Roadmap)
...