Uploaded image for project: 'Policy Framework'
  1. Policy Framework
  2. POLICY-2316

TOSCA policy or policy type should not be overridden via POST calls with the same version specified

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • Frankfurt Release
    • Frankfurt Release
    • None
    • None

      Currently, if one policy user creates two policies or policy types with the same id/version specified in the payload, one will replace the other and only one version will be stored in the DB. It will generate the inconsistent match between the policy/policy type in the DB and those deployed in the PDPs. As an ONAP policy framework developer, I would like to investigate this bug and fix it.

       

      Acceptance criterion:

      1) If version field is not specified in POST payload, "406 - Not Acceptable" would be returned along with the message "mandantory version field is missing"

      2) If the version is not in the DB, we simply insert it.

      3) If the version is in the DB, "406 - Not Acceptable" is returned along with the message saying "specified version x.x.x" is already existing and the latest version is x.x.x. It can force the user to create a newer version than the latest one.

      4) policy-id/policy-version in the metadata should only be set by API. Any incoming explicit specification should be ignored.

      5) The same versioning feature should be applied to legacy types of policies too so that everything is consistent.

      6) Documentation should be updated to clarify this versioning consensus clearly.

      7) CSIT should be updated to reflect this change

            cgao cgao
            cgao cgao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: