Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: I2de669d8e89b8daeb7ee5405ffab35af6307c40b
Currently we can't set server groups and server group members quotas
in Horizon, they are still the back end definition of default.
In some cases, it will failed to create an instance when server group
members quota is insufficient. Therefore, it is necessary to specify
the quota of the server groups and server group members when creating
and editing the project. This patch allows the user to modify the
default values for the server groups and the server group members
quota.
Change-Id: Ifbd51bec3e775d8fecbf110da37309a443a3d1ba
Closes-Bug:#1732429
This is a preparation to support quotas for horizon plugins.
Part of blueprint horizon-plugin-tab-for-info-and-quotas
Change-Id: I11f9bfb6edae205f452e2619b33fa52254dcf37a
(In Django 2.0) The django.core.urlresolvers module is removed
in favor of its new location, django.urls.
It was depreacted in Django 1.10:
https://docs.djangoproject.com/en/2.0/releases/1.10/#id3
blueprint django2-support
Change-Id: I46ab5c325491274b8eaffbf848e5d80f83c2fd26
nova-network quotas are considered in usage/quotas.py previously.
This commit completely always disables nova-network quotas.
The nova API wrapper ensures nova-network quota fileds are not
included in responses from tenant_quota_get and default_quota_get.
Drop nova-network quota fields from the Admin Defaults panel and
the Identity Project quota form.
blueprint make-quotas-great-again
Change-Id: Ie69d3003f62d3a124d79a1fea003092f73372187
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
There was an extra variable for the so called "missing"
quotas since 2013. This patch merges them with the
normal nova quotas, cleans up the tests, removes any
usage of that special var and as a side effect, adds
the missing keys to the project quota update page.
Change-Id: Icaac1ebb1749e13fdfc307e89dcc6bbd64bef922
Closes-Bug: 1655393
Currently Horizon unable to change quotas if routers extension is
disabled, fix this by adding router and floatingip quotas to
disabled_quotas when router extension is disabled.
Change-Id: I14d8a6e2e439ab48b62ce64c88ebb4643d11e49f
Closes-bug: #1457598
Adds conditional block to nova quotas to exclude them if nova is not
enabled; adds 'permission' checks to the project overview and
access_and_security panels to only enable them if compute is enabled;
adds permission checks on compute and image to the admin overview
and metadef panels; disables 'modify quota' and 'view usage' project
actions; disables 'update defaults' if there are no quotas available.
The 'access and security' panel still appears (under Compute) but
tabs other than the keystone endpoint and RC download tab are hidden.
Closes-Bug: #1580116
Change-Id: I1b2ddee0395ad9f55692111604b31618c4eaf69e
Volumes tabs should be enabled when volumev2 endpoint is registered.
Currently, Horizon considers no volume service is running if there
is no V1 endpoint, which doesn't make sense as Horizon no longer
supports the cinder V1 protocol.
Co-Authored-By: itxaka <itxaka@redhat.com>
Change-Id: I35d821eedb75f73f9330ed11f921694104eed0c6
Closes-Bug: 1415712
mox doesn't work on Python 3, whereas mox3 works on Python 2 and Python
3. Cinder, Nova and many other projects already replaced mox with mox3.
mox3 is now maintained by OpenStack.
Partial-Implements: blueprint porting-python3
Change-Id: I10e6a9754ebd58a2640d73ec8966527c3aa1fe9a
This reverts commit ed586a0355.
The quota_class subcommand in python-novaclient was used to set default
quota values so it shouldn't have been removed. As now it is being
restored, the defaults quota panel is being restored too.
Related mailing list thread on the topic:
http://lists.openstack.org/pipermail/openstack-dev/2014-May/035383.html
Resolved merge conflicts by hand in:
openstack_dashboard/api/cinder.py
openstack_dashboard/dashboards/admin/info/tabs.py
openstack_dashboard/dashboards/admin/info/tests.py
Updated translatable segments to match refactors in
openstack_dashboard/dashboards/admin/defaults/workflows.py
openstack_dashboard/dashboards/admin/defaults/tables.py
Fixed most egregious post-merge styling errors in
openstack_dashboard/dashboards/admin/defaults/templates/defaults/index.html
(probably should have been separate, but I just couldn't let it out that way!)
Removed unrelated file that was allowed to be part of the original commit
doc/source/topics/settings.rst
Co-Authored-By: Doug Fish <drfish@us.ibm.com>
Change-Id: Ic4c4ecec843c7ea9afd0db36ce0eb15952da15b3
Partial-Bug: #1299517
The default quota panel has been moved to a tab in the system
info panel.
The update default quotas feature has been removed.
The cinder quota-class methods have been removed to keep consistency.
The test cases and the apis for nova and cinder have been modified
according the change.
This change is done to support the change:
I1110022d6f628d03aaf363da707f2d2ef1600437
Change-Id: I193c7209d9681b6d69afe0d996153ac86850d243
Closes-Bug: #1292589
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
quota names for security group are different between nova and neutron,
so the same appoach can be used for floating IP. This commit reverts
the change in get_default_quota_data in commit c44552fe66 and changes
get_disabled_quotas to determine security group and rules quotas come
from nova or neutron.
Change-Id: I9e39ac99f1e8c7ccdce64b2e2ab79615cac50892
Closes-Bug: #1235053
Secuirty group quota information in Project overview charts,
Admin defaults panel, and Admin create/update project is
retrieved from Neutron secuirty group is enabled.
Neutron security group is enbled when Neutron is used Neutron
security group extension is supported by a backend plugin.
Also removes the logic to remove quotas of floating IP and fixed IP
when neutron is enabled in dashboards/admin/defaults/tabs.py.
quotas.get_default_quota_data() already handles it properly
and this logic is no longer required.
Closes-Bug: #1212600
Change-Id: I59f069931fad519ca4ec135b92df0040ec8fc230
Add update default quotas form to edit the default quotas.
Move the editable default quotas tab to a new panel called
"Defaults".
Implements blueprint edit-default-quota
Change-Id: I6e3806226cd2f699f16b93c25e294bc67883738f