dell-asm / dell-compellent

Apache License 2.0
3 stars 25 forks source link

Machine readable output #55

Open martinhoyer opened 6 years ago

martinhoyer commented 6 years ago

Hi, can we get a machine readable output for 'show's commands? Json, xml... Or is there a way to do so without creating a parser? Thanks

sushilrai commented 6 years ago

Compellent JAVA SDK has option to return the output in XML output for all the commands.

martinhoyer commented 6 years ago

How do I do that? I only found the xmloutputfile option:

The help says '-xmloutputfile File name to save the CompCU return code in xml format. Default is cu_output.xml.'

' java -jar CompCU.jar -host -user -password -c "volume show" -xmloutputfile "output.xml" ' will give me, as the help says, the return code:

TRUE

btw, "Default is cu_output.xml" is kind of broken, because it still expect a file name, even though it will create cu_output.xml and fill it with False return code.

martinhoyer commented 6 years ago

Any update on this, please? # java -jar CompCU.jar -host <host> -user Admin -password <pass> -c "volume show" -xmloutputfile output.xml `cat output.xml

TRUE ` >