From e20f12cc3a61a8b492baa57adde128b3936b25cc Mon Sep 17 00:00:00 2001 From: Marc Gariepy Date: Wed, 31 May 2017 14:14:47 -0400 Subject: [PATCH] Add IMAGES_ALLOW_LOCATION configuration option. IMAGES_ALLOW_LOCATION is needed to be able to specify an external location during image creation. Change-Id: I102a14577415549ac12e6cf7d62bafd48d95c1bf --- defaults/main.yml | 1 + .../notes/image-allow-location-58212b8e506639f2.yaml | 5 +++++ templates/horizon_local_settings.py.j2 | 5 +++++ 3 files changed, 11 insertions(+) create mode 100644 releasenotes/notes/image-allow-location-58212b8e506639f2.yaml diff --git a/defaults/main.yml b/defaults/main.yml index da40ff60..b703e225 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -95,6 +95,7 @@ horizon_dropdown_max_items: 30 horizon_instance_log_length: 35 horizon_overview_days_range: 1 horizon_images_upload_mode: direct +horizon_images_allow_location: False horizon_time_zone: UTC horizon_enforce_password_check: False horizon_disable_password_reveal: False diff --git a/releasenotes/notes/image-allow-location-58212b8e506639f2.yaml b/releasenotes/notes/image-allow-location-58212b8e506639f2.yaml new file mode 100644 index 00000000..b5b323a1 --- /dev/null +++ b/releasenotes/notes/image-allow-location-58212b8e506639f2.yaml @@ -0,0 +1,5 @@ +--- +features: + - The ``horizon_images_allow_location`` variable is added to support the + ``IMAGES_ALLOW_LOCATION`` setting in the horizon_local_settings.py file to + allow to specify and external location during the image creation. diff --git a/templates/horizon_local_settings.py.j2 b/templates/horizon_local_settings.py.j2 index 059adb72..12e0be06 100644 --- a/templates/horizon_local_settings.py.j2 +++ b/templates/horizon_local_settings.py.j2 @@ -356,6 +356,11 @@ IMAGE_RESERVED_CUSTOM_PROPERTIES = [] # image form. See documentation for deployment considerations. HORIZON_IMAGES_UPLOAD_MODE = '{{ horizon_images_upload_mode }}' +# Allow a location to be set when creating or updating Glance images. +# If using Glance V2, this value should be False unless the Glance +# configuration and policies allow setting locations. +IMAGES_ALLOW_LOCATION = '{{ horizon_images_allow_location }}' + # OPENSTACK_ENDPOINT_TYPE specifies the endpoint type to use for the endpoints # in the Keystone service catalog. Use this setting when Horizon is running # external to the OpenStack environment. The default is 'publicURL'.