Whirr
  1. Whirr
  2. WHIRR-311

Allow services to register new CLI commands

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.6.0
    • Component/s: cli, core
    • Labels:
      None

      Description

      I believe it should be possible to define new CLI commands inside a service. I've changed the code to use Java SPI to discover the available commands. I had to move the following classes Command & AbastractClusterCommand from whirr-cli to whirr-core thanks to this maven "feature": http://jira.codehaus.org/browse/MNG-2758

      1. WHIRR-311.patch
        32 kB
        Andrei Savu
      2. WHIRR-311.patch
        29 kB
        Andrei Savu

        Issue Links

          Activity

          Hide
          Andrei Savu added a comment -

          Patch as described.

          Show
          Andrei Savu added a comment - Patch as described.
          Hide
          Andrei Savu added a comment -

          Good do commit or we need a way to separate them (visual separation on CLI output)?

          Show
          Andrei Savu added a comment - Good do commit or we need a way to separate them (visual separation on CLI output)?
          Hide
          Tom White added a comment -

          +1 This looks good. The only potential problem is that core and cli have overlapping packages (which may be a problem for OSGI?). How about changing the package in core to org.apache.whirr.command?

          Show
          Tom White added a comment - +1 This looks good. The only potential problem is that core and cli have overlapping packages (which may be a problem for OSGI?). How about changing the package in core to org.apache.whirr.command?
          Hide
          Andrei Savu added a comment -

          Sounds good. I will update and commit the patch tomorrow.

          Show
          Andrei Savu added a comment - Sounds good. I will update and commit the patch tomorrow.
          Hide
          Andrei Savu added a comment -

          Updated patch as Tom suggested.

          Show
          Andrei Savu added a comment - Updated patch as Tom suggested.
          Hide
          Andrei Savu added a comment -

          I've just committed this. Thanks Tom for feedback.

          Show
          Andrei Savu added a comment - I've just committed this. Thanks Tom for feedback.

            People

            • Assignee:
              Andrei Savu
              Reporter:
              Andrei Savu
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development