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

CreateResourceFromIdentifier

Table of contents
No headers

Extracts a numeric value from an identifier as the unit value of a new Resource. The source identifier is not modified by this processor.

Class

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

PropertiesProperties

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

Sets the name of identifier to parse for a value.

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

Sets a regular expression to capture a value from the source identifier. The pattern must have one capture group and the captured text must be numeric

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

Sets the resource name for the extracted value.

<property name="strict" value="false" />

Sets flag for strict processing mode. When active, a record with no matching identifier results in a processing exception. Otherwise, no such checks are performed.

Spring Batch XML Example

<batch:step id="transform" next="charge">
  <batch:tasklet>      
    <bean class="com.cloudcruiser.batch.CCRecordTransformTasklet">
      <property name="processors">
        <list>
          <!-- extract CIDR mask from network address such as 199.59.196.0/2 -->
          <bean class="com.cloudcruiser.batch.transform.CreateResourceFromIdentifier">
            <property name="active" value="true" />
            <property name="targetResource" value="IPSpaceCidrMask" />
            <property name="sourceIdentifier" value="IPSpace" />
            <property name="valuePattern" value="[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/([0-9.]+)" />
         </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