Topic
4 replies Latest Post - ‏2012-10-02T14:49:23Z by Kevin005
Kevin005
Kevin005
27 Posts
ACCEPTED ANSWER

Pinned topic Using Deployment Policy in XI52 to control Statistics setting

‏2012-09-06T21:07:36Z |
Has anyone had success with using a deployment policy to toggle the statistics on and off?
I can't seem to enable the statistics although the values are available in the Build options of the deployment policy.
Here is what I tested:

The modification would be a change because statistics as a value is always in the configuration file whether it is on or off.

My final configuration value I set to "enabled"

Below is the Deployment policy as it appears on my screen.
*/*/system/statistics?Property=mAdminState&Value=.* Change Configuration enabled

The problem that I see is that statistics is by default set to "no" in the configuration file. Then when it is enabled the "no" disappears leaving only the word statistics. How would that work in the deployment policy?
Updated on 2012-10-02T14:49:23Z at 2012-10-02T14:49:23Z by Kevin005
  • Liv2luv
    Liv2luv
    573 Posts
    ACCEPTED ANSWER

    Re: Using Deployment Policy in XI52 to control Statistics setting

    ‏2012-09-06T21:14:49Z  in response to Kevin005
    Have you tried something like this:

    <ModifiedConfig>
      <Match>
    */*/system/statistics?Name=default&Property=mAdminState </Match> <Type>change</Type> <Property /> <Value>enabled</Value> </ModifiedConfig>
    
    Updated on 2014-03-25T02:49:34Z at 2014-03-25T02:49:34Z by iron-man
  • irazabal
    irazabal
    218 Posts
    ACCEPTED ANSWER

    Re: Using Deployment Policy in XI52 to control Statistics setting

    ‏2012-09-10T17:16:41Z  in response to Kevin005
    I never tried it with the deployment policy...but this SOMA command one works.

    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
    <dp:request xmlns:dp="http://www.datapower.com/schemas/management" domain="MYDOMAIN">
    <dp:modify-config>
    <Statistics>
    <mAdminState>enabled</mAdminState>
    </Statistics>
    </dp:modify-config>
    </dp:request>
    </soapenv:Body>
    </soapenv:Envelope>
  • swlinn
    swlinn
    1344 Posts
    ACCEPTED ANSWER

    Re: Using Deployment Policy in XI52 to control Statistics setting

    ‏2012-09-21T15:54:35Z  in response to Kevin005
    Can I assume the statistics object is in the zip that you are importing? Assuming so, this works for me:

    <ModifiedConfig>
                    <Match>*/*/system/statistics?Name=default&amp;Property=mAdminState</Match> <Type>change</Type> <Property /> <Value>enabled</Value> </ModifiedConfig>
    


    Regards,
    Steve
    Updated on 2014-03-25T02:48:51Z at 2014-03-25T02:48:51Z by iron-man
  • Kevin005
    Kevin005
    27 Posts
    ACCEPTED ANSWER

    Re: Using Deployment Policy in XI52 to control Statistics setting

    ‏2012-10-02T14:49:23Z  in response to Kevin005
    Sorry for the delay. I was able to test and this worked for me.

    <ModifiedConfig>
    <Match>*/*/system/statistics?Name=default&Property=mAdminState</Match>
    <Type>change</Type>
    <Property />
    <Value>enabled</Value>
    </ModifiedConfig>

    Thanks again.
    Kevin