Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-3746

[API] endpoints /application_plans/{application_plan_id}/metrics/{metric_id}/[limits,pricing_rules] don't work with metric related to backend

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • None
    • 2.7 ER1
    • System
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • 3scale 2019-10-14

      Steps to reproduce:

      • Create a Metric in a Backend
      • Connect the Backend to a Product
      • Create an application plan for the Product
      • Try to use this Metric metric_id for the API endpoints listed below

      Expected result: it should successfully create/update/delete limits or pricing rules
      Actual result: got a 404

      Limit List per Metric
      /admin/api/application_plans/{application_plan_id}/metrics/{metric_id}/limits.xml GET
      Limit Create
      /admin/api/application_plans/{application_plan_id}/metrics/{metric_id}/limits.xml POST
      Limit Read
      /admin/api/application_plans/{application_plan_id}/metrics/{metric_id}/limits/{id}.xml GET
      Limit Update
      /admin/api/application_plans/{application_plan_id}/metrics/{metric_id}/limits/{id}.xml PUT
      Limit Delete
      /admin/api/application_plans/{application_plan_id}/metrics/{metric_id}/limits/{id}.xml DELETE
      
      Pricing Rules List per Metric
      /admin/api/application_plans/{application_plan_id}/metrics/{metric_id}/pricing_rules.xml GET
      Pricing Rule Create
      /admin/api/application_plans/{application_plan_id}/metrics/{metric_id}/pricing_rules.xml POST 
      

      Edit: QE automation of limits and pricing rules is blocked by this issue.

      Dev notes

      This https://github.com/3scale/porta/blob/7d4cd8a33ef6f3b0926bb1e075f67c41e5d01c82/app/controllers/admin/api/application_plan_metric_pricing_rules_controller.rb#L54-L56

      should look like
      https://github.com/3scale/porta/blob/7d4cd8a33ef6f3b0926bb1e075f67c41e5d01c82/app/controllers/api/pricing_rules_controller.rb#L58-L60

      • If the Backend of the Metric is not used by the Product, then it should return a 404

              Unassigned Unassigned
              mkudlej@redhat.com Martin Kudlej
              Carlos Ribeiro Carlos Ribeiro (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: