From 7bcfc857535346a72708b1166759e8480e676a38 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Thu, 19 Oct 2017 01:15:15 +0200 Subject: u/fuel: Bump & rebase for PDF-based network config Change-Id: If970bbc8735d38542a90b2cbdbb2523ae644a29c Signed-off-by: Alexandru Avadanii --- ...lt-formulas-armband-Extend-libvirt_domain.patch | 104 +++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 patches/opnfv-fuel/0007-mcp-salt-formulas-armband-Extend-libvirt_domain.patch (limited to 'patches/opnfv-fuel/0007-mcp-salt-formulas-armband-Extend-libvirt_domain.patch') diff --git a/patches/opnfv-fuel/0007-mcp-salt-formulas-armband-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0007-mcp-salt-formulas-armband-Extend-libvirt_domain.patch new file mode 100644 index 00000000..7c188244 --- /dev/null +++ b/patches/opnfv-fuel/0007-mcp-salt-formulas-armband-Extend-libvirt_domain.patch @@ -0,0 +1,104 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Alexandru Avadanii +Date: Sun, 20 Aug 2017 22:41:26 +0200 +Subject: [PATCH] mcp: salt-formulas: armband: Extend libvirt_domain + +Add new state in armband salt formula that extends salt's virt +libvirt_domain.jinja template with support for: +- hw_firmware_type; +- virt_machine_model; +- cpu_model; + +These will later be leveraged via salt virt formula with AArch64 +specific values. + +Signed-off-by: Alexandru Avadanii +--- + mcp/config/states/virtual_control_plane | 1 + + .../armband/files/libvirt_domain.jinja.diff | 46 ++++++++++++++++++++++ + .../armband/libvirt_domain_template.sls | 4 ++ + 3 files changed, 51 insertions(+) + create mode 100644 mcp/salt-formulas/armband/files/libvirt_domain.jinja.diff + create mode 100644 mcp/salt-formulas/armband/libvirt_domain_template.sls + +diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane +index 602eab2..fe84222 100755 +--- a/mcp/config/states/virtual_control_plane ++++ b/mcp/config/states/virtual_control_plane +@@ -23,6 +23,7 @@ wait_for 90 "! salt -C 'kvm* or cmp*' test.ping | " \ + salt -C '* and not cfg01* and not mas01*' state.apply linux,ntp + + salt -C 'kvm*' state.sls armband || true ++salt -C 'kvm*' state.sls armband.libvirt_domain_template || true + wait_for 5 "salt -C 'kvm*' state.sls libvirt" + + salt -C '* and not cfg01* and not mas01*' state.apply salt +diff --git a/mcp/salt-formulas/armband/files/libvirt_domain.jinja.diff b/mcp/salt-formulas/armband/files/libvirt_domain.jinja.diff +new file mode 100644 +index 0000000..4e7fad5 +--- /dev/null ++++ b/mcp/salt-formulas/armband/files/libvirt_domain.jinja.diff +@@ -0,0 +1,46 @@ ++From: Alexandru Avadanii ++Date: Sun Aug 20 18:18:53 2017 +0200 ++Subject: [PATCH] libvirt_domain.jinja: Add AArch64 support ++ ++Salt virt state relies on a Jinja template to create a libvirt ++XML definition for each new VM. ++This template needs to be extended with a few specific options ++for AArch64: ++- UEFI loader support (pflash); ++- custom machine model (e.g. 'virt-2.9'), since AArch64 defaults to ++ 'integratorcp'; ++- custom cpu model; ++ ++Allow all these to be parametrized from the salt virt formula, ++which we will also adapt to allow the params to be passed via our ++reclass model. ++ ++Signed-off-by: Alexandru Avadanii ++--- ++ ++diff --git a/usr/lib/python2.7/dist-packages/salt/templates/virt/libvirt_domain.jinja b/usr/lib/python2.7/dist-packages/salt/templates/virt/libvirt_domain.jinja ++--- a/usr/lib/python2.7/dist-packages/salt/templates/virt/libvirt_domain.jinja +++++ b/usr/lib/python2.7/dist-packages/salt/templates/virt/libvirt_domain.jinja ++@@ -3,11 +3,22 @@ ++ {{ cpu }} ++ {{ mem }} ++ +++ {% if custom_virt_machine %} +++ hvm +++ {% else %} ++ hvm +++ {% endif %} +++ {% if os_loader_type == 'pflash' %} +++ {{ os_loader }} +++ {{ os_loader_nvram }} +++ {% endif %} ++ {% for dev in boot_dev %} ++ ++ {% endfor %} ++ +++ {% if cpu_mode == 'custom' %} +++ +++ {% endif %} ++ ++ {% for diskname, disk in disks.items() %} ++ +diff --git a/mcp/salt-formulas/armband/libvirt_domain_template.sls b/mcp/salt-formulas/armband/libvirt_domain_template.sls +new file mode 100644 +index 0000000..7cc8e22 +--- /dev/null ++++ b/mcp/salt-formulas/armband/libvirt_domain_template.sls +@@ -0,0 +1,4 @@ ++/usr/lib/python2.7/dist-packages/salt/templates/virt/libvirt_domain.jinja: ++ file.patch: ++ - source: salt://armband/files/libvirt_domain.jinja.diff ++ - hash: "9d02cd8aa04497c2d75c72840a5c6c41" -- cgit 1.2.3-korg