CLI:
# Delete the WS proxy with the name starting with test. Don't fail if it doesn't exist. dpbuddy delConfig -quiet -classPattern WSGateway -namePattern "test.*" # Delete the definition of the domain "domain-to-delete". Note that we're pointing to the default domain. dpbuddy delConfig -dryRun -classPattern Domain -namePattern domain-to-delete -quiet -domain default
Ant:
<project name="dpbuddy.samples.delConfig" xmlns:dp="antlib:com.myarch.dpbuddy" > <description> Samples demonstrating deleting DataPower configuration objects </description> <target name="delete.objects"> <!-- if quiet is true, the task won't fail if the object does not exist --> <!-- Delete the WS proxy with the name starting with test --> <dp:delConfig quiet="true" dryRun="false" classPattern="WSGateway" namePattern="test.*" /> <!-- Delete all objects that start with 'testFirewall' delConfig will handle object dependencies --> <dp:delConfig quiet="true" dryRun="false" namePattern="testFirewall.*" /> </target> <target name="delete.domain"> <!-- Delete the definition of the domain "domain-to-delete". Note that we're pointing to the default domain. --> <dp:delConfig quiet="true" domain="default" dryRun="true" classPattern="Domain" namePattern="domain-to-delete"/> </target> <target name="del.config.all" depends="delete.objects, delete.domain" /> </project>