An additional step for H302, and needed here to make mocking
is_service_enabled across modules more consistent and easier
(e.g. mocking only one signature as opposed to both
api.base.is_service_enabled and quotas.is_service_enabled).
Partial-Bug: #1109140
Change-Id: Ie6cec3138de6f2fc57b68e90db45f53bb94ab87d
Display the correct limits and usage when Neutron is in use and the
quotas extension is enabled. If Neutron is enabled but the quotas
extensions is not supported, assume the floating IPs quota is
unlimited (a floating IP quota is expected to exist in other places,
e.g. Security and Access panel)
Because quotas may not be configured or enabled even if the extension
is available, add an 'enable_quotas' setting.
Partial-Bug: #1109140
Change-Id: Id6345f4700f0ff45be8ce8acb69cca0d4e05e14a
This patch set removes some commented out stuff that
has been unintentially left in "H302 check" patch set.
It also replaces a couple more method imports with
module imports.
Fixes bug 1215892
Change-Id: I35fd880154a4ea6d6d8d3b3615103c271aa4a005
This patch replaces some method imports with module imports and
makes H302 test enabled.
Fixes bug 1188531
Change-Id: Ibfbddeaa19cbbb244da58ffd5c918c41f03a0c65
Fixes all occurrences of this. We have a custom exception handler
in Horizon anyway that only catches ClientException in most of these
cases, but this commit lets us gate on the other cases.
Change-Id: Iea3dc13817f3e5b775b2024424bf3a906da5584b
Closes-Bug: #1211657
Allows the user to pick a range of time
to query services usage data.
Fallback mode: the user will have to input
dates by hand if JavaScript is disabled.
Change-Id: I4cf4d4fd56fd450743b9d624dc066d6ed74df881
Fixes: bug #1102448
Added a csv writer using the 'csv' library to format
properly exported data - escaping, encoding etc.
Added a HttpResponse-based class to handle csv generation
Added translation for the CSV columns and template.
Fix bug #1158383
Renamed few occurencies of 'tenant' to 'project'.
Also added a new 'project' in nova_data.py, which required
some refactoring of few tests, that didn't consider the current project
for project-based calls.
Note: I've added a StreamingHttpResponse example,
which is introduced in Django 1.5+ and being advised in the ticket.
However, my opinion is that at the moment we don't need this - it is
too complicated for the current usage.
Change-Id: I18bd70a23b7b8389c7c0f96dbf8794fea5e1e75b
This patch also re-organizes imports to import one per line.
Change-Id: Ia958e3a30a48d4308d08d51df243c1272425c316
Fixes: bug 1188529
Fixes: bug 1188537
In the move to make flake8 tests stricter, we need a code
cleanup earlier.
This removes all unused imports and also enables tests to prevent
them for the future.
This patch also includes the checks on __init__.py files.
Change-Id: I34055803f7c4726682ac6fb95cc5b50ba761fec8
Fixes: bug 1188134
Added a csv writer using the 'csv' library to format
properly exported data - escaping, encoding etc.
Added a HttpResponse-based class to handle csv generation
Added translation for the CSV columns and template.
Improved consistency for exported data - now passing project name
instead of project id for csv export. Also added both project name/id
in the header of a project usage export.
Fix bug #1158383
Renamed few occurencies of 'tenant' to project.
Also added a new 'project' in nova_data.py, which required
some refactoring of few tests, that didn't consider the current project
for project-based calls.
Note: I've added a StreamingHttpResponse example,
which is introduced in Django 1.5+ and being advised in the ticket.
However, my opinion is that at the moment we don't need this - it is
too complicated for the current usage.
Change-Id: Ic00626b273921fa5c6c89704b3a9e08b252aaeb0
We should use ugettext_lazy to let users in different languages
get correct translation.Though in views or similar places
we can use ugettext with no problems, we should make code
style consistent.
This also fix the issues that the django proxy objects appear on the
launching instance page instead of translated strings. Now the
translated quota strings are handled correctly.
Fixes: bug #1178722
Change-Id: I76f0d31e6546d70e5ece7e86a06f7eefd04861d2
Modifying the api.nova.server_list() method to optionally handle
pagination. The method will also work without pagination to
support the many other place than the instance views that continue
to call the method.
Fixes: bug #1046915
Change-Id: I8195f1f2d8922e1722743d7a2d627a8645e8b3bd
Quotas fail to load on the project quota update form in the
admin dashboard when the volume service is disabled.
Change the get_default_quota_data and get_tenant_quota_data functions
to always check for a disabled volume service, so we don't have to
remember to do it every time we call the functions.
Moved *QUOTA_FIELDS to usage/quotas.py to avoid a circular import.
Fixes bug #1155878.
Change-Id: I7150c4d7c318b6199ff03825cf5d770c7741b379
QuotaUsage::_get_quota_data() always get the project quotas by the
requester's tenant_id, which was wrong.
Add a args "tenant_id" which point to the correct project when
getting its quotas.
Fix Bug #1130070
Change-Id: I82f080720235631c430d8a18a44ece013de60a3b
blueprint quantum-floating-ip
This commit allows OpenStack dashboard users to use Quantum floating
IP feature directly using Quantum API rather than Nova Proxy.
By this users can associates a floating IP per virtual NIC.
blueprint nova-net-quantum-abstraction
This commit defines an abstract class in api/network.py.
This class provides common interfaces related to network features
duplicated in Nova and Quantum. A concrete class to handle operations
should be defined in api/nova.py or api/quantum.py.
Change-Id: I780356a9f41e72e32ce1877d390ac7f99e96899c
In the current code both api.<method> and api.<category>.<method> are used.
Using api.<method> directly makes it difficult to identify which module
defined a method and forces developers to use unique method names among
projects. This commit removes api.<method> style method calls.
Change-Id: Iaefa1061f99b7865e02541df87c112a6b2868ec0
This extra check will prevent Horizon to misunderstand "-1" value when tallying quotas,
setting the "Available" field to inf instead of 0.
Fixes: bug #1084976
Change-Id: Ib316a15ac8ffa8ed4e4c51c02d5956db57fb6f6e
When displaying the quotas, we have to check if
volume service is present in the service catalog.
If not - then to remove the volume quotas from
the result object.
Fixes bug 1075319
Change-Id: Icd049a5b147cac039add1570a166d775fd0d6ec4
Now that there are multiple projects with quota data (cinder, quantum)
we need to accommodate that data being aggregated in a centralized
fashion. This commit takes care of that for nova + cinder, and paves
the way for quantum later.
Fixes bug 1070022.
Change-Id: Ifc68c2dc681b2a7b4e7787e0b1a7dca1a970fc36
Moves everything OpenStack-specific (dashboards, apis, etc.)
into the openstack_dashboard project, achieving a much
cleaner separation between the project-specific code and
the generic Horizon framework code.
Change-Id: I7235b41d449b26c980668fc3eb4360b24508717b