Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-2571

Implement billable usage "gratis" status

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Major Major
    • 2024-08-26 - API
    • None
    • None

      When, the subscriptionDefinition for a product tag has `enableGratisUsage: true` on a metric:

      When the only applicable contract for billing of the currently evaluated usage starts on the current month - anytime other than 1st day of the month at midnight UTC exactly [e.g. Feb 1st 00:00.000 UTC] , mark the usage as status gratis (in the database), and do not send a message to billable usage topic.

      When the current contract ends in the middle of the current month, we will send the usage as this is the catch up from the usage skipped at the beginning of the contract. 

      Done Criteria

      • What APIs are being tested? - swatch-product-configuration, swatch-billable-usage, swatch-producer-*
      • What Scenarios are being tested? -
        • Test for a contract change in the middle of the month for Ansible with the Managed nodes metric. We have a gratis status for the first month and do not emit a message for that month. It must be capable of sending a remittance in the subsequent month since the billable_usage_remittance does not include the "gratis" status. We also expect only one event in a month for this metric.  
        • There will be another metric for Ansible Cluster-hours and they can have events every hour. This should work like any other product since it is not suppose to have gratis status
      • Sample product config?
        • metrics:
            - id: Managed-nodes
              type: gauge
              awsDimension: managed_nodes
              enableGratisUsage: true
            - id: Cluster-hours
              awsDimension: cluster_hours
              type: counter 

       

      https://gitlab.cee.redhat.com/-/snippets/8327 for details on how gratis will work

              jcarvaja@redhat.com Jose Carvajal Hilario
              khowell@redhat.com Kevin Howell
              Diego de Oliveira Maranhao Diego de Oliveira Maranhao
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: