Latest commits for file openstackclient/shell.py https://opendev.org/openstack/python-openstackclient/branch/master/openstackclient/shell.py Client for OpenStack services Wed, 31 Dec 2025 18:31:08 +0000 typing: Fixups for typed osc-lib https://opendev.org/openstack/python-openstackclient/commit/e8ae075c386511c0b7176aecb961115def2ca0b8 typing: Fixups for typed osc-lib Change-Id: I436983a13e8812d704af2f1eb3f600277ef8a531 Signed-off-by: Stephen Finucane <stephenfin@redhat.com> ]]> Stephen Finucane e8ae075c386511c0b7176aecb961115def2ca0b8 Mon, 15 Dec 2025 11:38:36 +0000 common: Remove references to pkg_resources https://opendev.org/openstack/python-openstackclient/commit/841d95b095105a934a4860a1a6e4b96d5b0555da common: Remove references to pkg_resources Even though the comment here attributed this to stevedore, it was in fact the use of pkg_resources that changed things. Change-Id: I35377dd7d773024aa6423b72b1412e11b1b6f2e4 Signed-off-by: Stephen Finucane <stephenfin@redhat.com> ]]> Stephen Finucane 841d95b095105a934a4860a1a6e4b96d5b0555da Fri, 12 Dec 2025 10:32:12 +0000 Implement conflict resolution https://opendev.org/openstack/python-openstackclient/commit/060299c749ce455937111e83494f6f20fa559f64 Implement conflict resolution Take advantage of functionality recently introduced in cliff to allow us to prefer commands that are in-tree over those provided via plugin packages. This will allow us to move the extensions themselves in-tree. Change-Id: I5dd9bc9743bea779ea1b4a71264c9a77c80033b3 Signed-off-by: Stephen Finucane <stephenfin@redhat.com> ]]> Stephen Finucane 060299c749ce455937111e83494f6f20fa559f64 Thu, 11 Dec 2025 13:17:24 +0000 Bump Python version used for linters to 3.10 https://opendev.org/openstack/python-openstackclient/commit/7c7c066096433fc11718938e9d03d3915216bd7a Bump Python version used for linters to 3.10 Change-Id: I693516fc2a08218c50d83a3ab121b51254f97958 Signed-off-by: Stephen Finucane <stephenfin@redhat.com> ]]> Stephen Finucane 7c7c066096433fc11718938e9d03d3915216bd7a Wed, 07 May 2025 17:55:39 +0100 Permit use of tuple API_VERSIONS https://opendev.org/openstack/python-openstackclient/commit/b2eccdcb1ab079e3e43b436907dfce4532b76e07 Permit use of tuple API_VERSIONS The values of these dictionaries are not used when SDK is in use, which should soon account for all use cases. Eventually we should probably look for plugins to return a proper class or typeddict but that's a job for another day. This began as a fix for in openstackclient/object/client.py which referenced a non-existent class and quickly snowballed. Change-Id: I7b807ec3a97124b35828ffdecbb36f6fde11e7b5 Signed-off-by: Stephen Finucane <stephenfin@redhat.com> ]]> Stephen Finucane b2eccdcb1ab079e3e43b436907dfce4532b76e07 Tue, 01 Apr 2025 10:36:02 +0100 pre-commit: Migrate pyupgrade to ruff https://opendev.org/openstack/python-openstackclient/commit/f98006ca9d15ea2a8816887bed26d5d0e28180dc pre-commit: Migrate pyupgrade to ruff Change-Id: Ic50d2a5e0bc9dcdfe29f382607135cab510cd396 Signed-off-by: Stephen Finucane <stephenfin@redhat.com> ]]> Stephen Finucane f98006ca9d15ea2a8816887bed26d5d0e28180dc Thu, 12 Sep 2024 18:08:23 +0100 trivial: Prepare for pyupgrade pre-commit hook https://opendev.org/openstack/python-openstackclient/commit/c5b772db76c071e493a81105c7d8c0def08b2264 trivial: Prepare for pyupgrade pre-commit hook This change is entirely automated save for the update of some mocks from 'io.open' to '__builtins__.open'). We are keeping this change separate from addition of the actual hook so that we can ignore the commit later. Change-Id: I0a9d8736632084473b57b57b693322447d7be519 Signed-off-by: Stephen Finucane <stephenfin@redhat.com> ]]> Stephen Finucane c5b772db76c071e493a81105c7d8c0def08b2264 Tue, 23 Apr 2024 12:24:23 +0100 Blacken everything else https://opendev.org/openstack/python-openstackclient/commit/d3f4a3d7f5a14c78b56bcc0609c32f74f0c0f845 Blacken everything else Black used with the '-l 79 -S' flags. A future change will ignore this commit in git-blame history by adding a 'git-blame-ignore-revs' file. Change-Id: I356643d06b2cd408ccaedfe02b858aea55388949 Signed-off-by: Stephen Finucane <sfinucan@redhat.com> ]]> Stephen Finucane d3f4a3d7f5a14c78b56bcc0609c32f74f0c0f845 Wed, 10 May 2023 10:51:30 +0100 Silence warnings from openstacksdk https://opendev.org/openstack/python-openstackclient/commit/23da7b73a285543745d4ea77aad4286ad59d474e Silence warnings from openstacksdk OSC has historically relied on project-specific clients like novaclient for library bindings. These did not support auto-negotiation of versions. Instead, users were advised to set the requested microversion to e.g. '2.latest' to opt into the latest API version supported by the client. We're slowly migrating everything to SDK which *does* support auto-negotiation (well, of sorts). This makes versions like '2.latest' unecessary and SDK correctly warns the user about this. You have a configured API_VERSION with 'latest' in it. In the context of openstacksdk this doesn't make any sense. Unfortunately, we have not yet migrated all commands to SDK, meaning we have a mix of SDK and legacy client-based commands. So long as there are any command using the legacy client, we can't insist on users removing this configuration. This makes the warning both annoying and something the user can't do anything about. We also don't want to remove the warning from SDK so instead we opt to filter it out, along with all other warnings from openstacksdk (which similarly a user can't do anything about). Change-Id: If8a7cf9bc876f84864d66f5aed5f2f61c5d0696a Signed-off-by: Stephen Finucane <sfinucan@redhat.com> ]]> Stephen Finucane 23da7b73a285543745d4ea77aad4286ad59d474e Tue, 11 Apr 2023 16:45:56 +0200 Remove usage of six https://opendev.org/openstack/python-openstackclient/commit/c2df9215e19752714e83fcad82c8ae3708f85d7a Remove usage of six With python3.x, classes can use 'metaclass=' instead of 'six.add_metaclass', 'six.iteritems' and 'six.iterkeys' can be replaced by 'items' and 'keys', 'six.moves.urllib.parse' can be replaced by 'urllib.parse', 'six.StringIO' and 'six.moves.cStringIO' can be replaced by 'io.StringIO', 'six.text_type' and 'six.string_type' are just 'str'. Change-Id: I84848c0bf8ab3c36dd821141191e2725e4e3b58b songwenping c2df9215e19752714e83fcad82c8ae3708f85d7a Wed, 07 Oct 2020 02:15:25 +0000 Remove redundant OpenStackShell.prepare_to_run_command https://opendev.org/openstack/python-openstackclient/commit/40f74816c11c2d46eb0595795ef3611c18920482 Remove redundant OpenStackShell.prepare_to_run_command osc-lib's OpenStackShell.prepare_to_run_command has been a superset of python-openstackclient's since at least osc-lib 1.4.0. We require 1.14.0 now, so the redundant override can be removed. Change-Id: I5658e3df5af1100e139623505d0375588edae63c Eric Fried 40f74816c11c2d46eb0595795ef3611c18920482 Thu, 31 Oct 2019 16:53:30 +0000 Clean up app initialization and config https://opendev.org/openstack/python-openstackclient/commit/ee48777207e0682862cf43fdf2f2f5dffc37d22a Clean up app initialization and config * Remove unnecessary code in OpenStackShell.initialize_app() - only the bits it instantiate our subclass of ClientManager remain * Remove OSC_Config - with https://review.opendev.org/#/c/678095/ the last remaining required bit moves to osc-lib Thos requires osc-lib 1.14.0 Change-Id: Ia4b3c737de9dc34949e74632441621014ef9eea9 Signed-off-by: Dean Troyer <dtroyer@gmail.com> ]]> Dean Troyer ee48777207e0682862cf43fdf2f2f5dffc37d22a Mon, 09 Sep 2019 14:01:57 +0000 Merge "Remove token_endpoint auth type" https://opendev.org/openstack/python-openstackclient/commit/eed615e7d0fb0935ddde0565bf93174549f2456a Merge "Remove token_endpoint auth type" Zuul eed615e7d0fb0935ddde0565bf93174549f2456a Thu, 29 Aug 2019 00:02:31 +0000 Bump hacking version https://opendev.org/openstack/python-openstackclient/commit/6419533f436c6c369e05662c6ced26ad0bc68240 Bump hacking version Pick up newer versions of this library. Thankfully no serious changes are needed. Change-Id: I69e523844529fc1c8aa0c1ce764182dbe29cfeb6 Signed-off-by: Stephen Finucane <sfinucan@redhat.com> ]]> Stephen Finucane 6419533f436c6c369e05662c6ced26ad0bc68240 Tue, 27 Aug 2019 17:12:15 -0500 Remove token_endpoint auth type https://opendev.org/openstack/python-openstackclient/commit/6fcc2608b17d84cf3699bb4a5bae692404393ca1 Remove token_endpoint auth type The token_endpoint was a compatibility auth type to maintain support for the --url global option that dated back to the beginning of OpenStack CLI auth. The common keystoneauth library implements 'admin_token' which provides the same functionality using --endpoint rather than --url. Change-Id: I1b9fbb96e447889a41b705324725a2ffc8ecfd9f Signed-off-by: Dean Troyer <dtroyer@gmail.com> ]]> Dean Troyer 6fcc2608b17d84cf3699bb4a5bae692404393ca1 Tue, 27 Aug 2019 11:08:50 -0500 Remove code migrated to osc-lib long ago https://opendev.org/openstack/python-openstackclient/commit/1b2595a9594e1a6965e6086aad7782cf3e39bafa Remove code migrated to osc-lib long ago * Remove openstackclient.api.utils and use osc_lib.api.utils * Remove openstackclient.common.clientmanager.ClientManager.auth_ref * Remove openstackclient.common.commandmanager Change-Id: I67e1dbc53cc0b37967c0011bcb2fc09bdef62d94 Signed-off-by: Dean Troyer <dtroyer@gmail.com> ]]> Dean Troyer 1b2595a9594e1a6965e6086aad7782cf3e39bafa Thu, 16 May 2019 19:19:58 -0500 Useless line of code in shell.py https://opendev.org/openstack/python-openstackclient/commit/61025bf1023328893904c3cc00bea28a238be544 Useless line of code in shell.py Shell.py contains lines to import osprofiler. This is useless because osprofiler options support code was moved to osc-lib. Removed it. Change-Id: Ibec17700c87df908640848c3787d190ca66a7bcf Closes-Bug: #1707103 Huan Xiong 61025bf1023328893904c3cc00bea28a238be544 Fri, 08 Sep 2017 06:28:15 +0000 Improve no-auth path https://opendev.org/openstack/python-openstackclient/commit/ef99f444628282d06feae04514bd2a6328d87b93 Improve no-auth path The commands that do not require authentication sometimes still need to call ClientManager.is_network_endpoint_enabled() to see if Neutron is available. Optimize the paths a bit to skip auth when it is not necessary; the upshot is Neutron will be assumed in these cases now. This gets a LOT cleaner when it appears is a future osc-lib. Change-Id: Ifaddc57dfa192bde04d0482e2cdcce111313a22a Dean Troyer ef99f444628282d06feae04514bd2a6328d87b93 Mon, 24 Apr 2017 18:57:10 -0500 Clean up password prompt work-arounds https://opendev.org/openstack/python-openstackclient/commit/46b8cad4c3a5f7a4fb3a08b4ce6fb63fa47ebac3 Clean up password prompt work-arounds osc-lib 1.2 is minimum and now handles the password prompting. Change-Id: Ie11ad64796d3a89c7396b321c34947d622d1ed39 Dean Troyer 46b8cad4c3a5f7a4fb3a08b4ce6fb63fa47ebac3 Wed, 05 Apr 2017 13:54:08 -0500 Change noauth strategy for plugin loading https://opendev.org/openstack/python-openstackclient/commit/1c3cb0a3b54cdb6cd5b27e88372b65cfac844422 Change noauth strategy for plugin loading Don't do it. os-client-config's plugin loading has been causing this pain for a long time, removing the KSC hack-around in o-c-c unmasked this again. So when auth is not reuired, just don't let o-c-c do any plugin loading at all. Ever. Of course, this shouldn't be in OSC either, but we have to do this until the equivalent fix lands in osc-lib, is released and makes it into the global requirements minimum version. Depends-on: Ie68c82f7b073012685f0513b615ab1bf00bc0c3a Change-Id: Ifdf65f3bb90fb923947a2cbe80a881d71a3fee56 Dean Troyer 1c3cb0a3b54cdb6cd5b27e88372b65cfac844422 Mon, 27 Mar 2017 19:58:40 -0500 Fix wrong behavior of parsing plugin service name https://opendev.org/openstack/python-openstackclient/commit/e8b6a9f7be7e773396c8fe1021d8798aa0e2a4a9 Fix wrong behavior of parsing plugin service name When the service name end with keyword "os", like: antiddos, the parsing logic isn't suitable, that cause the service api version specified by users don't work. Change-Id: I5d6217c77d7cd2d2f360d78d8561261398b96685 Closes-Bug: #1658614 Rui Chen e8b6a9f7be7e773396c8fe1021d8798aa0e2a4a9 Wed, 08 Feb 2017 00:47:22 +0000 Correct reraising of exception https://opendev.org/openstack/python-openstackclient/commit/40d73a0b585fde9c065fb069d7a31c4717c8887d Correct reraising of exception When an exception was caught and rethrown, it should call 'raise' without any arguments because it shows the place where an exception occured initially instead of place where the exception re-raised Change-Id: I3ec3680debbfad7c06f2251396e0e8e4e3df6c50 gengchc2 40d73a0b585fde9c065fb069d7a31c4717c8887d Fri, 02 Dec 2016 09:56:27 +0800 Improve output of supported API versions https://opendev.org/openstack/python-openstackclient/commit/42f9317360ac4a20daa2c5ef329d9fc99e8df680 Improve output of supported API versions Sort supported versions properly for better look. Change-Id: I6c2f5ecc04cf14ea5bf1b214cb303fcc9783af3f Closes-Bug: #1630962 Kyrylo Romanenko 42f9317360ac4a20daa2c5ef329d9fc99e8df680 Fri, 07 Oct 2016 11:02:53 +0000 Defer auth prompting until it is actually needed https://opendev.org/openstack/python-openstackclient/commit/14dbfe44741b65c9e0514a34669f52de8629b1c0 Defer auth prompting until it is actually needed Auth option prompting happens waaaay to early in the default os-client-config flow, we need to defer it until adter the commands have been parsed. This is why ClientManager.setup_auth() exists, as it is not called until the first attempt to connect to a server occurs. Commands that do not require authentication never hit this. Also, required options were not being enforced. By doing this we handle when no authentication info is present, we fail on missing auth-url rather than attempt to prompt for a password (default auth is password). Closes-Bug: 1619274 Change-Id: Ia4eae350e6904c9eb2c8507d9b3429fe52418726 Dean Troyer 14dbfe44741b65c9e0514a34669f52de8629b1c0 Thu, 08 Sep 2016 10:31:13 -0500 Fix auth prompt brokenness https://opendev.org/openstack/python-openstackclient/commit/bec206fa0a0214d856259661c5e32086f33d2f62 Fix auth prompt brokenness We start by fixing this in the already-present OSC_Config class so OSC can move forward. This change needs to get ported down into os-client-config in the near future, maybe even soon enough to make the client library freeze this week. * Add the pw-func argument to the OSC_Config (or OpenStackConfig) __init__() * When looping through the auth options from the KSA plugin look for any that have a prompt defined and do not have a value already, so ask for one. Closes-bug: #1617384 Change-Id: Ic86d56b8a6844516292fb74513712b486fec4442 Dean Troyer bec206fa0a0214d856259661c5e32086f33d2f62 Mon, 29 Aug 2016 11:58:49 -0500 Restore default auth-type for token/endpoint https://opendev.org/openstack/python-openstackclient/commit/188709c6688b6baa0b9e3c09f4dda745ab1e700e Restore default auth-type for token/endpoint The split to osc-lib shell lost the detection of --os-token and --os-url to set --os-auth-type token_endpoint Closes-bug: 1615988 Change-Id: I248f776a3a7b276195c162818f41ba20760ee545 Dean Troyer 188709c6688b6baa0b9e3c09f4dda745ab1e700e Wed, 24 Aug 2016 16:57:56 -0500 Gate-unbreaking combo review https://opendev.org/openstack/python-openstackclient/commit/2a1a1740862c419e08284e50103d52e029f0e61e Gate-unbreaking combo review Fix argument precedence hack Working around issues in os-client-config <= 1.18.0 This is ugly because the issues in o-c-c 1.19.1 run even deeper than in 1.18.0, so we're going to use 1.19.0 get_one_cloud() that is known to work for OSC and fix o-c-c with an axe. Remove return values for set commands 'identity provider set' and 'service provider set' were still returning their show-like data, this is a fail for set commands now, don't know how this ever passed before... Constraints are ready to be used for tox.ini Per email[1] from Andreas, we don't need to hack at install_command any longer. [1] http://openstack.markmail.org/thread/a4l7tokbotwqvuoh Co-authorioed-by: Steve Martinelli <s.martinelli@gmail.com> Depends-On: I49313dc7d4f44ec897de7a375f25b7ed864226f1 Change-Id: I426548376fc7d3cdb36501310dafd8c44d22ae30 Depends-On: I49313dc7d4f44ec897de7a375f25b7ed864226f1 Change-Id: I426548376fc7d3cdb36501310dafd8c44d22ae30 ]]> Dean Troyer 2a1a1740862c419e08284e50103d52e029f0e61e Thu, 18 Aug 2016 07:21:15 -0500 osc-lib: shell https://opendev.org/openstack/python-openstackclient/commit/6a15f90daed6514e30b4af0ebb52c7864acaafcc osc-lib: shell Convert to using ClientManager and OpenStackShell from osc-lib. * Change all internal uses of ClientManager private attributes that are now public in osc-lib's ClientManager. Leave back-compat copies in place in OSC's clientManager so we don't break plugins. * Put some work-arounds in place for changes in osc-lib that we need until a new release makes it through the g-r and u-c change process. * Add a test for Unicode decoding of argv in shell.main() to parallel the one in osc-lib. Change-Id: I85289740d4ca081f2aca8c9b40ec422ad25d302c Dean Troyer 6a15f90daed6514e30b4af0ebb52c7864acaafcc Fri, 05 Aug 2016 13:48:55 -0500 arguments are not locale decoded into Unicode https://opendev.org/openstack/python-openstackclient/commit/756d2fac67b4128312e1d779648e62f1458b4ffc arguments are not locale decoded into Unicode When the openstackclient in Python2 passes command line arguments to a subcommand it fails to pass the arguments as text (e.g. Unicode). Instead it passes the arguments as binary data encoded using the current locales encoding. An easy way to see this is trying to pass a username with a non-ASCII character. % openstack user delete ñew No user with a name or ID of 'ñew' exists. What occurs internally is when the user data is retrieved it's it properly represented in a Unicode object. However the username pased from the command line is still a str object encoded in the locales encoding (typically UTF-8). A string comparison is attempted between the encoded data from the command line and the Unicode text found in the user representation. This seldom ends well, either the comparison fails to match or a codec error is raised. There is a hard and fast rule, all text data must be stored in Unicode objects and the conversion from binary encoded text to Unicode must occur as close to the I/O boundary as possible. Python3 enforces this behavior automatically but in Python2 it is the programmers job to do so. In the past there have been attempts to fix problems deep inside internal code by attempting to decode from UTF-8. There are two problems with this approach. First, internal code has no way to accurately know what encoding was used to encode the binary data. This is way it needs to be decoded as close to the I/O source as possible because that is the best place to know the actual encoding. Guessing UTF-8 is at best a heuristic. Second, there must be a canonical representation for data "inside" the program, you don't want dozens of individual modules, classes, methods, etc. performing conversions, instead they should be able to make the assumption in what format text is represented in, the format for text data must be Unicode. This is another reason to decode as close to the I/O as possible. In Python3 the argv strings are decoded from the locales encoding by the interpreter. By the time any Python3 code sees the argv strings they will be Unicode. However in Python2 there must be explicit code added to decode the argv strings into Unicode. The conversion of sys.argv into Unicode only occurs when argv is not passed to OpenStackShell.run(). If a caller of OpenStackShell.run() supplies their own arg it is their responsiblity to assure they are passing actual text objects. Consider this a requirement of the API. Note: This patch does not contain a unittest to exercise the behavior because it is difficult to construct a test that depends on command invocation from a shell. The general structure of the unit tests is to pass fake argv into OpenStackShell.run() as if it came from a shell. Because the new code only operates when argv is not passed and defaults to sys.argv it conflicts with the unittest design. Change-Id: I779d260744728eae8455ff9dedb6e5c09c165559 Closes-Bug: 1603494 Signed-off-by: John Dennis <jdennis@redhat.com> ]]> John Dennis 756d2fac67b4128312e1d779648e62f1458b4ffc Tue, 26 Jul 2016 18:09:20 -0400 Rework clientmanager https://opendev.org/openstack/python-openstackclient/commit/f38c51c1b90576e6b13ac6086386884c09f5813a Rework clientmanager * Add compatibility for plugin v2 interface removed from osc-lib * ClientManager.is_network_endpoint_enabled() is wrapper for new is_service_available() Change-Id: I6f26ce9e4d0702f50c7949bacfbeeb0f98cddb5d Dean Troyer f38c51c1b90576e6b13ac6086386884c09f5813a Fri, 22 Jul 2016 20:49:18 +0000 Remove execute permission on a few files https://opendev.org/openstack/python-openstackclient/commit/1b878b4efd5c6161439a2c9212a3a38d5a02026a Remove execute permission on a few files Some files have execute permission unnecessarily. Change them from 755 to 644. Change-Id: I471ebd1c3d123ad4a7376f7f5996f53f8c2d9b0b SongmingYan 1b878b4efd5c6161439a2c9212a3a38d5a02026a Fri, 22 Jul 2016 17:38:34 +0000 Correct reraising of exception https://opendev.org/openstack/python-openstackclient/commit/6f36385cb87d04577d60032f6e74c732edab6d45 Correct reraising of exception When an exception was caught and rethrown, it should call 'raise' without any arguments because it shows the place where an exception occured initially instead of place where the exception re-raised. Change-Id: I5fb6dea5da7fb6e1e2b339a713c7d37f8c99e407 qinchunhua 6f36385cb87d04577d60032f6e74c732edab6d45 Thu, 07 Jul 2016 15:05:58 +0000 Do not prompt for scope options with default scoped tokens https://opendev.org/openstack/python-openstackclient/commit/fe0c8e955be0331aef9cc6847c9bddc43ce66d92 Do not prompt for scope options with default scoped tokens This changes the scope validation to occur after a token has already been created. Previous flow: 1. Validate authentication options. 2. Validate authorization options if the command requires a scope. 3. Create a token (using authentication + authorization options) 4. Run command. This means that scope was being checked, even if a default scope was applied in step 3 by Keystone. New flow: 1. Validate authentication options. 2. Create token (using authentication + authorization options) 3 Validate authorization options if the command requires a scope and the token is not scoped. 4. Run command. Change-Id: Idae368a11249f425b14b891fc68b4176e2b3e981 Closes-Bug: 1592062 Dolph Mathews fe0c8e955be0331aef9cc6847c9bddc43ce66d92 Fri, 17 Jun 2016 12:37:15 -0400 Fix missing i18n supports in api/ and shell.py https://opendev.org/openstack/python-openstackclient/commit/f25a3519c525cd8f3ff04c841b63c10f640c27f6 Fix missing i18n supports in api/ and shell.py Change-Id: I28d79d7f44b27d2b600dedad2a3601180650ad83 Partial-bug: #1574965 Huanxuan Ao f25a3519c525cd8f3ff04c841b63c10f640c27f6 Tue, 14 Jun 2016 11:03:56 -0500 osc-lib: timing https://opendev.org/openstack/python-openstackclient/commit/a55eb915a0d563ead7bd90ad91b9c86e98e87f7c osc-lib: timing Change-Id: I3fe27d98efa5090e084c676f7f8e6dad0157ed21 Dean Troyer a55eb915a0d563ead7bd90ad91b9c86e98e87f7c Mon, 13 Jun 2016 11:08:21 -0500 osc-lib: logs https://opendev.org/openstack/python-openstackclient/commit/59dffb9c62b48dbf5e99395e8f58e317e43cf036 osc-lib: logs Change-Id: I2a4d40cd72cc22e97a600751ae29c2309ebed28b Dean Troyer 59dffb9c62b48dbf5e99395e8f58e317e43cf036 Mon, 13 Jun 2016 10:55:44 -0500 osc-lib: utils https://opendev.org/openstack/python-openstackclient/commit/e5e29a8fef7ba2396015918545a49e717fe75d15 osc-lib: utils Use osc-lib directly for utils. Leave openstackclient.common.utils for deprecation period. Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7 Dean Troyer e5e29a8fef7ba2396015918545a49e717fe75d15 Mon, 13 Jun 2016 10:50:44 -0500 osc-lib: exceptions https://opendev.org/openstack/python-openstackclient/commit/d20c863ebc11cecaaefe043e615b2fb4f5f26063 osc-lib: exceptions Use osc-lib directly for exceptions. Leave openstackclient.common.exceptions for deprecation period. Change-Id: Iea3e862302372e1b31ccd27f69db59b4953ca828 Dean Troyer d20c863ebc11cecaaefe043e615b2fb4f5f26063 Mon, 13 Jun 2016 10:50:01 -0500 Fix --enable options on commands https://opendev.org/openstack/python-openstackclient/commit/6f2c1734e3d66e261f231711455821321c1fc254 Fix --enable options on commands The --enable option on commands is ignored when the arguments are parsed. This is related to the --enable-beta-commands option. Renaming the option to --os-beta-command fixes the problem. There's no need to handle backwards compatibility for the option name change because there hasn't been an OSC release yet with beta commands. Change-Id: I0327ba8a2058858a83e9a42e231470ed733cc834 Closes-Bug: #1588384 Richard Theis 6f2c1734e3d66e261f231711455821321c1fc254 Thu, 02 Jun 2016 10:07:34 -0500 Devref: Command Beta https://opendev.org/openstack/python-openstackclient/commit/1a2e12832db6f3871c2c9356ff7b017dcb23a672 Devref: Command Beta The devref proposes OSC support for beta commands. Change-Id: I538a38be33734faf6eb69a3cb50946b2396b0c57 Richard Theis 1a2e12832db6f3871c2c9356ff7b017dcb23a672 Thu, 21 Apr 2016 12:14:42 -0500 Rename --profile to --os-profile https://opendev.org/openstack/python-openstackclient/commit/530fe42589a2138278f100f791d8c6d3fbed8950 Rename --profile to --os-profile * The --profile global option is deprecated but will be supported through at least April 2017. * Update man page Closes-bug: #1571812 Change-Id: I2e623411a56096b4cc352f4eedbf770632ae2cc3 Dean Troyer 530fe42589a2138278f100f791d8c6d3fbed8950 Tue, 19 Apr 2016 07:50:42 -0500 Support client certificate/key https://opendev.org/openstack/python-openstackclient/commit/3a8320a1d73444b3bb823300e94c3e2ee85fd6ef Support client certificate/key This change enables to specify a client certificate/key with: * usual CLI options (--os-cert/--os-key) * usual environment variables ($OS_CERT/$OS_KEY) * os-client-config Change-Id: Ibeaaa5897ae37b37c1e91f3e47076e4e8e4a8ded Closes-Bug: #1565112 Cedric Brandily 3a8320a1d73444b3bb823300e94c3e2ee85fd6ef Wed, 06 Apr 2016 20:21:19 +0200 Fix dict.keys() compatibility for python 3 https://opendev.org/openstack/python-openstackclient/commit/dc7e4fc15d80eed5a814f0b87e1860f0cd86c2ee Fix dict.keys() compatibility for python 3 In Python 2, dict.keys() will return a list. But in Python 3, it will return an iterator. So we need to fix all the places that assuming dict.keys() is a list. Change-Id: I8d1cc536377b3e5c644cfaa0892e40d0bd7c11b1 Closes-Bug: #1556350 Tang Chen dc7e4fc15d80eed5a814f0b87e1860f0cd86c2ee Sat, 12 Mar 2016 10:58:28 +0800 Fix regression in interactive client mode https://opendev.org/openstack/python-openstackclient/commit/8a839ad8b82599cccf9d34e83ce3f0735334d817 Fix regression in interactive client mode Fix typo introduced in OSprofiler intergation commit, that leaded to non-working interactive mode of the CLI client. Change-Id: If5dfc90dbbe64d4665c3e33e936f0cc674738351 Closes-Bug: 1551160 Dina Belova 8a839ad8b82599cccf9d34e83ce3f0735334d817 Tue, 01 Mar 2016 13:45:19 +0300 Merge "Add shell --profile option to trigger osprofiler from CLI" https://opendev.org/openstack/python-openstackclient/commit/2819450be5d4fa57c6efdb4cd225f59bab894fba Merge "Add shell --profile option to trigger osprofiler from CLI" Jenkins 2819450be5d4fa57c6efdb4cd225f59bab894fba Fri, 26 Feb 2016 19:49:21 +0000 Add shell --profile option to trigger osprofiler from CLI https://opendev.org/openstack/python-openstackclient/commit/16f00833a70893979ccdf7ffb7f6e1e7653cdc24 Add shell --profile option to trigger osprofiler from CLI This will allow to trigger profiling of various services that allow it currently and which APIs support is added to openstackclient. Cinder and Glance have osprofiler support already, Nova and Keystone are in progress. To use this functionality osprofiler (and its storage backend) needs to be installed in the environment. If so, you will be able to trigger profiling via the following command, for example: $ openstack --profile SECRET_KEY user list At the end of output there will be message with <trace_id>, and to plot nice HTML graphs the following command should be used: $ osprofiler trace show <trace_id> --html --out result.html Related Keystone change: https://review.openstack.org/#/c/103368/ Related Nova change: https://review.openstack.org/#/c/254703/ The similar change to the keystoneclient (https://review.openstack.org/#/c/255308/) was abandoned as new CLI extenstions are not more accepted to python-keystoneclient. Change-Id: I3d6ac613e5da70619d0a4781e5d066fde073b407 , and to plot nice HTML graphs the following command should be used: $ osprofiler trace show --html --out result.html Related Keystone change: https://review.openstack.org/#/c/103368/ Related Nova change: https://review.openstack.org/#/c/254703/ The similar change to the keystoneclient (https://review.openstack.org/#/c/255308/) was abandoned as new CLI extenstions are not more accepted to python-keystoneclient. Change-Id: I3d6ac613e5da70619d0a4781e5d066fde073b407 ]]> Dina Belova 16f00833a70893979ccdf7ffb7f6e1e7653cdc24 Thu, 25 Feb 2016 20:13:27 +0000 Support unscoped token request https://opendev.org/openstack/python-openstackclient/commit/41e1bd0be64e15a5e0c12b45bdf3dcde5fabf244 Support unscoped token request Make scope check optional for the "token issue" command as unscoped token is a valid Keystone V2/V3 API. Change-Id: Ie1cded4dbfdafd3a78c0ebdf89e3f66762509930 Closes-Bug: #1543214 guang-yee 41e1bd0be64e15a5e0c12b45bdf3dcde5fabf244 Fri, 19 Feb 2016 16:07:13 -0800 Fix 'openstack --help' fails if clouds.yaml cannot be read https://opendev.org/openstack/python-openstackclient/commit/e5b8e08eb1322447940ced48b492fdc1e87399b2 Fix 'openstack --help' fails if clouds.yaml cannot be read 'openstack --help' can display the basic information, even if openstack command does not have permission to read clouds.yaml. Change-Id: I7d5255c5ce3bd60af77fc70f433ca78dc011a79f Closes-Bug: #1541047 Hideki Saito e5b8e08eb1322447940ced48b492fdc1e87399b2 Sun, 14 Feb 2016 22:08:01 +0900 The format_exc method does not take an exception https://opendev.org/openstack/python-openstackclient/commit/23486176063fb97c811af92c8af63ef833508d40 The format_exc method does not take an exception For py35, this call blows up. Seems to be ignored for py27, but even in py27, it doesn't take an exception. https://docs.python.org/2.7/library/traceback.html https://docs.python.org/3/library/traceback.html Change-Id: I2602426b966045b15b96e5e41d0df6524ed05119 Terry Howe 23486176063fb97c811af92c8af63ef833508d40 Tue, 08 Dec 2015 09:23:47 -0700 Allow int version numbers in the clouds.yaml https://opendev.org/openstack/python-openstackclient/commit/2f00fcda77af8b87d009cd92facd6a5a6ea4acd8 Allow int version numbers in the clouds.yaml OSC blows up if you try to use for example identity_api_version: 2 in the clouds.yaml. It will only work with a string '2'. This fixes that. Change-Id: I785d37a288126a1582464e907c7f9c9947bac27c TerryHowe 2f00fcda77af8b87d009cd92facd6a5a6ea4acd8 Wed, 04 Nov 2015 11:20:43 -0700