Topic
  • 9 replies
  • Latest Post - ‏2012-12-06T19:39:36Z by lenisha
lenisha
lenisha
22 Posts

Pinned topic Unsaved changes in Datapower

‏2012-12-04T18:16:19Z |
Folks,

Is there a way to export unsaved changes that are available for review in Datapower?

I see only option "Save", but we need to report on them before saving and validate across multiple teams....

Thanks
Updated on 2012-12-06T19:39:36Z at 2012-12-06T19:39:36Z by lenisha
  • swlinn
    swlinn
    1348 Posts

    Re: Unsaved changes in Datapower

    ‏2012-12-05T11:02:00Z  
    When you do an export, the default value is to export the running configuration. This will pick up your changes that have not been saved.

    Regards,
    Steve
  • lenisha
    lenisha
    22 Posts

    Re: Unsaved changes in Datapower

    ‏2012-12-05T14:29:24Z  
    • swlinn
    • ‏2012-12-05T11:02:00Z
    When you do an export, the default value is to export the running configuration. This will pick up your changes that have not been saved.

    Regards,
    Steve
    Yes it will export everything with the new config. But we need the DIFF report.
    To see what exact rules and object changes - similar to the view that is shown in "Review changes" option.
    Is theere a way to export data in this view?
  • HermannSW
    HermannSW
    4903 Posts

    Re: Unsaved changes in Datapower

    ‏2012-12-05T14:39:27Z  
    • lenisha
    • ‏2012-12-05T14:29:24Z
    Yes it will export everything with the new config. But we need the DIFF report.
    To see what exact rules and object changes - similar to the view that is shown in "Review changes" option.
    Is theere a way to export data in this view?
    > Is theere a way to export data in this view?
    >
    Is browser "Save Page" in compare config view an option for you?

    Since you do want the diff only a "normal" export seems not what you are interested in.

     
    Hermann<myXsltBlog/> <myXsltTweets/>
  • lenisha
    lenisha
    22 Posts

    Re: Unsaved changes in Datapower

    ‏2012-12-05T14:58:48Z  
    • HermannSW
    • ‏2012-12-05T14:39:27Z
    > Is theere a way to export data in this view?
    >
    Is browser "Save Page" in compare config view an option for you?

    Since you do want the diff only a "normal" export seems not what you are interested in.

     
    Hermann<myXsltBlog/> <myXsltTweets/>
    Yeah "Save page" is the last resort.. We wer hoping for some more organized option ....
  • HermannSW
    HermannSW
    4903 Posts

    Re: Unsaved changes in Datapower

    ‏2012-12-05T15:15:17Z  
    • lenisha
    • ‏2012-12-05T14:58:48Z
    Yeah "Save page" is the last resort.. We wer hoping for some more organized option ....
    There are no other options in the product besides "compare config" tool itself.

    You may want to have a look into zip2html tool from this Blog posting:
    https://www.ibm.com/developerworks/mydeveloperworks/blogs/HermannSW/entry/zip2html6

    You can export the running config, and then generate zip2html output for just exported and previous config.
    Then just a normal "diff" on the generated HTML files may meet your requirements ...

     
    Hermann<myXsltBlog/> <myXsltTweets/>
  • lenisha
    lenisha
    22 Posts

    Re: Unsaved changes in Datapower

    ‏2012-12-05T18:07:38Z  
    • HermannSW
    • ‏2012-12-05T15:15:17Z
    There are no other options in the product besides "compare config" tool itself.

    You may want to have a look into zip2html tool from this Blog posting:
    https://www.ibm.com/developerworks/mydeveloperworks/blogs/HermannSW/entry/zip2html6

    You can export the running config, and then generate zip2html output for just exported and previous config.
    Then just a normal "diff" on the generated HTML files may meet your requirements ...

     
    Hermann<myXsltBlog/> <myXsltTweets/>
    > HermannSW wrote:
    > There are no other options in the product besides "compare config" tool itself.
    >

    So for sure no way to export results from this tool, except for Save page ? :(

    > You may want to have a look into zip2html tool from this Blog posting:
    > https://www.ibm.com/developerworks/mydeveloperworks/blogs/HermannSW/entry/zip2html6
    >
    > You can export the running config, and then generate zip2html output for just exported and previous config.
    > Then just a normal "diff" on the generated HTML files may meet your requirements ...
    >
    >  

    Thats a very handy utility, thanks for pointing out. what diff would you recommend ?

    > Hermann<myXsltBlog/> <myXsltTweets/>
  • swlinn
    swlinn
    1348 Posts

    Re: Unsaved changes in Datapower

    ‏2012-12-05T23:58:14Z  
    • lenisha
    • ‏2012-12-05T14:29:24Z
    Yes it will export everything with the new config. But we need the DIFF report.
    To see what exact rules and object changes - similar to the view that is shown in "Review changes" option.
    Is theere a way to export data in this view?
    It's been a while since I tried this, but a dp:get-diff in a soma request will allow you to compare the running configuration against the persisted configuration, similar to the compare configuration tool in the gui. What is missing from the soma request schema is the ability to apply a deployment policy against an export if you're comparing an exported zip (there is an ER outstanding for that feature). This request used to work in a previous firmware version, although I'm getting a schema validation error now so something may have changed with the 5.0 release that I'm using now and I'll need time to research this. Maybe if you're on an earlier version this may still work ...

    
    <?xml version=
    "1.0" encoding=
    "UTF-8"?> <env:Envelope xmlns:env=
    "http://schemas.xmlsoap.org/soap/envelope/"> <env:Body> <dp:request domain=
    "swlinn" xmlns:dp=
    "http://www.datapower.com/schemas/management"> <dp:get-diff> <dp:from> <dp:object class=
    "all-classes" name=
    "all-objects" recursive=
    "false" persisted=
    "true" /> </dp:from> <dp:to> <dp:object class=
    "all-classes" name=
    "all-objects" recursive=
    "false" persisted=
    "false" /> </dp:to> </dp:get-diff> </dp:request> </env:Body> </env:Envelope>
    


    You should get an xml response that somewhat looks like an export.xml with the exception that you'll see some additional attributes for new/modified/deleted objects.

    Regards,
    Steve
  • swlinn
    swlinn
    1348 Posts

    Re: Unsaved changes in Datapower

    ‏2012-12-06T00:46:47Z  
    • swlinn
    • ‏2012-12-05T23:58:14Z
    It's been a while since I tried this, but a dp:get-diff in a soma request will allow you to compare the running configuration against the persisted configuration, similar to the compare configuration tool in the gui. What is missing from the soma request schema is the ability to apply a deployment policy against an export if you're comparing an exported zip (there is an ER outstanding for that feature). This request used to work in a previous firmware version, although I'm getting a schema validation error now so something may have changed with the 5.0 release that I'm using now and I'll need time to research this. Maybe if you're on an earlier version this may still work ...

    <pre class="jive-pre"> <?xml version= "1.0" encoding= "UTF-8"?> <env:Envelope xmlns:env= "http://schemas.xmlsoap.org/soap/envelope/"> <env:Body> <dp:request domain= "swlinn" xmlns:dp= "http://www.datapower.com/schemas/management"> <dp:get-diff> <dp:from> <dp:object class= "all-classes" name= "all-objects" recursive= "false" persisted= "true" /> </dp:from> <dp:to> <dp:object class= "all-classes" name= "all-objects" recursive= "false" persisted= "false" /> </dp:to> </dp:get-diff> </dp:request> </env:Body> </env:Envelope> </pre>

    You should get an xml response that somewhat looks like an export.xml with the exception that you'll see some additional attributes for new/modified/deleted objects.

    Regards,
    Steve
    The above request works fine in 5.0 with https://applianceip:5550/service/mgmt/3.0. You get a response that looks like an export.xml, with the following exceptions ...

    
    <ConfigDeploymentPolicy name=
    "test-complex-delete" xmlns:env=
    "http://www.w3.org/2003/05/soap-envelope"> <mAdminState read-only=
    "true" xmlns:dpm=
    "http://www.datapower.com/schemas/management">enabled</mAdminState> <ModifiedConfig new=
    "true"> <Match xmlns:dpm=
    "http://www.datapower.com/schemas/management">*
    /*/protocol/http?Name=.*&amp;Property=LocalAddress</Match> <Type xmlns:dpm="http://www.datapower.com/schemas/management">change</Type> <Property xmlns:dpm="http://www.datapower.com/schemas/management" /> <Value xmlns:dpm="http://www.datapower.com/schemas/management">myalias</Value> </ModifiedConfig> <ModifiedConfig xmlns:dpm="http://www.datapower.com/schemas/management"> <Match>*/*/network/loadbalancer-group?Name=.*&amp;Property=LBGroupMembers</Match> <Type>delete</Type> <Property /> <Value /> </ModifiedConfig> </ConfigDeploymentPolicy>
    

    In my case I added a bogus rule to a deployment policy object. Note on the first modifyconfig rule ...

    <ModifiedConfig new="true">

    That was the rule I added, so you get this additional new attribute set to true. I'd assume if you added a new object or deleted an object, you'd have a similar new or deleted, perhaps a modified attribute at the object level, but I'll leave that for you to play with :-). Once you get this data you'll need an xsl to parse through it to just output the things that have changed. I don't see in the schema a mechanism to specify only changed objects in the output.

    Enjoy ...
    Steve
  • lenisha
    lenisha
    22 Posts

    Re: Unsaved changes in Datapower

    ‏2012-12-06T19:39:36Z  
    • swlinn
    • ‏2012-12-06T00:46:47Z
    The above request works fine in 5.0 with https://applianceip:5550/service/mgmt/3.0. You get a response that looks like an export.xml, with the following exceptions ...

    <pre class="jive-pre"> <ConfigDeploymentPolicy name= "test-complex-delete" xmlns:env= "http://www.w3.org/2003/05/soap-envelope"> <mAdminState read-only= "true" xmlns:dpm= "http://www.datapower.com/schemas/management">enabled</mAdminState> <ModifiedConfig new= "true"> <Match xmlns:dpm= "http://www.datapower.com/schemas/management">* /*/protocol/http?Name=.*&amp;Property=LocalAddress</Match> <Type xmlns:dpm="http://www.datapower.com/schemas/management">change</Type> <Property xmlns:dpm="http://www.datapower.com/schemas/management" /> <Value xmlns:dpm="http://www.datapower.com/schemas/management">myalias</Value> </ModifiedConfig> <ModifiedConfig xmlns:dpm="http://www.datapower.com/schemas/management"> <Match>*/*/network/loadbalancer-group?Name=.*&amp;Property=LBGroupMembers</Match> <Type>delete</Type> <Property /> <Value /> </ModifiedConfig> </ConfigDeploymentPolicy> </pre>
    In my case I added a bogus rule to a deployment policy object. Note on the first modifyconfig rule ...

    <ModifiedConfig new="true">

    That was the rule I added, so you get this additional new attribute set to true. I'd assume if you added a new object or deleted an object, you'd have a similar new or deleted, perhaps a modified attribute at the object level, but I'll leave that for you to play with :-). Once you get this data you'll need an xsl to parse through it to just output the things that have changed. I don't see in the schema a mechanism to specify only changed objects in the output.

    Enjoy ...
    Steve
    Thanks Steve, it should be good option for us