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

API|PAP components use different version formats

XMLWordPrintable

      The issue is mostly related to inconsistency on version handling on the api and pap components and manifests when CLAMP does the DELETE operations, first for undeploy from PAP and then delete the policy on the API components.

      [2019-05-28T15:11:04.941+00:00|ERROR|LegacyApiRestController|qtp1458621573-20] DELETE /policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/guard.frequency.scaleout/versions/1.0.0

      ..

      Caused by: java.lang.NumberFormatException: For input string: "1.0.0"
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      at java.lang.Integer.parseInt(Integer.java:580)
      at java.lang.Integer.valueOf(Integer.java:766)
      at org.onap.policy.api.main.rest.provider.LegacyGuardPolicyProvider.validateLegacyGuardPolicyVersion(LegacyGuardPolicyProvider.java:139)
      ... 62 common frames omitted

      Since it will be challenging to fix this at this point in Policy, may be Seb can fix it for the short term on the CLAMP side.

      I believe these are the rules for Seb

      When talking to “policy-api” component use a numeric value as the version, ie. “1” in the policy version to DELETE a policy.

      When talking to “policy-pap” component, concatenate “.0.0” to the numeric value to DELETE (undeploy) a policy from the PDPs.

            liamfallon liamfallon
            jhh jhh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: