diff options
Diffstat (limited to 'patches/opnfv-fuel/0004-mcp-salt-formulas-Add-enable-armband-formula.patch')
-rw-r--r-- | patches/opnfv-fuel/0004-mcp-salt-formulas-Add-enable-armband-formula.patch | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/patches/opnfv-fuel/0004-mcp-salt-formulas-Add-enable-armband-formula.patch b/patches/opnfv-fuel/0004-mcp-salt-formulas-Add-enable-armband-formula.patch index 0b77805b..a59df5ce 100644 --- a/patches/opnfv-fuel/0004-mcp-salt-formulas-Add-enable-armband-formula.patch +++ b/patches/opnfv-fuel/0004-mcp-salt-formulas-Add-enable-armband-formula.patch @@ -19,14 +19,15 @@ Signed-off-by: Guillermo Herrero <Guillermo.Herrero@enea.com> Signed-off-by: Charalampos Kominos <Charalampos.Kominos@enea.com> Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> --- + mcp/config/states/maas | 1 + mcp/config/states/openstack | 2 + .../armband/files/nova-libvirt-driver.diff | 48 ++++++++++++++++++++++ mcp/salt-formulas/armband/init.sls | 6 +++ mcp/salt-formulas/armband/libvirt_driver.sls | 5 +++ - mcp/salt-formulas/armband/nova.sls | 24 +++++++++++ + mcp/salt-formulas/armband/nova.sls | 34 +++++++++++++++ mcp/salt-formulas/armband/qemu.sls | 7 ++++ mcp/salt-formulas/armband/vgabios.sls | 6 +++ - 7 files changed, 98 insertions(+) + 8 files changed, 109 insertions(+) create mode 100644 mcp/salt-formulas/armband/files/nova-libvirt-driver.diff create mode 100644 mcp/salt-formulas/armband/init.sls create mode 100644 mcp/salt-formulas/armband/libvirt_driver.sls @@ -34,6 +35,18 @@ Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> create mode 100644 mcp/salt-formulas/armband/qemu.sls create mode 100644 mcp/salt-formulas/armband/vgabios.sls +diff --git a/mcp/config/states/maas b/mcp/config/states/maas +index 8b59910..3b722ea 100755 +--- a/mcp/config/states/maas ++++ b/mcp/config/states/maas +@@ -42,6 +42,7 @@ salt -C 'mas01*' pillar.item\ + salt -C '* and not cfg01* and not mas01*' saltutil.sync_all + salt -C '* and not cfg01* and not mas01*' state.apply linux,ntp + ++salt -C 'kvm*' state.sls armband + salt -C 'kvm*' state.sls libvirt + + salt -C '* and not cfg01* and not mas01*' system.reboot diff --git a/mcp/config/states/openstack b/mcp/config/states/openstack index 57ca585..23aaf72 100755 --- a/mcp/config/states/openstack @@ -123,30 +136,40 @@ index 0000000..c309035 + diff --git a/mcp/salt-formulas/armband/nova.sls b/mcp/salt-formulas/armband/nova.sls new file mode 100644 -index 0000000..994d505 +index 0000000..ade8c7a --- /dev/null +++ b/mcp/salt-formulas/armband/nova.sls -@@ -0,0 +1,24 @@ +@@ -0,0 +1,34 @@ ++{% if grains['virtual'] == 'kvm' %} +nova_virt_type: + file.replace: + - name: "/etc/nova/nova.conf" + - pattern: ^virt_type =.*$ + - repl: "virt_type = qemu" ++{% endif %} ++ +nova_pointer_model: + file.replace: + - name: "/etc/nova/nova.conf" + - pattern: ^#pointer_model=.*$ + - repl: "pointer_model=ps2mouse" ++ +nova_cpu_mode: + file.replace: + - name: "/etc/nova/nova.conf" + - pattern: "^cpu_mode = host-passthrough" + - repl: "cpu_mode=custom" ++ +nova_cpu_model: + file.replace: + - name: "/etc/nova/nova.conf" + - pattern: ^#cpu_model=.*$ ++ {% if grains['virtual'] == 'kvm' %} + - repl: "cpu_model=cortex-a57" ++ {% else %} ++ - repl: "cpu_model=host" ++ {% endif %} ++ +restart_nova-compute: + cmd: + - run |