From 11495e655ac7d6d8536b7762abd9c8238273ffa9 Mon Sep 17 00:00:00 2001 From: Stephen Finucane <stephenfin@redhat.com> Date: Thu, 10 Apr 2025 18:21:15 +0100 Subject: [PATCH] Don't warn about unsupported version with SDK-based commands This doesn't make sense: SDK (and the server) will handle this for us. Change-Id: I31b84e09eca0dc2bc5316d6727620346ae519512 Signed-off-by: Stephen Finucane <stephenfin@redhat.com> Closes-bug: #2106760 --- openstackclient/compute/client.py | 5 +++++ openstackclient/image/client.py | 5 +++++ openstackclient/network/client.py | 6 ------ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/openstackclient/compute/client.py b/openstackclient/compute/client.py index 74979bef36..73ce2f87d5 100644 --- a/openstackclient/compute/client.py +++ b/openstackclient/compute/client.py @@ -46,3 +46,8 @@ def build_option_parser(parser): % DEFAULT_API_VERSION, ) return parser + + +def check_api_version(check_version): + # SDK supports auto-negotiation for us: always return True + return True diff --git a/openstackclient/image/client.py b/openstackclient/image/client.py index 69a08d82f2..f75b3e6820 100644 --- a/openstackclient/image/client.py +++ b/openstackclient/image/client.py @@ -46,3 +46,8 @@ def build_option_parser(parser): % DEFAULT_API_VERSION, ) return parser + + +def check_api_version(check_version): + # SDK supports auto-negotiation for us: always return True + return True diff --git a/openstackclient/network/client.py b/openstackclient/network/client.py index faaa54e2b1..5165e1ecdc 100644 --- a/openstackclient/network/client.py +++ b/openstackclient/network/client.py @@ -27,12 +27,6 @@ API_VERSIONS = ('2.0', '2') def make_client(instance): """Returns a network proxy""" - # NOTE(dtroyer): As of osc-lib 1.8.0 and OpenStackSDK 0.10.0 the - # old Profile interface and separate client creation - # for each API that uses the SDK is unnecessary. This - # callback remains as a remnant of the original plugin - # interface and to avoid the code churn of changing all - # of the existing references. LOG.debug( 'Network client initialized using OpenStack SDK: %s', instance.sdk_connection.network,