Unhardcoded inject_* params in nova-compute.conf

inject_partition affect inject_password. inject_password has effect when inject_partition in not equal '-2'.

example for pillar define:
IN
classes:
- cluster.virtual-mcp-pike-ovs.openstack.compute
parameters:
  nova:
    compute:
      inject_partition: '-1'
      inject_password: True

Related-Prod: PROD-19156

Change-Id: I0eca9418adc28b6a0c42dd77e6ec1fa2bc86a187
diff --git a/nova/files/mitaka/nova-compute.conf.Debian b/nova/files/mitaka/nova-compute.conf.Debian
index a3a8f14..cc052e2 100644
--- a/nova/files/mitaka/nova-compute.conf.Debian
+++ b/nova/files/mitaka/nova-compute.conf.Debian
@@ -136,8 +136,14 @@
 {%-  else %}
 virt_type = kvm
 {%- endif%}
-inject_partition=-2
+
+inject_partition={{ compute.libvirt.inject_partition }}
+{%- if compute.libvirt.get('inject_partition', '-2')|string == '-2' %}
 inject_password=False
+{%- else %}
+inject_password={{ compute.libvirt.inject_password }}
+{%- endif %}
+
 disk_cachemodes="{{ compute.get('disk_cachemodes', 'network=writeback,block=none') }}"
 libvirt_inject_password=True
 block_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_NON_SHARED_INC
diff --git a/nova/files/newton/nova-compute.conf.Debian b/nova/files/newton/nova-compute.conf.Debian
index 999da48..d1e34b1 100644
--- a/nova/files/newton/nova-compute.conf.Debian
+++ b/nova/files/newton/nova-compute.conf.Debian
@@ -189,8 +189,14 @@
 {%-  else %}
 virt_type = kvm
 {%- endif%}
-inject_partition=-2
+
+inject_partition={{ compute.libvirt.inject_partition }}
+{%- if compute.libvirt.get('inject_partition', '-2')|string == '-2' %}
 inject_password=False
+{%- else %}
+inject_password={{ compute.libvirt.inject_password }}
+{%- endif %}
+
 disk_cachemodes="{{ compute.get('disk_cachemodes', 'network=writeback,block=none') }}"
 libvirt_inject_password=True
 block_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_NON_SHARED_INC
diff --git a/nova/files/ocata/nova-compute.conf.Debian b/nova/files/ocata/nova-compute.conf.Debian
index 0e922d5..bb1af40 100644
--- a/nova/files/ocata/nova-compute.conf.Debian
+++ b/nova/files/ocata/nova-compute.conf.Debian
@@ -5945,8 +5945,14 @@
 {%-  else %}
 virt_type = kvm
 {%- endif%}
-inject_partition=-2
-inject_password=True
+
+inject_partition={{ compute.libvirt.inject_partition }}
+{%- if compute.libvirt.get('inject_partition', '-2')|string == '-2' %}
+inject_password=False
+{%- else %}
+inject_password={{ compute.libvirt.inject_password }}
+{%- endif %}
+
 disk_cachemodes="{{ compute.get('disk_cachemodes', 'network=writeback,block=none') }}"
 block_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_NON_SHARED_INC
 live_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_PERSIST_DEST
diff --git a/nova/files/pike/nova-compute.conf.Debian b/nova/files/pike/nova-compute.conf.Debian
index 402ae02..0e2e958 100644
--- a/nova/files/pike/nova-compute.conf.Debian
+++ b/nova/files/pike/nova-compute.conf.Debian
@@ -5945,8 +5945,14 @@
 {%-  else %}
 virt_type = kvm
 {%- endif%}
-inject_partition=-2
-inject_password=True
+
+inject_partition={{ compute.libvirt.inject_partition }}
+{%- if compute.libvirt.get('inject_partition', '-2')|string == '-2' %}
+inject_password=False
+{%- else %}
+inject_password={{ compute.libvirt.inject_password }}
+{%- endif %}
+
 disk_cachemodes="{{ compute.get('disk_cachemodes', 'network=writeback,block=none') }}"
 block_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_NON_SHARED_INC
 live_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_PERSIST_DEST
diff --git a/nova/map.jinja b/nova/map.jinja
index ee4b679..e9590a3 100644
--- a/nova/map.jinja
+++ b/nova/map.jinja
@@ -124,7 +124,9 @@
   libvirt_service: libvirt-bin
   bind: compute_bind_defaults
   debug: false
-  libvirt: []
+  libvirt:
+    inject_partition: '-2'
+    inject_password: False
   instances_path: "$state_path/instances"
   notification: false
   availability_zone:
@@ -155,7 +157,9 @@
   libvirt_service: libvirtd
   bind: compute_bind_defaults
   debug: false
-  libvirt: []
+  libvirt:
+    inject_partition: '-2'
+    inject_password: False
   notification: false
   availability_zone:
   identity: