diff options
| author | Jenkins <jenkins@review.openstack.org> | 2017-02-08 02:53:38 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2017-02-08 02:53:38 +0000 |
| commit | e35c97a4fc323f9771908566656c172ba4bbd340 (patch) | |
| tree | 043be872ade9302cc8d327136c6957927232f246 /openstackclient/shell.py | |
| parent | 3afd2b7ff25af7e7998e9c8f4adac8a58a079675 (diff) | |
| parent | e8b6a9f7be7e773396c8fe1021d8798aa0e2a4a9 (diff) | |
| download | python-openstackclient-e35c97a4fc323f9771908566656c172ba4bbd340.tar.gz | |
Merge "Fix wrong behavior of parsing plugin service name"
Diffstat (limited to 'openstackclient/shell.py')
| -rw-r--r-- | openstackclient/shell.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openstackclient/shell.py b/openstackclient/shell.py index e08eee61..d7fe6ac1 100644 --- a/openstackclient/shell.py +++ b/openstackclient/shell.py @@ -76,7 +76,9 @@ class OpenStackShell(shell.OpenStackShell): # Loop through extensions to get API versions for mod in clientmanager.PLUGIN_MODULES: default_version = getattr(mod, 'DEFAULT_API_VERSION', None) - option = mod.API_VERSION_OPTION.replace('os_', '') + # Only replace the first instance of "os", some service names will + # have "os" in their name, like: "antiddos" + option = mod.API_VERSION_OPTION.replace('os_', '', 1) version_opt = str(self.cloud.config.get(option, default_version)) if version_opt: api = mod.API_NAME |
