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
The 2.21 compute API microversion allows listing instance
action events and getting action event details for a deleted
server (which can be useful for auditing until the deleted
server is purged). As far as OSC is concerned it's just a
matter of specifying --os-compute-api-version 2.21 or higher
when listing events or showing event details, so this change
mentions 2.21 in the description of those commands.
Related to nova blueprint os-instance-actions-read-deleted-instances
Change-Id: If276c794f448b6fa5b0845499f3507a159acab85
With the 2.51 compute API microversion, non-admin users can also
see event details for a given request. This change mentions that
in the help text for "openstack server event show".
While in here, change the _info private attribute access to the
to_dict() usage.
Change-Id: I5fd487b17c4b85bd7e619112ad262ffdd3a940c8
Task: 21199
Story: 2002193
In reviews we usually check import grouping but it is boring.
By using flake8-import-order plugin, we can avoid this.
It enforces loose checking so it sounds good to use it.
This flake8 plugin is already used in tempest.
Note that flake8-import-order version is pinned to avoid unexpected
breakage of pep8 job.
Setup for unit tests of hacking rules is tweaked to disable
flake8-import-order checks. This extension assumes an actual file exists
and causes hacking rule unit tests.
Change-Id: I12b596820727aeeb379bee16c2bc993dee9eb637
OSC server event is similar to nova's instance action commands.
Server event is the event record that had been done on a server,
include: event type(create, delete, reboot and so on),
event result(success, error), start time, finish time and so on.
These are important information for server maintains.
Change-Id: I8111091f46a0d2755728d8f9d43cc0dfe8842d13
Closes-Bug: #1642030