Merge "Derive Pci passthrough whitelist disable option" into stable/rocky

This commit is contained in:
Zuul 2019-12-17 12:18:42 +00:00 committed by Gerrit Code Review
commit 7917f98778
1 changed files with 32 additions and 14 deletions

View File

@ -40,6 +40,21 @@ parameters:
description: Mapping of service endpoint -> protocol. Typically set description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry. via parameter_defaults in the resource registry.
type: json type: json
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]
resources: resources:
@ -126,20 +141,23 @@ outputs:
host_prep_tasks: host_prep_tasks:
list_concat: list_concat:
- {get_attr: [NeutronLogging, host_prep_tasks]} - {get_attr: [NeutronLogging, host_prep_tasks]}
- - name: "creating directory" - - if:
file: - derive_pci_whitelist_enabled
state: directory - - name: "creating directory"
path: /var/lib/pci_passthrough_whitelist_scripts file:
owner: root state: directory
group: root path: /var/lib/pci_passthrough_whitelist_scripts
mode: 0750 owner: root
- name: derive pci passthrough whitelist group: root
copy: mode: 0750
content: {get_file: ./derive_pci_passthrough_whitelist.py} - name: derive pci passthrough whitelist
dest: '/var/lib/pci_passthrough_whitelist_scripts/derive_pci_passthrough_whitelist.py' copy:
mode: 0700 content: {get_file: ./derive_pci_passthrough_whitelist.py}
- name: run derive_pci_passthrough_whitelist.py dest: '/var/lib/pci_passthrough_whitelist_scripts/derive_pci_passthrough_whitelist.py'
command: /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: metadata_settings:
get_attr: [NeutronSriovAgentBase, role_data, metadata_settings] get_attr: [NeutronSriovAgentBase, role_data, metadata_settings]
upgrade_tasks: upgrade_tasks: