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

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
    1327 Posts
    ACCEPTED ANSWER

    Re: Unsaved changes in Datapower

    ‏2012-12-05T11:02:00Z  in response to lenisha
    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
      ACCEPTED ANSWER

      Re: Unsaved changes in Datapower

      ‏2012-12-05T14:29:24Z  in response to swlinn
      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
        2818 Posts
        ACCEPTED ANSWER

        Re: Unsaved changes in Datapower

        ‏2012-12-05T14:39:27Z  in response to lenisha
        > 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
          ACCEPTED ANSWER

          Re: Unsaved changes in Datapower

          ‏2012-12-05T14:58:48Z  in response to HermannSW
          Yeah "Save page" is the last resort.. We wer hoping for some more organized option ....
      • swlinn
        swlinn
        1327 Posts
        ACCEPTED ANSWER

        Re: Unsaved changes in Datapower

        ‏2012-12-05T23:58:14Z  in response to lenisha
        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
          1327 Posts
          ACCEPTED ANSWER

          Re: Unsaved changes in Datapower

          ‏2012-12-06T00:46:47Z  in response to swlinn
          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
            ACCEPTED ANSWER

            Re: Unsaved changes in Datapower

            ‏2012-12-06T19:39:36Z  in response to swlinn
            Thanks Steve, it should be good option for us