Allow to configure erase_device options
This patch allows to configure erase_devices_metadata_priority and
erase_devices_priority cleaning options
Change-Id: I2b3c7f549aec4463bb9152df21e0949e81b9b491
diff --git a/ironic/files/newton/ironic.conf b/ironic/files/newton/ironic.conf
index bd0281e..2ae1aee 100644
--- a/ironic/files/newton/ironic.conf
+++ b/ironic/files/newton/ironic.conf
@@ -1055,14 +1055,22 @@
# Agent ramdisk. If unset, will use the priority set in the
# ramdisk (defaults to 10 for the GenericHardwareManager). If
# set to 0, will not run during cleaning. (integer value)
+{%- if conductor.erase_devices_priority is defined %}
+erase_devices_priority = {{ conductor.erase_devices_priority }}
+{%- else %}
#erase_devices_priority = <None>
+{%- endif %}
# Priority to run in-band clean step that erases metadata from
# devices, via the Ironic Python Agent ramdisk. If unset, will
# use the priority set in the ramdisk (defaults to 99 for the
# GenericHardwareManager). If set to 0, will not run during
# cleaning. (integer value)
+{%- if conductor.erase_devices_metadata_priority is defined %}
+erase_devices_metadata_priority = {{ conductor.erase_devices_metadata_priority }}
+{%- else %}
#erase_devices_metadata_priority = <None>
+{%- endif %}
# During shred, overwrite all block devices N times with
# random data. This is only used if a device could not be ATA
diff --git a/ironic/files/ocata/ironic.conf b/ironic/files/ocata/ironic.conf
index ef0db7a..247a4f2 100644
--- a/ironic/files/ocata/ironic.conf
+++ b/ironic/files/ocata/ironic.conf
@@ -1353,14 +1353,22 @@
# Agent ramdisk. If unset, will use the priority set in the
# ramdisk (defaults to 10 for the GenericHardwareManager). If
# set to 0, will not run during cleaning. (integer value)
+{%- if conductor.erase_devices_priority is defined %}
+erase_devices_priority = {{ conductor.erase_devices_priority }}
+{%- else %}
#erase_devices_priority = <None>
+{%- endif %}
# Priority to run in-band clean step that erases metadata from
# devices, via the Ironic Python Agent ramdisk. If unset, will
# use the priority set in the ramdisk (defaults to 99 for the
# GenericHardwareManager). If set to 0, will not run during
# cleaning. (integer value)
+{%- if conductor.erase_devices_metadata_priority is defined %}
+erase_devices_metadata_priority = {{ conductor.erase_devices_metadata_priority }}
+{%- else %}
#erase_devices_metadata_priority = <None>
+{%- endif %}
# During shred, overwrite all block devices N times with
# random data. This is only used if a device could not be ATA