Role Specific parameters for neutron-sriov-agent service

Merge the role specific parmaeter with the default parameter with the
higher precendece given to role specific parameters. Use the merged
settings for the hiera config settings.

Change-Id: I7d12ea7a26ba5c22d7961c59fb63663fc2a6b4cd
Signed-off-by: Sanjay Upadhyay <supadhya@redhat.com>
This commit is contained in:
Sanjay Upadhyay 2017-05-31 15:36:08 +05:30
parent 61fdeb67a0
commit e9ad7ba48f
1 changed files with 19 additions and 3 deletions

View File

@ -65,6 +65,24 @@ resources:
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
# Merging role-specific parameters (RoleParameters) with the default parameters.
# RoleParameters will have the precedence over the default parameters.
RoleParametersValue:
type: OS::Heat::Value
properties:
type: json
value:
map_replace:
- map_replace:
- neutron::agents::ml2::sriov::physical_device_mappings: NeutronPhysicalDevMappings
neutron::agents::ml2::sriov::exclude_devices: NeutronExcludeDevices
tripleo::host::sriov::number_of_vfs: NeutronSriovNumVFs
- values: {get_param: [RoleParameters]}
- values:
NeutronPhysicalDevMappings: {get_param: NeutronPhysicalDevMappings}
NeutronExcludeDevices: {get_param: NeutronExcludeDevices}
NeutronSriovNumVFs: {get_param: NeutronSriovNumVFs}
outputs:
role_data:
description: Role data for the Neutron SR-IOV nic agent service.
@ -73,8 +91,6 @@ outputs:
config_settings:
map_merge:
- get_attr: [NeutronBase, role_data, config_settings]
- neutron::agents::ml2::sriov::physical_device_mappings: {get_param: NeutronPhysicalDevMappings}
neutron::agents::ml2::sriov::exclude_devices: {get_param: NeutronExcludeDevices}
tripleo::host::sriov::number_of_vfs: {get_param: NeutronSriovNumVFs}
- get_attr: [RoleParametersValue, value]
step_config: |
include ::tripleo::profile::base::neutron::sriov