jboss-qa / jcontainer-manager

Tool to manage Java application containers
Apache License 2.0
4 stars 9 forks source link

Using wildfly-extras/creaper library #74

Closed osmman closed 8 years ago

osmman commented 8 years ago

Should we use wildfly-extras/creaper library for managing Wildfly an EAP servers?

basovnik commented 8 years ago

I am in! But there is one issue connected witch batch and if-statement commands. It must me fixed before we can use it. https://github.com/wildfly-extras/creaper/issues/54

basovnik commented 8 years ago

Creaper project does not have implicit support for all the CLI commands. They have to implement special classes for each command.

https://github.com/wildfly-extras/creaper/tree/master/commands/src/main/java/org/wildfly/extras/creaper/commands

Ladicek commented 8 years ago

That's not true, strictly speaking. As I mentioned in wildfly-extras/creaper#54, there's OnlineManagementClient.executeCli and CliFile. It's true we usually prefer to avoid CLI, but we're by no means strict about it and some commands are indeed implemented using CLI operations.

basovnik commented 8 years ago

@Ladicek Great. I am sorry, I did not notice method OnlineManagementClient.executeCli. Is it somehow possible to get result of this method? We were using the following hack:

https://github.com/jboss-soa-qa/jcontainer-manager/blob/develop/containers/wildfly/src/main/java/org/jboss/as/cli/impl/ExtendedCommandContextImpl.java

Ladicek commented 8 years ago

Oh well. That's the difference between execute(String), which returns a result, and executeCli(String), which doesn't return a result but supports "local operations" (like if or batch).

There's currently no such thing as your hack in Creaper. Not sure how easy or hard it would be to define such feature meaningfully.