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

ModifyResourceNameFromIdentifier

Table of contents
No headers

Modifies an existing resource name by adding a prefix or suffix constructed from one or more constants or identifier values. Certain resources can be included or excluded during processing. By default, all resources are processed. Options include specifying a list of explicit resource names to always modify along regular expressions for inclusion or exclusion of matching resources.

A prefix and/or suffix is described by InputIdentifier objects that specify existing identifiers along with options for extracting and concatenating. The resulting value is assembled by concatenating the value extracted for each InputIdentifier in the order provided. This value is then applied as a prefix or suffix as configured. Each record processed must contain all the specified input identifiers or a transform exception will occur. For more information on how to perform various functions, such as substring and truncation, see Creating new identifiers with InputIdentifier.

Class

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

Properties

<property name="prefixIdentifiers" />

Sets the InputIdentifier objects that describe how to assemble a value for prepending to resource names.

<property name="suffixIdentifiers" />

Sets the InputIdentifier objects that describe how to assemble a value for appending to resource names.

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

Sets a list of explicit resource names to be modified.

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

Sets regular expressions to identify resources that are to be included when processing records. If a resource matches both an include and exclude pattern, the exclude takes precedence. Explicit resource names specified in resources property are always processed.

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

Sets regular expressions to identify resources that are to be left alone when processing records. Explicit resource names specified in resources property will still be processed even if they match an 'exclude' expression set here.

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.ModifyResourceNameFromIdentifier">
            <property name="filter">
              <bean class="com.cloudcruiser.batch.filter.IdentifierExistsCondition">
                <property name="identifierName" value="vmstate" />
                  </bean>
            </property>
            <property name="active" value="true"/>
            <property name="resources" value="NetworkBandwidth,IPAddress" />
            <property name="resourceIncludes" value="Disk.*,Cpu.*" />
            <property name="resourceExcludes" value="Storage.*" />
            <property name="exceptionProcessing" value="true" />
            <property name="prefixIdentifiers" />
            <property name="suffixIdentifiers">
              <list>
                <bean class="com.cloudcruiser.batch.transform.InputIdentifier">
                  <property name="name" value="vmstate" />
                  <property name="prefix" value="_" />
                </bean>
              </list>
            </property>
          </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