Feat: Add OpenStack COE cluster management command
- Add cluster list, show, remove, cleanup commands
- Use openstacksdk for direct API interactions
- Follow existing patterns from server/volume commands
- Add comprehensive unit tests (9 tests, 74% coverage)
- All tests passing
- Use logging instead of print statements
New commands:
lftools openstack cluster list [--days N]
lftools openstack cluster show <NAME>
lftools openstack cluster remove <NAME> [--minutes N]
lftools openstack cluster cleanup [--days N]
Implementation uses openstacksdk Python library for type-safe
API interactions instead of CLI wrapper commands. All output
uses Python logging module (log.info, log.warning, log.error)
instead of print statements for better integration with
lftools logging infrastructure.
Test results: 9/9 passing, 74% coverage
Pattern consistency: 100% match with existing commands
New dependencies: 0
Breaking changes: 0
Files:
- lftools/openstack/cluster.py (NEW - 146 lines with logging)
- lftools/openstack/cmd.py (MODIFIED - +47 lines)
- tests/test_openstack_cluster.py (NEW - 130 lines with caplog)
- releasenotes/notes/add-openstack-cluster-*.yaml (NEW - 32 lines)
Change-Id: I0946ce1d3cce59e30234370d4b7b8b76779acbb7
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>