Pulp CLI and Squeezer are client tools to Pulp that depend on talking efficiently to its REST API.
While using the same approach to parse and use the server provided API docs on the fly, they are on completely separate code bases. The reasons on the one hand are, the CLI is Python3 only, it depends on requests for http communication and uses py3 style type annotations. On the other hand, the Squeezer collection is built with dependencies limited to the Ansible distribution and required to run with multiple python interpreters including 2.7.
The desire to consolidate the backends arises from the realization that I am maintaining basically the same thing twice. Features like e.g. the version dependent workarounds would benefit directly.
However, merging these two code bases will definitely compromise some of these requirements:
- Squeezer can only be used with python >= 3.6 (on the target node)
- Squeezer will either depend on pulp-cli or a new factored out shared library (in both cases an external requirement)
- pulp-cli contexts need to be independent of click (not too hard and a good idea anyway)
Please tell us if any of these are a blocker for your specific use cases of Squeezer.
Maybe the first two of these points can be addressed by vendoring the “library parts” of Pulp CLI as module_utils
in Squeezer, but that would be a rather intricate piece of hackery and the external dependency on requests would remain.