Derive params support for ODL DPDK feature

Adding ODL DPDK condition to check whether DPDK feature
is enabled or not in ODL to support the derive parameters.
DPDK feature is enabled in ODL if OvsEnableDpdk
parameter is enabled in role parameters.

Change-Id: I64392c1cb96d8d40d22e70ed7992bb267cb27822
Closes-bug: #1714461
(cherry picked from commit 1444c1d16b)
This commit is contained in:
Jaganathan Palanisamy 2017-07-23 13:27:19 -04:00
parent 972ae4061c
commit 35b8c2fbc3
1 changed files with 4 additions and 2 deletions

View File

@ -363,17 +363,19 @@ workflows:
check_features:
on-success: build_feature_dict
publish:
# TODO: Need to update this logic for ODL integration.
# The role supports the DPDK feature if the NeutronDatapathType parameter is present.
dpdk: <% $.role_services.any($.get('parameters', []).contains('NeutronDatapathType')) %>
# The role supports the DPDK feature in ODL if the OvsEnableDpdk parameter value is true in role parameters.
odl_dpdk: <% let(role => $.role_name) -> $.heat_resource_tree.parameters.get(concat($role, 'Parameters'), {}).get('default', {}).get('OvsEnableDpdk', false) %>
# The role supports the HCI feature if it includes both NovaCompute and CephOSD services.
hci: <% $.role_services.any($.get('type', '').endsWith('::NovaCompute')) and $.role_services.any($.get('type', '').endsWith('::CephOSD')) %>
build_feature_dict:
on-success: filter_features
publish:
feature_dict: <% dict(DPDK => $.dpdk, HCI => $.hci) %>
feature_dict: <% dict(DPDK => ($.dpdk or $.odl_dpdk), HCI => $.hci) %>
filter_features:
publish: