Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include support for CLI API for actions currently performed via HTTP API #298

Open
EmersonPrado opened this issue Oct 16, 2023 · 2 comments

Comments

@EmersonPrado
Copy link
Contributor

Custom resource wildfly_cli nicely executes JBossCLI/WildFly commands thru an HTTP connection to JBoss/WildFly server. But, in case we need to change any configuration before starting the server, we need to resort to the embedded server.

My proposal is to either write a new provider "embedded" to the existing type wildfly_cli. I managed something in a module used internally at work, but I think this would better suit this public module.

@EmersonPrado
Copy link
Contributor Author

Some basic facts require a big change:

  • Main entry point for general Wildfly resource changes is defined type wildfly::resource, which uses custom resource wildfly_resource
  • Moving from HTTP API to embedded server is, actually, a two-step process
    • Implement CLI API
    • Implement embedded server

So, I'm changing this issue to implement CLI API support, maybe as a common provider or shared library, which could serve wildfly_cli and wildfly_resource. And leaving the embedded server part for a future issue.

@EmersonPrado EmersonPrado changed the title Include support for embedded server in custom resource wildfly_cli Include support for CLI API for actions currently performed via HTTP API Jan 8, 2024
@EmersonPrado
Copy link
Contributor Author

Proposal for code organization:

  • Provider wildfly_cli::cli_api
    • Validate CLI commands from command parameter
    • Validate results
  • Provider wildfly_resource::cli_api
    • Check current resource state
    • Format CLI commands from state parameter
    • Validate results
  • Base provider cli_api
    • Coordinate methods and data
  • Utility Ruby modules
    • Run API
    • Connect and authenticate to Wildfly server
    • Run commands
    • Format results as a Ruby hash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant