Configuration Modification Examples


# Apply configuration residing in "modify-lbg.xml"
# This file could reference variables defined in DPBuddy configuraiton file
dpbuddy modifyConfig -file dpconfigs/modify-lbg.xml


<project name="dpbuddy.samples.modifyConfig" xmlns:dp="antlib:com.myarch.dpbuddy" >

        Samples demonstrating modifying DataPower configuration

    <property name="" value="test-group" />
    <property name="" value="server1" />

    <target name="modify.lbg" description="Modify an LBG configuration">
        <dp:modifyConfig save="true">
            <!-- We can provide configuration inline. 
            Alternatively, we can use the "file" attribute or the nested fileset.
            Multiple "configuration" tags can be provided.
                <LoadBalancerGroup name="${}">
                    <!-- Note how we can specify only a subset of LBG configuration -->
                        <!-- Note-you must provide the port, otherwise the validation fails.
                        Set it to 0 to default to the port defined at the group level -->
            <!-- Transformations will be applied to all inline configurations and the file 
            specified in the "file" attribute.
            It is not necessary in this case (we could've set the value of LBMemberState to "disabled" directly),
            included for demo purposes.-->
                <setText xpath="//LBGroupMembers/LBMemberState" value="disabled" />


    <target name="modify.config.all" depends="modify.lbg" />