Feat: Add OpenStack COE cluster management command 52/73952/2 master v0.37.18
authorAnil Belur <abelur@linuxfoundation.org>
Sat, 6 Dec 2025 13:42:02 +0000 (23:42 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Tue, 9 Dec 2025 02:39:29 +0000 (12:39 +1000)
commit1879e8c8721088ab67e2c82a4994653a01e87cf2
tree35db858ce078be1855102bc7de3e37a1c98f6fa5
parentcda46e7ac67be500ecacaa365075392a0ff9f4bc
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>
lftools/openstack/cluster.py [new file with mode: 0644]
lftools/openstack/cmd.py
releasenotes/notes/add-openstack-cluster-ac419d783732.yaml [new file with mode: 0644]
tests/test_openstack_cluster.py [new file with mode: 0644]