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

policy api fails to retrieve policies

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Done
    • Affects Version/s: Frankfurt Release
    • Fix Version/s: Frankfurt Release
    • Component/s: None
    • Labels:
      None

      Description

      Monitoring/Guard/Operational policies were successfully created and deployed by CLAMP during ScaleOut testing in SB00.

      However, the GET for these policies do not return anything.

       

      curl -k --silent --user 'healthcheck:zb!XztG34' -X GET "https://policy-api:6969/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies" -H "Accept: application/yaml"

       

      code: NOT_FOUND

      error: policies for filter ToscaPolicyFilter(name=null, version=null, versionPrefix=null,

        type=onap.policies.monitoring.cdap.tca.hi.lo.app, typeVersion=1.0.0) do not exist

      details:

      • policies for filter ToscaPolicyFilter(name=null, version=null, versionPrefix=null,

        type=onap.policies.monitoring.cdap.tca.hi.lo.app, typeVersion=1.0.0) do not exist

       

      Changed logback.xml to DEBUG and the following output was in the debug.log:

       

      [2020-05-08T14:26:47.627+00:00|DEBUG|ApiRestController|qtp1592970214-27] GET /policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies

      org.onap.policy.models.base.PfModelRuntimeException: policies for filter ToscaPolicyFilter(name=null, version=null, versionPrefix=null, type=onap.policies.monitoring.cdap.tca.hi.lo.app, typeVersion=1.0.0) do not exist

      at org.onap.policy.models.tosca.authorative.provider.AuthorativeToscaProvider.getFilteredPolicies(AuthorativeToscaProvider.java:324)

      at org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl.getFilteredPolicies(DatabasePolicyModelsProviderImpl.java:213)

      at org.onap.policy.api.main.rest.provider.PolicyProvider.getFilteredPolicies(PolicyProvider.java:148)

      at org.onap.policy.api.main.rest.provider.PolicyProvider.fetchPolicies(PolicyProvider.java:61)

      at org.onap.policy.api.main.rest.ApiRestController.getAllPolicies(ApiRestController.java:514)

      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.base/java.lang.reflect.Method.invoke(Method.java:566)

      at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            liamfallon Liam Fallon
            Reporter:
            pdragosh Pamela Dragosh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: