Disable Edit Flavour by default
Closes-bug: 1709056 Change-Id: Ifa4e9cdfbbac1a1d4bf28679b24a17b13f637ddd
This commit is contained in:
@@ -1872,6 +1872,29 @@ This setting specifies the type of in-browser console used to access the VMs.
|
|||||||
Valid values are ``"AUTO"``, ``"VNC"``, ``"SPICE"``, ``"RDP"``,
|
Valid values are ``"AUTO"``, ``"VNC"``, ``"SPICE"``, ``"RDP"``,
|
||||||
``"SERIAL"``, and ``None``.
|
``"SERIAL"``, and ``None``.
|
||||||
|
|
||||||
|
ENABLE_FLAVOR_EDIT
|
||||||
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. versionadded:: 12.0.0(Pike)
|
||||||
|
|
||||||
|
.. deprecated:: 12.0.0(Pike)
|
||||||
|
|
||||||
|
Default: ``False``
|
||||||
|
|
||||||
|
This setting enables the ability to edit flavors.
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
Historically, Horizon has provided the ability to edit Flavors by deleting
|
||||||
|
and creating a new one with the same information. This is not supported in
|
||||||
|
the Nova API and causes unexpected issues and breakages. To avoid breaking
|
||||||
|
standard deprecation procedure, this code is still in Horizon, but disabled
|
||||||
|
by default. It will be removed during the 14.0.0 ('R') release cycle.
|
||||||
|
|
||||||
|
See `this email thread
|
||||||
|
<http://lists.openstack.org/pipermail/openstack-dev/2017-August/120540.html>`_
|
||||||
|
for further information.
|
||||||
|
|
||||||
INSTANCE_LOG_LENGTH
|
INSTANCE_LOG_LENGTH
|
||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
from django.core.urlresolvers import reverse
|
from django.core.urlresolvers import reverse
|
||||||
from django.template import defaultfilters as filters
|
from django.template import defaultfilters as filters
|
||||||
from django.utils.http import urlencode
|
from django.utils.http import urlencode
|
||||||
@@ -64,6 +65,9 @@ class UpdateFlavor(tables.LinkAction):
|
|||||||
classes = ("ajax-modal",)
|
classes = ("ajax-modal",)
|
||||||
icon = "pencil"
|
icon = "pencil"
|
||||||
|
|
||||||
|
def allowed(self, request, flavor):
|
||||||
|
return getattr(settings, 'ENABLE_FLAVOR_EDIT', False)
|
||||||
|
|
||||||
def get_link_url(self, flavor):
|
def get_link_url(self, flavor):
|
||||||
step = 'update_info'
|
step = 'update_info'
|
||||||
base_url = reverse(self.url, args=[flavor.id])
|
base_url = reverse(self.url, args=[flavor.id])
|
||||||
|
6
releasenotes/notes/bug-1709056-33d18a562840e334.yaml
Normal file
6
releasenotes/notes/bug-1709056-33d18a562840e334.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
upgrade:
|
||||||
|
- The ability to edit flavors is disabled by default. See
|
||||||
|
``ENABLE_FLAVOR_EDIT`` in the settings documentation for more information.
|
||||||
|
deprecations:
|
||||||
|
- Editing flavors is deprecated and may be removed from the 'R' cycle
|
||||||
|
onwards.
|
Reference in New Issue
Block a user