ibm-datapower / datapower-configuration-manager

IBM DataPower Configuration Manager and IBM UrbanCode plugin
https://developer.ibm.com/urbancode/plugin/websphere-datapower-configuration-manager/
46 stars 51 forks source link

Review Changes - config-get-diff #80

Open sekhardutta opened 6 years ago

sekhardutta commented 6 years ago

Hi Team

I am trying to get config differences after deployment using DCM. I am able to achieve this using a specific Class for example class="B2BGateway" name="all-objects" but when I try Class="all-classes" name="all-objects" it is throwing an error after 15min as below. I have to get all differences not only related to specif class. Any hep would be appreciated.

D:\dcm\deploy.ant.xml:943: java.lang.RuntimeException: Failed to compute the requested diff. at com.ibm.dcm.Soma.doGetDiff(Soma.java:2744) at com.ibm.dcm.Soma.performOperation(Soma.java:182) at com.ibm.dcm.taskWdp.execute(taskWdp.java:203) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:155) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:435) at org.apache.tools.ant.Target.performTasks(Target.java:456) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405) at org.apache.tools.ant.Project.executeTarget(Project.java:1376) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1260) at org.apache.tools.ant.Main.runBuild(Main.java:853) at org.apache.tools.ant.Main.startAnt(Main.java:235) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)

Thanks Sekhar Dutta

nhmathis commented 6 years ago

Could you please post the full successful and failure plugin logs? There is important information that's useful for debugging. Feel free to redact the any sensitive information (IP Address, username, etc) .

richgroot commented 6 years ago

Can you do the same comparison via the web browser? This will help identify whether the problem is in the code that parses the diff response, or on the DP side.

On Mon, Oct 16, 2017 at 11:51 AM, Nick Mathison notifications@github.com wrote:

Could you please post the full successful and failure plugin logs? There is important information that's useful for debugging. Feel free to redact the any sensitive information (IP Address, username, etc) .

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ibm-datapower/datapower-configuration-manager/issues/80#issuecomment-336969564, or mute the thread https://github.com/notifications/unsubscribe-auth/ADuMmgBKZHKOE720EI2R5nGmGHi-hKCkks5ss5eggaJpZM4P62l9 .

sekhardutta commented 6 years ago

I have updated my params based on the java method doGetDiff as below and it is working fine

all-classes all-objects true all-classes all-objects false

But when we give as below it is failing with the error java.lang.RuntimeException: Failed to compute the requested diff.

all-classes all-objects true false true

Now, the new problem I see is when I run get configuration changes, all action which were created dynamically by appliance also added. Normally we exclude these using WEBGUI with option "Exclude generated and external data". Is there any equivalent option we have here ? Any idea?

richgroot commented 6 years ago

Interesting. The SOMA schema for the get-diff operation does not have any way to specify the inclusion or exclusion of generated objects. I strongly suspect that the underlying UI code is doing a get-diff that explicitly specifies each of the objects in its get-diff request, rather than using the all-classes and all-objects flags. It is certainly possible to do something similar here, but that code would need to be written.

Thanks, Rich

On Tue, Oct 17, 2017 at 10:28 AM, Chandra Sekhar Dutta < notifications@github.com> wrote:

I have updated my params based on the java method doGetDiff as below and it is working fine all-classes all-objects true all-classes all-objects false

But when we give as below it is failing with the error java.lang.RuntimeException: Failed to compute the requested diff. all-classes all-objects true false true

Now, the new problem I see is when I run get configuration changes, all action which were created dynamically by appliance also added. Normally we exclude these using WEBGUI with option "Exclude generated and external data". Is there any equivalent option we have here ? Any idea?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ibm-datapower/datapower-configuration-manager/issues/80#issuecomment-337277557, or mute the thread https://github.com/notifications/unsubscribe-auth/ADuMmm_Wm1GTnpeR84Np6bxCj7xT1QjWks5stNWSgaJpZM4P62l9 .

sekhardutta commented 6 years ago

Hi Rich

Please let me know if you find the param which we can use in java code to Exclude generated and external data by appliance in Review Changes. I have checked SOMA schema for get-diff and I didn't find any. For now as an interim solution I'm planning to write an XSLT to ignore unwanted data from the response of SOMA.

Regards Sekhar Dutta