Katello/katello — pull request #184 by tstrachota (2012-06-06 13:12:52+00:00)
Title: CLI action refactor

Redesigned Action and Command classes
-

Command is now descendant of Action and CommandContainer. KatelloCLI class is descendant of Command. This got us rid of ugly extract_command methods and other checks that were used when we needed to have an action as a direct subcommand of cli (eg. katello ping). From the functionality point of view, KatelloCLI is nothing but a normal command so there was no reason to have the same code twice. As a side effect, commands can have unlimited number of subcommands and actions.

Authentication settings were extracted from Server class into sublcasses of AuthenticationStrategy. This allowed to set the authentication options in KatelloCLI but use and verify them later at the time when they are really needed.

Both changes help to reduce code duplicities and clean shell functionality (history search got fixed).