Cloud Cruiser became HPE Consumption Analytics on Nov. 1st. You'll still see the old name in places while we update this site.

 

 

Consumption Analytics Documentation

Home > Cloud Cruiser 3 > Batch XML Reference > Transform processors > CalculateResourceRate

CalculateResourceRate

Table of contents
No headers

Sets a pass-through rate on a resource calculated from existing resource values. Any resource already in the record can be used in a free form algebraic expression to compute a rate for the target resource. If the target resource already exists, then it will be updated with the calculated value. Otherwise, it will be added with a value of zero and the calculated rate.

For more information on expression syntax and supported variables, see Expression parser.

Class

<bean class="com.cloudcruiser.batch.transform.CalculateResourceRate">

Properties

<property name="expression" value="expression" />

Sets an algebraic expression using resource names as variables where needed. Use parenthesis for explicit order of operations.

<property name="targetResource" value="targetResource" />

Sets a resourceId that will have its value set from the result.

Spring Batch XML Example

<batch:step id="transform" next="charge">
  <batch:tasklet>      
    <bean class="com.cloudcruiser.batch.CCRecordTransformTasklet">
      <property name="processors">
        <list>
          <bean class="com.cloudcruiser.batch.transform.CalculateResourceRate">
            <property name="active" value="true" />
            <!-- compute rate from cost -->             
            <property name="targetResource" value="DiskGB" />
            <property name="expression" value="DiskGB_COST / DiskGB" />
          </bean>
        </list>
      </property>
    </bean>
  </batch:tasklet>
 </batch:step>
Last modified

Tags

This page has no custom tags.

Classifications

This page has no classifications.
© Copyright 2018 Hewlett Packard Enterprise Development LP