From 6a25fb96c1e2c00ec2ec2c2b456d549c092ae495 Mon Sep 17 00:00:00 2001 From: bhagyashris Date: Thu, 14 Dec 2017 13:23:41 +0530 Subject: [PATCH] Initialize newly added glance-image-import config file This patch creates a new config file glance-image-import.conf at /etc/glance path. Also, each config option is initialized with default values. Need these changes to implement specs [1]: [1]: https://blueprints.launchpad.net/glance/+spec/inject-automatic-metadata Related-Change-Id: If14c7dc4f38360006f9cb350fbba54fa2f33be61 Change-Id: I665507db1838a50e344d3be909d7490f1f52040c --- lib/glance | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/glance b/lib/glance index ad286bacb9..95d2450da7 100644 --- a/lib/glance +++ b/lib/glance @@ -56,6 +56,7 @@ GLANCE_CACHE_CONF=$GLANCE_CONF_DIR/glance-cache.conf GLANCE_POLICY_JSON=$GLANCE_CONF_DIR/policy.json GLANCE_SCHEMA_JSON=$GLANCE_CONF_DIR/schema-image.json GLANCE_SWIFT_STORE_CONF=$GLANCE_CONF_DIR/glance-swift-store.conf +GLANCE_IMAGE_IMPORT_CONF=$GLANCE_CONF_DIR/glance-image-import.conf GLANCE_V1_ENABLED=${GLANCE_V1_ENABLED:-False} if is_service_enabled tls-proxy; then @@ -232,6 +233,11 @@ function configure_glance { # Store specific confs iniset $GLANCE_CACHE_CONF glance_store filesystem_store_datadir $GLANCE_IMAGE_DIR/ + # Set default configuration options for the glance-image-import + iniset $GLANCE_IMAGE_IMPORT_CONF image_import_opts image_import_plugins [] + iniset $GLANCE_IMAGE_IMPORT_CONF inject_metadata_properties ignore_user_roles admin + iniset $GLANCE_IMAGE_IMPORT_CONF inject_metadata_properties inject + cp -p $GLANCE_DIR/etc/policy.json $GLANCE_POLICY_JSON cp -p $GLANCE_DIR/etc/schema-image.json $GLANCE_SCHEMA_JSON