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

cannot import application plan because of collision existing limits

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 2.6 CR1
    • Toolbox
    • None
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started

      I've tried to export application plan Y from service X

      ---
      plan:
        name: fg1
        state: published
        setup_fee: 1.0
        cost_per_month: 2.0
        trial_period_days: 3
        cancellation_period: 0
        approval_required: true
        system_name: cvb
        end_user_required: false
      limits:
      - period: eternity
        value: 11
        plan_id: 303
        metric_system_name: hits
      pricingrules:
      - cost_per_unit: 14.0
        min: 1
        max: 33
        metric_system_name: list_attributes
      plan_features:
      - name: zxdsf
        system_name: sdfdf
        scope: application_plan
        visible: true
        description: sdfdf
      metrics:
      - name: hits
        system_name: hits
        friendly_name: Hits
        description: Number of API hits
        unit: hit
      methods:
      - name: list_attributes
        system_name: list_attributes
        friendly_name: list_attributes
        description: List Attributes under a Project
      created_at: '2019-07-23T03:49:31Z'
      toolbox_version: 0.12.4
      

      and then import application plan Y back to service X without changing of system name of application plan.

      ---
      plan:
        name: fg1
        state: published
        setup_fee: 1.0
        cost_per_month: 2.0
        trial_period_days: 3
        cancellation_period: 0
        approval_required: true
        system_name: cvb
        end_user_required: false
      limits:
      - period: eternity
        value: 22
        plan_id: 303
        metric_system_name: hits
      - period: eternity
        value: 0
        plan_id: 303
        metric_system_name: hits
      pricingrules:
      - cost_per_unit: 17.0
        min: 2
        max: 66
        metric_system_name: list_attributes
      plan_features:
      - name: zxdsf1
        system_name: sdfdf1
        scope: application_plan
        visible: true
        description: sdfdf1
      metrics:
      - name: hits
        system_name: hits
        friendly_name: Hits
        description: Number of API hits
        unit: hit
      methods:
      - name: list_attributes
        system_name: list_attributes
        friendly_name: list_attributes
        description: List Attributes under a Project
      created_at: '2019-07-23T03:35:20Z'
      toolbox_version: 0.12.4
      

      New and redefined pricing rules are in range of pricing rule:

      - cost_per_unit: 14.0
        min: 1
        max: 33
        metric_system_name: list_attributes
      

      and that's why it is not possible to export application plan and import updated one again to same service.
      I think that all existing limits should be deleted and imported new ones.

      Edit: I've realized that it is not possible to change limits at all. User can only add new limits which are out of ranges of other limits already defined in app. plan

            eguzki Eguzki Astiz Lezaun
            mkudlej@redhat.com Martin Kudlej
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: