From 1a802f3ddbaade585de1085825bf0bb7bf1763e1 Mon Sep 17 00:00:00 2001 From: Marc Methot Date: Tue, 26 Feb 2019 13:56:47 -0500 Subject: [PATCH] Adding configurability to the amphora image format By adding parameter `OctaviaAmphoraImageFormat`, it adds flexibility to select amphora image format without forcing to use the use of `NovaEnableRbdBackend` parameter. Change-Id: I61ae421058fa9a944b2bbbbeeccef6b738c22a7e Closes-Bug: #1817777 --- .../octavia/octavia-deployment-config.j2.yaml | 16 +++++++++++++++- ...ia-amphora-image-format-f2f3f494e6fbe82c.yaml | 6 ++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/octavia-amphora-image-format-f2f3f494e6fbe82c.yaml diff --git a/deployment/octavia/octavia-deployment-config.j2.yaml b/deployment/octavia/octavia-deployment-config.j2.yaml index 49c1954492..9d868894a4 100644 --- a/deployment/octavia/octavia-deployment-config.j2.yaml +++ b/deployment/octavia/octavia-deployment-config.j2.yaml @@ -55,6 +55,12 @@ parameters: on Red Hat Enterprise Linux). type: string default: '' + OctaviaAmphoraImageFormat: + default: 'qcow2' + description: Image format ('qcow2' or 'raw') of the amphora image. + type: string + constraints: + - allowed_values: ['qcow2', 'raw'] OctaviaAmphoraImageTag: default: 'amphora-image' description: Glance image tag for identifying the amphora image. @@ -163,6 +169,14 @@ parameters: constraints: - allowed_values: ['docker', 'podman'] +conditions: + octavia_raw_image_check: + or: + - equals: + - get_param: OctaviaAmphoraImageFormat + - raw + - get_param: NovaEnableRbdBackend + resources: {% if not octavia_standalone %} default_key_pair: @@ -186,7 +200,7 @@ resources: amp_ssh_key_data: { get_attr: [default_key_pair, public_key] } {% endif %} {% raw %} - amp_to_raw: { get_param: NovaEnableRbdBackend } + amp_to_raw: {if: [octavia_raw_image_check:, true, false]} auth_username: { get_param: OctaviaUserName } auth_password: { get_param: OctaviaPassword } auth_project_name: { get_param: OctaviaProjectName } diff --git a/releasenotes/notes/octavia-amphora-image-format-f2f3f494e6fbe82c.yaml b/releasenotes/notes/octavia-amphora-image-format-f2f3f494e6fbe82c.yaml new file mode 100644 index 0000000000..5edc8797f5 --- /dev/null +++ b/releasenotes/notes/octavia-amphora-image-format-f2f3f494e6fbe82c.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + By adding parameter `OctaviaAmphoraImageFormat`, it adds flexibility to + select amphora image format without forcing to use of the + `NovaEnableRbdBackend` parameter.