Skip to content

dcm:deployment policy property identification

Nick Mathison edited this page Aug 4, 2017 · 3 revisions

Deployment Policy Property Identification

Configuration of the definitions file and deployment policy is a fairly complex process, but provides powerful capabilities to define deployments. To take advantage of the deployment policy configuration file, you must have a firm understanding of how and where to identify each elements properties. The DataPower plugin's advanced walkthrough shows how to set up the definitions file, but does not explain directly where to find each value. This documentation will explain exactly that.

Understanding the deployment policy's values and syntax also means that you must have a decent understanding of the export.xml file. In every export.zip, there is an associated export.xml file. This file contains the configuration information of each importing objects' name, properties, object types, and much more. The name, type, device, and domain values can all be found within this file. I suggest opening up the export.xml file in a text editor (such as Notepad++) to quickly identify strings using the ctrl-f search functionality.

Sample Object

Example HTTPSSourceProtocolHandler object pulled from the export.xml file. This snippet has been formatted for easier viewing.

<HTTPSSourceProtocolHandler name="sample-http-source-protocol" xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:dp="http://www.datapower.com/schemas/management">
    <mAdminState>enabled</mAdminState>
    <LocalAddress>0.0.0.0</LocalAddress>
    <LocalPort>55555</LocalPort>
    <HTTPVersion>HTTP/1.1</HTTPVersion>
    <AllowedFeatures>
        <HTTP-1.0>on</HTTP-1.0>
        <HTTP-1.1>on</HTTP-1.1>
        <HTTP-2.0>on</HTTP-2.0>
        <POST>on</POST>
        <GET>on</GET>
        <PUT>on</PUT>
        <HEAD>off</HEAD>
        <OPTIONS>off</OPTIONS>
        <TRACE>off</TRACE>
        <DELETE>off</DELETE>
        <CONNECT>off</CONNECT>
        <CustomMethods>off</CustomMethods>
        <QueryString>on</QueryString>
        <FragmentIdentifiers>on</FragmentIdentifiers>
        <DotDot>off</DotDot>
        <CmdExe>off</CmdExe>
    </AllowedFeatures>
    <PersistentConnections>on</PersistentConnections>
    <MaxPersistentConnectionsReuse>0</MaxPersistentConnectionsReuse>
    <AllowCompression>off</AllowCompression>
    <AllowWebSocketUpgrade>off</AllowWebSocketUpgrade>
    <WebSocketIdleTimeout>0</WebSocketIdleTimeout>
    <MaxURLLen>16384</MaxURLLen>
    <MaxTotalHdrLen>128000</MaxTotalHdrLen>
    <MaxHdrCount>0</MaxHdrCount>
    <MaxNameHdrLen>0</MaxNameHdrLen>
    <MaxValueHdrLen>0</MaxValueHdrLen>
    <MaxQueryStringLen>0</MaxQueryStringLen>
    <CredentialCharset>protocol</CredentialCharset>
    <SSLProxy class="SSLProxyProfile">sslProxyProfile</SSLProxy>
    <SSLServerConfigType>proxy</SSLServerConfigType>
    <HTTP2MaxStreams>100</HTTP2MaxStreams>
    <HTTP2MaxFrameSize>16384</HTTP2MaxFrameSize>
    <HTTP2StreamHeader>off</HTTP2StreamHeader>
</HTTPSSourceProtocolHandler>

Object and Property Names

This is a sample object that could be found in an export.xml file. Note that is is same object that is imported in the DataPower plugin's advanced walkthrough. In the first line, you should see a name property. This value will match the name of the object in Datapower. When first looking to identify a objects to import, ignore, or modify, identifying an object by its name is the simplest way.

In this example, the sample-http-source-protocol is a HTTPSSourceProtocolHandler object. (Do not confuse this with the type property which is explained next.) The HTTPSSourceProtocolHandler object has access to the properties defined in its child elements. These property names, such as LocalAddress, are the values that should be referenced in the add-property, modify-property, and delete-property elements.

  • The add-property is used to create an expected object property that is not specified in the export.xml. You cannot create a property with any chosen name. It must be a known property name of that particular object.
  • The modify-property can import a different property value than what is specified in the export.xml.
  • The delete-property can ignore the set value in the export.xml and set it to its default value. Properties cannot be completely removed. Their values are reset to the default.

Object Type

The type argument references the resource object or property class identifier in DataPower. However, it is not simply the object's name. The type is an id that is first defined by the object's category and then the object's id. For example, for the HTTPSSourceProtocolHandler object, it has a type of protocol/https. Protocol is the category; https is the object's class. This also may be known as an id used to reference objects in the DataPower GUI. Like the name, the simplest way to identify the type is through the export.xml.

The type property is incredibly powerful. If specified, the property, black-list, or white-list elements will reach to cover all objects with that type. This is the easiest way to modify multiple object types at once.

Find the Object Type

  1. Based on an object's name, identify its class. Example: Name:sample-http-source-protocol -> Object:HTTPSSourceProtocolHandler
  2. Search (with ctrl-f) using the object's name for a snippet that looks like this:
<POV>
    <CatID>https</CatID>
    <FormID>HTTPSHandler</FormID>
    <Resource>protocol/https</Resource>
    <ObjClass>HTTPSSourceProtocolHandler</ObjClass>
    <ObjName>Web_HTTPS</ObjName>
    <PropName>LocalAddress</PropName>
    <PropValue>${protocol/https:Web_HTTPS:LocalAddress}</PropValue>
    <PropType>string</PropType>
    <PropExposed>true</PropExposed>
    <PropRequired>true</PropRequired>
    <PropShow>true</PropShow>
    <PropClass/>
    <ExempClass>MultiProtocolGateway</ExempClass>
    <ExempName>Web_HTTPS</ExempName>
    <VectorType/>
</POV>
  1. Confirm that the <ObjClass> or <PropClass> element contains your searched for object.
  2. The desired value should be one of the first elements between in the <Resource> tags. For Example: protocol/https. This is the value to specify for the type property in the deployment policy.

Domain and Device

The domain and device properties are useful for when you want to define the definitions file and deployment policy at an architectural level. DataPower offers the ability to export a configuration that spans multiple domains or appliances. Fortunately, the DCM tool also allows you to prune your imports based on the domain or appliance. Both of these values can be found in the export.xml.

Domain

Example: <Domain name="default"...> While the domain's name should be easy to identify, as it can be found in the DataPower GUI, it is good practice to confirm what objects pertain to the domain's configuration. All to-be-imported objects should be bounded by the opening and closing <Domain></Domain> tags.

Device

Example: <device-name>a2e3849126gf</device-name> The device property is useful the physical scale. Because only one <device-name> can be set per export.xml file, this property is used in scenarios with multiple export.zips, but only a single definitions file. Use this property to import configurations from a specific appliance, but you happen to iterate through multiple export.zips.

Clone this wiki locally