Make block-storage endpoint optional for select commands
Several commands unconditionally initialized the Cinder client even when block-storage was not present in the service catalog. This caused failures such as “public endpoint for block-storage service not found” on clouds without Cinder.
Defer volume client initialization until it is actually needed, using the existing is_volume_endpoint_enabled() helper:
- server create: only load Cinder when –volume, –snapshot, or –block-device-mapping with volume/snapshot sources are used
- extension list: skip block-storage extensions when unavailable
- availability zone list: skip volume availability zones when unavailable
Volume-related options still require Cinder and now fail with a clear error when the endpoint is missing.
Closes-Bug: #2160039
Assisted-by: Cursor Composer 2.5 Change-Id: I79e2efe3e79727c7055ca47c0eca05833be6eb1b Signed-off-by: Slawek Kaplonski skaplons@redhat.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号