diff --git a/docs/packstack.rst b/docs/packstack.rst index fdc56d218..05739d711 100755 --- a/docs/packstack.rst +++ b/docs/packstack.rst @@ -995,6 +995,9 @@ Provisioning demo config **CONFIG_PROVISION_IMAGE_FORMAT** Format for the demo image (default "qcow2"). +**CONFIG_PROVISION_IMAGE_PROPERTIES** + Properties of the demo image (none by default). + **CONFIG_PROVISION_IMAGE_SSH_USER** User to use when connecting to instances booted from the demo image. diff --git a/packstack/plugins/provision_700.py b/packstack/plugins/provision_700.py index c8a0dfcc2..810b8bf8a 100644 --- a/packstack/plugins/provision_700.py +++ b/packstack/plugins/provision_700.py @@ -135,6 +135,19 @@ def initConfig(controller): "NEED_CONFIRM": False, "CONDITION": False}, + {"CMD_OPTION": "provision-image-properties", + "PROMPT": ("Enter the comma-separated list of key=value pairs " + "to set as the properties of the demo image"), + "OPTION_LIST": False, + "VALIDATORS": [], + "DEFAULT_VALUE": "", + "MASK_INPUT": False, + "LOOSE_VALIDATION": True, + "CONF_NAME": "CONFIG_PROVISION_IMAGE_PROPERTIES", + "USE_DEFAULT": False, + "NEED_CONFIRM": False, + "CONDITION": False}, + {"CMD_OPTION": "provision-image-ssh-user", "PROMPT": ("Enter the name of a user to use when connecting " "to the demo image via ssh"), diff --git a/packstack/puppet/modules/packstack/manifests/provision/glance.pp b/packstack/puppet/modules/packstack/manifests/provision/glance.pp index 0e0ee488e..b620cd78e 100644 --- a/packstack/puppet/modules/packstack/manifests/provision/glance.pp +++ b/packstack/puppet/modules/packstack/manifests/provision/glance.pp @@ -3,6 +3,7 @@ class packstack::provision::glance () $image_name = hiera('CONFIG_PROVISION_IMAGE_NAME') $image_source = hiera('CONFIG_PROVISION_IMAGE_URL') $image_format = hiera('CONFIG_PROVISION_IMAGE_FORMAT') + $image_properties = hiera('CONFIG_PROVISION_IMAGE_PROPERTIES') $uec_image_name = hiera('CONFIG_PROVISION_UEC_IMAGE_NAME') $uec_image_source_kernel = hiera('CONFIG_PROVISION_UEC_IMAGE_KERNEL_URL') $uec_image_source_ramdisk = hiera('CONFIG_PROVISION_UEC_IMAGE_RAMDISK_URL') @@ -14,6 +15,7 @@ class packstack::provision::glance () container_format => 'bare', disk_format => $image_format, source => $image_source, + properties => $image_properties } if str2bool(hiera('CONFIG_PROVISION_TEMPEST')) { diff --git a/releasenotes/notes/demo-image-properties-9994f2981a8c00a1.yaml b/releasenotes/notes/demo-image-properties-9994f2981a8c00a1.yaml new file mode 100644 index 000000000..68a9768fc --- /dev/null +++ b/releasenotes/notes/demo-image-properties-9994f2981a8c00a1.yaml @@ -0,0 +1,4 @@ +--- +features: + - New config parameter CONFIG_PROVISION_IMAGE_PROPERTIES + introduced, useful when provided image needs custom parameters