Derive Pci passthrough whitelist disable option

This change is to add the option to disable the derive
pci passthrough whitelist automation logic in sriov
deployments if required.

Change-Id: Ib2d5b019e3064acf50c06da071d9eb77fe0d10dd
Closes-Bug: #1841041
This commit is contained in:
Jaganathan Palanisamy 2019-11-20 15:37:09 +05:30
parent fb0dbebf9b
commit 227c516aa2
1 changed files with 33 additions and 14 deletions

View File

@ -79,6 +79,21 @@ parameters:
type: comma_delimited_list
tags:
- role_specific
DerivePciWhitelistEnabled:
default: true
description: Whether to enable or not the pci passthrough whitelist automation.
type: boolean
tags:
- role_specific
conditions:
derive_pci_whitelist_enabled:
or:
- and:
- equals: [{get_param: DerivePciWhitelistEnabled}, true]
- equals: [{get_param: [RoleParameters, DerivePciWhitelistEnabled]}, '']
- equals: [{get_param: [RoleParameters, DerivePciWhitelistEnabled]}, true]
parameter_groups:
- label: deprecated
@ -191,20 +206,24 @@ outputs:
name: virt_sandbox_use_netlink
persistent: yes
state: yes
- name: "creating directory"
file:
state: directory
path: /var/lib/pci_passthrough_whitelist_scripts
owner: root
group: root
mode: 0750
- name: derive pci passthrough whitelist
copy:
content: {get_file: ./derive_pci_passthrough_whitelist.py}
dest: '/var/lib/pci_passthrough_whitelist_scripts/derive_pci_passthrough_whitelist.py'
mode: 0700
- name: run derive_pci_passthrough_whitelist.py
command: /var/lib/pci_passthrough_whitelist_scripts/derive_pci_passthrough_whitelist.py
-
if:
- derive_pci_whitelist_enabled
- - name: "creating directory"
file:
state: directory
path: /var/lib/pci_passthrough_whitelist_scripts
owner: root
group: root
mode: 0750
- name: derive pci passthrough whitelist
copy:
content: {get_file: ./derive_pci_passthrough_whitelist.py}
dest: '/var/lib/pci_passthrough_whitelist_scripts/derive_pci_passthrough_whitelist.py'
mode: 0700
- name: run derive_pci_passthrough_whitelist.py
command: /var/lib/pci_passthrough_whitelist_scripts/derive_pci_passthrough_whitelist.py
- []
metadata_settings:
get_attr: [NeutronBase, role_data, metadata_settings]
upgrade_tasks: []