Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge "Derive Pci passthrough whitelist disable option" into stable/r…
Browse files Browse the repository at this point in the history
…ocky
  • Loading branch information
Zuul authored and openstack-gerrit committed Dec 17, 2019
2 parents 195d9bd + 8a7dcb5 commit 7917f98
Showing 1 changed file with 32 additions and 14 deletions.
46 changes: 32 additions & 14 deletions docker/services/neutron-sriov-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ parameters:
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
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:

Expand Down Expand Up @@ -126,20 +141,23 @@ outputs:
host_prep_tasks:
list_concat:
- {get_attr: [NeutronLogging, host_prep_tasks]}
- - 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: [NeutronSriovAgentBase, role_data, metadata_settings]
upgrade_tasks:
Expand Down

0 comments on commit 7917f98

Please sign in to comment.