While this PR doesn't fix all of the problems addressed in the issues above, it is our
initial attempt at creating a class factory for certain CLI commands to reduce the
verbage needed to execute those commands. Spefically in this branch, we've addressed the
command class GeoipsListSingleInterface. We now use the aforementioned class as a
base class to build GeoipsListSingleInterface<interface_name> classes at runtime.
By doing so, we can now run geoips list <interface_name> rather than
geoips list interface <interface_name>. This improves the readability of this
command and makes it much easier to type via the CLI. We expect in future PRs to address
similar commands, such as geoips get family <family_name> and
geoips get plugin <interface_name> <plugin_name> for the reasons mentioned
previously.
Reviewer Checklist
Related Issues
partially addresses NRLMMD-GEOIPS/geoips#573 partially addresses NRLMMD-GEOIPS/geoips#576
Testing Instructions
Run pytest -v ./tests/unit_tests/commandline/
Summary
While this PR doesn't fix all of the problems addressed in the issues above, it is our initial attempt at creating a class factory for certain CLI commands to reduce the verbage needed to execute those commands. Spefically in this branch, we've addressed the command class
GeoipsListSingleInterface
. We now use the aforementioned class as a base class to buildGeoipsListSingleInterface<interface_name>
classes at runtime.By doing so, we can now run
geoips list <interface_name>
rather thangeoips list interface <interface_name>
. This improves the readability of this command and makes it much easier to type via the CLI. We expect in future PRs to address similar commands, such asgeoips get family <family_name>
andgeoips get plugin <interface_name> <plugin_name>
for the reasons mentioned previously.