In reviews we usually check import grouping but it is boring.
By using flake8-import-order plugin, we can avoid this.
This flake8 plugin is already used in tempest.
It enforces loose checking so it sounds good to use.
Note that flake8-import-order version is pinned to avoid unexpected
breakage of pep8 job.
Change-Id: I8ccd05eb70350a2441cc2a4d1eafc09ee690b83b
attribute-level imports are not checked by hacking module now.
most noqa is used to disable warnings on attribute-level imports.
This commit drops noqa for this purpose.
After this, there are only 3 noqa under openstack_dashboard/ :)
Change-Id: I4a449802f5dbd6e44e4b8b5c378a555d47d9a99f
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
Change-Id: I88c133a37a11ef9049766a151a134106440bef6a
As mentioned in [1], we should avoid using six.iteritems(iter) to
achieve iterators. We can use iter.items() instead, as it will
return iterators in PY3 as well.
[1] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: Ieadd5fa69b3f6058c0641a5b96ef3e8e1e3f6cc2
Since Horizon is going to be the first (or, one of the first)
OpenStack component using the new MongoDB driver, it won't be able to
retrieve traces made by other components using MongoDB driver (which
it should use because Ceilometer driver was too slow) for a
while. This means that Horizon itself is responsible for tracing the
rendering of its pages down to the layer where the flow of control
leaves Horizon domain. So, a lot of api wrappers in
openstack_dashboard.api are augmented with tracing decorator to
achieve this goal.
Co-Authored-By: Timur Sufiev <tsufiev@mirantis.com>
Implements-blueprint: openstack-profiler-at-developer-dashboard
Change-Id: Ib36692f0e9e68ed7fa0cd47919ba6581c9c8ab57
The results of "Output-show" and "Output-list" can be obtained in the "stack_get".
And in the horizon "Output-show" and "Output-list" these two API is not used at all.
Change-Id: I787b91b7e1795d510e534452feec89cb2c09cf87
This patch set adds "template_version_list" and
"template_function_list" methods.
Partially implements blueprint: heat-template-versions
Change-Id: Id9718bb5d1c2b70664a9c27c67e91436e5489dd6
Currently we do not integrate heat-snapshot operation API in horizon.
However,heat has provided these API for a long time.
blueprint: #add-heat-api
Change-Id: I062a6a4126c01f89e2c1cb190a0a28e3c1fb5f3c
when get_file is contained in template, the stack create/update/preview
will fail due to No content found in the "files" section.
So added handle get_file code.
Change-Id: I6f125f9e5f3f53f630ab0d4f3f00631e6850e905
Closes-Bug: #1512564
This patch set adds "Preview Stack" button to Stacks table
to provide user with a possibility to preview stack without
creating it, as it is already implemented in CLI.
Partially implements blueprint: heat-ui-improvement
Change-Id: Idf92deb57f8213a403f102db467828087d91e79a
System Information panel is updated with new tab called
Orchestration Services to report the heat engines status.
Implements blueprint heat-engine-status-report
Change-Id: Ibb6985c74dfb0b23a5ef94febde127a673ab0e38
This patch set adds "Suspend Stack" and "Resume Stack" buttons
to Stacks table to provide user with a possibility to suspend
and resume stack, like it is already implemented in CLI.
Partially implements blueprint: heat-ui-improvement
Change-Id: I6ea8cb7f342fdd8fcfd124012aefc66d9d898410
This patch set adds "Check Stack" button to Stacks table
to provide user with a possibility to check stack, like it is
already implemented in CLI.
Partially implements blueprint: heat-ui-improvement
Change-Id: I0a2c6f62844a4120081e74689c4ca8d8cf35251d
This patch set adds 'Resources' panel to 'Orchestration' to
provide user with a list of all available resource types.
Partially implements blueprint: heat-ui-improvement
Change-Id: I0e26a1009500cc4fa78ef27ca06553cdc987fd48
Previously token values are logged as DEBUG level when a new client
object is instantiated. In other project and clients, token values
are now not logged and is output as *REDACTED* instead.
In Horizon these log lines do not have much meaning and
we can simply remove them.
Change-Id: I67617ac6424907574d79ec2a57b513a548e220d2
Closes-Bug: #1380642
Previously API client object like novaclient are created
every time methods in openstack_dashboard/api.
It leads to regeneration of API HTTP connections.
This commit caches API client object for a WSGI request
to reduce the number of HTTP connection to backends.
As WSGI request object is recreated, a cached API client
object will live in a single request to Horizon.
Change-Id: I66620b3b0a2737c7232d91006e65d0fabbd3090b
Closes-Bug: #1352144
Stack list API supports a sort direction and sort key which we can
use to paginate back
Following same convention as merged patch:
https://review.openstack.org/#/c/91111/
Change-Id: I511d7d27a6234e1510c7fa3c7f84c007599f3721
Partially-implements: blueprint pagination-add-prev-link
Warnings H904, H307 and H405 are new or considerably changed, and will
be fixed in a separate patch.
Closes-bug: #1349820
Partial-bug: #1347472
Change-Id: I4fd28990dacf16f03a4eaa6074ef59c37f1a2c14
Remove vim setting:
comment - # vim: tabstop=4 shiftwidth=4 softtabstop=4
at the top of source code files, except for files in
openstack/common.
Change-Id: I9a5c6b17c6ef7ecec601f4503dfc7b31fc72e90a
Close-bug: #1229324
2 Part view for updating Heat Templates. The first page allows you to
select a new template for your stack. The second allows you to set new
template parameters for your stack. Like the launch stack workflow, this
is not a horizon workflow, but two separate forms.
Implements: blueprint heat-stack-update
Change-Id: I2854e9e4bb578be5187ef962808b93f11ac6b1f1
We have a lot of import with #noqa that is there to ignore h302,
because it's traditional to import and use a name directly, instead
of a whole module. This hides other errors and gives people the
impression that it's actually fine to import non-modules, you just
have to slap #noqa on those lines.
I went through the code and identified about a dozen names that are
most commonly imported this way. I remove the #noqa tag from them,
and added them to the list in import_exceptions.
I also removed a few unused imports that were revealed in the process.
Change-Id: I27afb8e2b1d4759ec974ded9464d8f010312ee78
The generator being returned by heatclient didn't like
being iterated multiple times (as when doing a multiple
delete through the stacks table).
Fixes bug #1224393
Change-Id: I01482c0fadcf145fe99806983d9a1dc6f50ac56a
The various OpenStack client libaries support specifying a SSL
certificate that should be used to verify the SSL-connection, but
this option was not exposed in the horizon options. This patch
implements that. Note that although some clients do implement a
cacert-parameter, they do not necessarily actually verify the
certificate (Swift).
Change-Id: I9dfbd48a0d96103421da7d884e839d591a90cab1
Implements: blueprint ssl-cacert
This patch replaces some method imports with module imports and
makes H302 test enabled.
Fixes bug 1188531
Change-Id: Ibfbddeaa19cbbb244da58ffd5c918c41f03a0c65
This adds python-heatclient as a dependency and a simple function
to get a client reference.
Required for blueprint: heat-ui
Change-Id: I5f7d8c7c17f6e78d3f88cc39d50826416b48ad2c