Commit b8de5b6a authored by Rafael Monnerat's avatar Rafael Monnerat

kvm: Create a ~/.slapos-disk-permission for disk plugin

  Allow the KVM software release request a disk via plugin,
  if the plugin is enabled the chown will be set to give the disk to the partition.
parent eac1ae4f
......@@ -9,6 +9,7 @@
{% set instance_type = slapparameter_dict.get('type', 'standalone') -%}
{% set nat_rule_list = slapparameter_dict.get('nat-rules', '22 80 443') -%}
{% set frontend_software_type = 'default' -%}
{% set disk_device_path = slapparameter_dict.get('disk-device-path', None) -%}
{% set extends_list = [] -%}
{% set part_list = [] -%}
......@@ -633,6 +634,19 @@ keyboard-layout-language = fr
{% endif -%}
{% if disk_device_path %}
{% do part_list.append('disk-device-permission') -%}
[disk-device-permission]
recipe = slapos.recipe.template:jinja2
template = inline:
{%- raw %}
[{"disk": "{{disk_device_path}}"}]
{% endraw -%}
rendered = ${buildout:directory}/.slapos-disk-permission
context =
raw disk_device_path {{disk_device_path}}
{% endif -%}
[buildout]
parts =
certificate-authority
......
......@@ -99,7 +99,7 @@ recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
mode = 644
md5sum = dbf43756c605144f0a3cd829b588d931
md5sum = 0fd548b8cac9278496d9d83dde26d09c
download-only = true
on-update = true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment