summaryrefslogtreecommitdiff
path: root/openstackclient/compute/v2/console.py
Commit message (Collapse)AuthorAgeFilesLines
* Switch console url show operations to SDKArtem Goncharov2020-10-241-16/+19
| | | | | | | Switch from using novaclient to SDK for openstack console url show operation. Depends-On: https://review.opendev.org/756286 Change-Id: Ibe247825148788c549c2c1e991aae92338cdf557
* Switch openstack console log show operation to use OpenStackSDKArtem Goncharov2020-10-061-10/+9
| | | | | | A short switch onto SDK for fetching console logs of the server Change-Id: I3f750ea4f13a4e72272aa67ea4506bd7182b13f9
* Replace six.iteritems() with .items()lihaijing2020-01-091-2/+1
| | | | | | | | | | | | | | | | 1. As mentioned in [1], we should avoid using six.iteritems to achieve iterators. We can use dict.items instead, as it will return iterators in PY3 as well. And dict.items/keys will more readable. 2. In py2, the performance about list should be negligible, see the link [2]. [1] https://wiki.openstack.org/wiki/Python3 [2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html Co-Authored-By: Akihiro Motoki <amotoki@gmail.com> Change-Id: I4b9edb326444264c0f6c4ad281acaac356a07e85 Implements: blueprint replace-iteritems-with-items
* Fix crashing "console log show"Thomas Goirand2018-03-161-3/+4
| | | | | | | | | | | Because of encoding issue, the "openstack console show log" is prone to a stack dump, as explained in the bug report. Use the stdout handle that has already been set up by cliff's App class with a sane default encoding. Change-Id: I4d8b0df7f16ee0463e638bb11276220e5b92023b Closes-Bug: 1747862
* Use public and unified method get_console_url()huangtianhua2017-02-141-12/+1
| | | | | | | | | | Novaclient has provided a public and unified method get_console_url() to get console urls of server. This change switches to use it. Change-Id: Ie6b9d8cfc57a6943b5d64a4064e4bdd372cd8cd3 Depends-on: I36c6209b17ef453e1c2e47841daf41f81af471dc Closes-Bug: #1654913
* translate all command help strings3.4.0Steve Martinelli2016-11-171-2/+2
| | | | | | | | | | | | | | Leverage the new cliff command class attribute (_description) to get the help of a command, this allows us to mark strings for translation. We could not do this before since the help was grabbed from the docstring. This also depends on a new release of cliff and a bump to the minimum level in osc's requirements. Closes-Bug: 1636209 Depends-On: Id915f6aa7d95a0ff3dc6e2ceaac5decb3f3bf0da Change-Id: I8673080bb5625e8e3c499feaefd42dfc7121e96f
* Support to get server rdp/serial/mks type console urlRui Chen2016-07-211-0/+27
| | | | | | | | | The patch add the support to get server rdp/serial/mks type console url, that make osc capability equal with current nova server side feature. Change-Id: I3dee2531c68563725187c8251d5ea8d4c02cca0c Closes-Bug: #1605088
* fix one spelling mistake and two help messageszhengsenyan2016-07-071-1/+1
| | | | | | | | | | I checked all the 70 rst files in doc/source/command-objects and found that: -one spelling mistake as:rescure should be rescue(server.rst) -two help messages:xpvnc should be xvpvnc(console-url.rst and console.py) Change-Id: I6f46c79983eaf5650bd3aa0ab448c19f5c6527a9
* Fix console url show command broken in microversion caseRui Chen2016-06-161-3/+9
| | | | | | | | | | | The response data of nova get_xxx_console API is changed from "console" to "remote_console" in microversion 2.6, and nova server side API schema verify the spice vnc type to "spice-html5", update OSC code to apply these change so that OSC can work in different nova microversion cases. Change-Id: I3bb4fe057e656209d00d2bb308ac3f7f837cb03f Closes-Bug: #1590318
* osc-lib: commandDean Troyer2016-06-131-1/+1
| | | | | | | Leave command.py and test_command.py as a sanity check during the deprecation period. Change-Id: I24e1b755cbfbcbcaeb5273ec0c9706b82384fc85
* osc-lib: parseractionsDean Troyer2016-06-131-1/+1
| | | | | | | Leave parseractions.py and test_parseractions.py as a sanity check during the deprecation period. Change-Id: I1a7469b6d872284e0276502a1a287bc0b87f8f83
* osc-lib: utilsDean Troyer2016-06-131-2/+3
| | | | | | | | Use osc-lib directly for utils. Leave openstackclient.common.utils for deprecation period. Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7
* Fix i18n support for help and error messages in computeTang Chen2016-05-241-7/+8
| | | | | Change-Id: Id6eebcb48d1b7b49b6636524506294edbc44a83f Partial-bug: #1574965
* log take_action parameters in a single placeAkihiro Motoki2016-02-021-11/+2
| | | | | | | | | | | | Previously each command logs take_action parameters explicitly by using @utils.log_method decorator or log.debug(). Some commands have no logging. This commit calls a logger in the base class and drops all logging definition from individual commands. Closes-Bug: #1532294 Change-Id: I43cd0290a4353c68c075bade9571c940733da1be
* Trivial: Remove useless return from files in compute.Tang Chen2015-12-171-1/+0
| | | | Change-Id: I9dc6749256fcd53d292d7f658912c032e9ce9df5
* Fix the bug of "openstack console log show"xiexs2015-11-091-0/+2
| | | | | | | | The behaviors are inconsistent while different negative line numbers specified. Change-Id: I2573f3e789f5603c896758971830ffc0b94c5e2b Closes-Bug: #1512263
* Use a common decorator to log 'take_action' activationJoshua Harlow2015-09-011-2/+2
| | | | | | | | | Instead of duplicating the same log statement throughout the code, the same logic can be provided by a shared decorator that abstracts away the logging capability and unifies it behind a common function instead. Change-Id: Icc63bced7347c8bbf0299a4c5821425a10892a79
* Command object docs: aggregate, console *, keypairDean Troyer2014-11-191-2/+2
| | | | | | | | | aggregate console log console url keypair Change-Id: Iec9b8404ed5febd061a5dfd674b76aaa8aba67bc
* Normalize more help stringsDean Troyer2014-07-241-4/+4
| | | | Change-Id: I2b21bc904e35c1cc50da369d148e607fe3e8cf90
* replace string format arguments with function parametersChristian Berendt2014-05-201-2/+2
| | | | | | | | There are files containing string format arguments inside logging messages. Using logging function parameters should be preferred. Change-Id: Ic749ac9eb55564ed631d57055a5a4dfc3aebd169
* Display all server log when --lines option is NoneYejia Xu2014-05-071-3/+7
| | | | | | | | Without --lines option, `console log show xxx` cmd will break. Change-Id: I4027aacac245e6916c1808fd9f878fb708c8a5f0 Closes-Bug: #1316870
* Begin Python 3 compatabilityDean Troyer2013-07-291-4/+3
| | | | | | | | | | | * use six.iteritems() * replace basestring with six.string_types * convert print statements to functions (they're all debugging and should be removed eventually anyway) * clean up OpenStack copyright: LLC -> Foundation Change-Id: Icb14212bcb408e63816bfec3922a697bc1a6c946
* Remove api = apiName calls from each methodSteve Martinelli2013-07-121-2/+0
| | | | | | | | | | | As discussed in https://review.openstack.org/#/c/36352/ for each command, we were setting api = identity or volume... etc, this was for an old way of calling commands that are is no longer used. Also removed openstackclient/common/command.py Change-Id: I2705f35d343f2ae729dc22d6aed0b852b2f8ca19
* Add console commandsDean Troyer2013-04-251-0/+123
Adds: * console-log * console-url Part of blueprint nova-client Change-Id: Ibea7f96382283770988d05379d41a148f8cd8c4f