https://blueprints.launchpad.net/fuel/+spec/refactoring-for-fuelclient
We need to perform refactoring for fuelclient for improving reusability for its code base and gain more control for both whole system and particular parts of it.
Now there are several issues in architecture of the project which cause difficulties in maintaining, implementing new logic and reusing existing code. These parts are:
There are several proposes for every problem mentioned in previous section:
All other basic tools such argparse or docopt doesn’t suffice in case of fuelclient because we need to implement our own object hierarchy instead of using base classes of framework which leads to complicated structure as that we have now. There also others framework for building cli application (e.g. http://click.pocoo.org/) but chosen tools are wide using in OS community and are best practices for building OS related application.
None
None
Refactoring requires some additional packages to be installed on master node so they should be present after upgrade to version which includes change upon the table.
None
None
End users workflow may be affected as interface of system will be changed so adequate documentation must be provided for them
None
One should add needed rpm’s to fuelclient spec. Packages must be already present in repos.
After refactoring particular parts of the system may be reused in other projects when such functionality is needed as ostf, system tests etc. Also using cliff simplifying addition of new cli actions trough mechanism of entry points for package.
Whole task may be divide into following separate changes:
Refactoring relies on additional package - python-cliff
As purpose of the refactoring is to bring well recommended itself in OS community technologies and tools it is naturally that testing system must be changed too in order to use best practices from corresponding OS development area, i.e. testing of cli clients. Also current coverage of use cases must be extended as it is not enough for such big project as nailgun.
Interface of fuelclient may be changed after refactoring so it must be mirrored into corresponding documentation
Cliff documentation: http://cliff.readthedocs.org/en/latest/
Requests documentation: http://docs.python-requests.org/en/latest/