Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • 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
ToscaPropertyToscaDataType
ToscaPolicyToscaPolicyType
ToscaNodeTemplateToscaNodeType

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

ExampleKey
type: onap.datatypes.ToscaConceptIdentifieronap.datatypes.ToscaConceptIdentifier:0.0.0

type: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement
type_version: 1.0.0

org.onap.policy.clamp.acm.PolicyAutomationCompositionElement:1.0.0

...

ExampleKey
derivedFrom: onap.datatypes.ToscaConceptIdentifieronap.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.

...

ExampleKey (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
type_version: 1.0.0

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

ExampleKey (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-apiApi in policy-api with namespace support

POST /nodetemplates
PUT /nodetemplates
DELETE /nodetemplates/{name}/versions/{version}
GET /nodetemplates/{name}/versions/{version}
GET /nodetemplates

GET /policytypes
GET /policytypes/{policyTypeId}
GET /policytypes/{policyTypeId}/versions/{versionId}
GET /policytypes/{policyTypeId}/versions/latest
POST /policytypes
DELETE /policytypes/{policyTypeId}/versions/{versionId}
GET /policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies
GET /policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}
GET /policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/{policyVersion}
GET /policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/latest
POST /policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies
DELETE /policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/{policyVersion}
GET /policies
GET /policies/{policyId}/versions/{policyVersion}
POST /policies
DELETE /policies/{policyId}/versions/{policyVersion}

POST /servicetemplate/{name}/versions/{st_version}/nodetemplates
PUT /servicetemplate/{name}/versions/{st_version}/nodetemplates
DELETE /servicetemplate/{name}/versions/{st_version}/nodetemplates/{name}/versions/{version}
GET /servicetemplate/{name}/versions/{st_version}/nodetemplates/{name}/versions/{version}
GET /servicetemplate/{name}/versions/{st_version}/nodetemplates

GET /servicetemplate/{name}/versions/{st_version}/policytypes
GET /servicetemplate/{name}/versions/{st_version}/policytypes/{policyTypeId}
GET /servicetemplate/{name}/versions/{st_version}/policytypes/{policyTypeId}/versions/{versionId}
GET /servicetemplate/{name}/versions/{st_version}/policytypes/{policyTypeId}/versions/latest
POST /servicetemplate/{name}/versions/{st_version}/policytypes
DELETE /servicetemplate/{name}/versions/{st_version}/policytypes/{policyTypeId}/versions/{versionId}
GET /servicetemplate/{name}/versions/{st_version}/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies
GET /servicetemplate/{name}/versions/{st_version}/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}
GET /servicetemplate/{name}/versions/{st_version}/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/{policyVersion}
GET /servicetemplate/{name}/versions/{st_version}/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/latest
POST /servicetemplate/{name}/versions/{st_version}/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies
DELETE /servicetemplate/{name}/versions/{st_version}/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/{policyVersion}
GET /servicetemplate/{name}/versions/{st_version}/policies
GET /servicetemplate/{name}/versions/{st_version}/policies/{policyId}/versions/{policyVersion}
POST /servicetemplate/{name}/versions/{st_version}/policies
DELETE /servicetemplate/{name}/versions/{st_version}/policies/{policyId}/versions/{policyVersion}

Update functionality (second and third step of Roadmap)

...