Skip to content

Commit e35c97a

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Fix wrong behavior of parsing plugin service name"
2 parents 3afd2b7 + e8b6a9f commit e35c97a

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

openstackclient/shell.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ def _load_plugins(self):
7676
# Loop through extensions to get API versions
7777
for mod in clientmanager.PLUGIN_MODULES:
7878
default_version = getattr(mod, 'DEFAULT_API_VERSION', None)
79-
option = mod.API_VERSION_OPTION.replace('os_', '')
79+
# Only replace the first instance of "os", some service names will
80+
# have "os" in their name, like: "antiddos"
81+
option = mod.API_VERSION_OPTION.replace('os_', '', 1)
8082
version_opt = str(self.cloud.config.get(option, default_version))
8183
if version_opt:
8284
api = mod.API_NAME
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
fixes:
3+
- |
4+
Fix wrong behavior of parsing plugin service name when the service name end
5+
with keyword ``os``, like: antiddos. That cause the service api version
6+
specified by users don't work.
7+
[Bug `1658614 <https://bugs.launchpad.net/python-openstackclient/+bug/1658614>`_]

0 commit comments

Comments
 (0)