Aria Automation does not support pricing based on the allocation model by design
search cancel

Aria Automation does not support pricing based on the allocation model by design

book

Article ID: 417168

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite)

Issue/Introduction

Aria Automation pricing is computed always based on usage values

Environment

Aria Automation 8.18.x
Aria Operations 8.18.x

Cause

Aria Automation pricing is always based on utilization model as per design and we don't have an option to change it from the UI.

Resolution

By design Aria Automation pricing is always based on utilization and as an enterprise admin you don't have the option to change rate model.

To workaround this issue you can do it via suite-api to change ratecard to make it calculate based on allocation model.

Swagger URL - https://<vrops>/suite-api then select internal and search for below APIs

Note:
1. X-Ops-API-use-unsupported should be true for internal APIs.

2. Take Aria Ops SNAPSHOT before performing the below steps


1.Check existing metering policies by selecting the createdBy field as "VRA".
   API - /internal/metering

Example Response : 
{
  "id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
  "name": "TestPolicy",
  "description": "The description of the policy",
  "createdBy": "VRA",
  "chargeModel": "<pay_model_name>",
  "lastUpdateTimestamp": xxxxxxxxxxxxx,
  "meterings": [
    {
      "itemName": "cpu",
      "metering": {
        "chargePeriod": "DAILY",
        "baseRate": 0,
        "conditionalBaseRates": [],
        "chargeOnPowerState": "ALWAYS",
        "overage": false,
        "overageRate": 0,
        "unit": "",
        "fixedPrice": 0,
        "chargeBasedOn": "USAGE"
      }
    }
  ],
  "namedMeterings": [],
  "tagBasedMeterings": [],
  "unconditionalMeterings": [],
  "oneTimeMeterings": [],
  "tagBasedOneTimeMeterings": [],
  "tagBasedPolicyRefs": [],
  "tagBasedRateFactors": []
}


2. Policy in vRA would be assigned at Project Object or if not applied default policy created by vRA at CASA Adapter instance level would be used for vRA pricing.
   To identify the current active policy Navigate to Aria Ops → Object browser → Navigate to Project Object → In metrics search "Type Metering" → Metering|meteringPolicyId (would be the active policy if policy assigned     to project) 
   If Project level policy is not available Ops → Object browser → Navigate to CASA Adapter Instance →  In metrics search "Type Metering" → Metering|meteringPolicyId

3.Copy the identifier field "id" from step 1 response corresponding to step 2 meteringPolicyId.
   API - /internal/metering/{id}

Specific policy to be updated

{
  "id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
  "name": "TestPolicy",
  "description": "The description of the policy",
  "createdBy": "VRA",
  "chargeModel": "<charge_model_name>",
  "lastUpdateTimestamp": xxxxxxxxxx,
  "meterings": [
    {
      "itemName": "cpu",
      "metering": {
        "chargePeriod": "DAILY",
        "baseRate": 0,
        "conditionalBaseRates": [],
        "chargeOnPowerState": "ALWAYS",
        "overage": false,
        "overageRate": 0,
        "unit": "",
        "fixedPrice": 0,
        "chargeBasedOn": "USAGE"
      }
    }
  ],
  "namedMeterings": [],
  "tagBasedMeterings": [],
  "unconditionalMeterings": [],
  "oneTimeMeterings": [],
  "tagBasedOneTimeMeterings": [],
  "tagBasedPolicyRefs": [],
  "tagBasedRateFactors": []
}

4. Copy above API response and update the field "chargeBasedOn": "USAGE" to "chargeBasedOn": "ALLOCATION".
    Method - PUT, API - /internal/metering/

Update API Request

{
  "id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
  "name": "TestPolicy",
  "description": "The description of the policy",
  "createdBy": "VRA",
  "chargeModel": "<Charge_model_name>",
  "lastUpdateTimestamp": xxxxxxxxxxxx,
  "meterings": [
    {
      "itemName": "cpu",
      "metering": {
        "chargePeriod": "DAILY",
        "baseRate": 0,
        "conditionalBaseRates": [],
        "chargeOnPowerState": "ALWAYS",
        "overage": false,
        "overageRate": 0,
        "unit": "",
        "fixedPrice": 0,
        "chargeBasedOn": "ALLOCATION"
      }
    }
  ],
  "namedMeterings": [],
  "tagBasedMeterings": [],
  "unconditionalMeterings": [],
  "oneTimeMeterings": [],
  "tagBasedOneTimeMeterings": [],
  "tagBasedPolicyRefs": [],
  "tagBasedRateFactors": []
}

5. Verify the policy if updated performing step 2 with identifier "id" from response from step 3
6. Validate if the pricing is working as expected. Ensure the starttime is provided after the lastUpdateTimestamp of policy. API - /internal/metering/price