Skip to content

Commit 723335b

Browse files
committed
Updated blazar enforcement filter template
1 parent 34bce0e commit 723335b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

site-config/node_custom_config/blazar.conf

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@ os_region_name = {{ openstack_region_name }}
55
{# note: important to preserve newline after this #}
66
exempt_projects = {% for project_id in blazar_usage_project_exemptions %}{{ project_id }}{% if not loop.last %},{% endif %}{% endfor %}
77

8+
{% set filters = [] %}
9+
{% if enable_blazar_max_lease_enforcement | bool %}
10+
{% set _ = filters.append("MaxLeaseDurationFilter") %}
11+
{% endif %}
812
{% if enable_blazar_allocation_enforcement | bool %}
9-
enabled_filters = MaxLeaseDurationFilter, ExternalServiceFilter
13+
{% set _ = filters.append("ExternalServiceFilter") %}
14+
{% endif %}
15+
enabled_filters = {{ filters | join(", ") }}
16+
1017
{% if blazar_external_service_endpoint is defined %}
1118
external_service_base_endpoint = {{ blazar_external_service_endpoint }}
1219
{% endif %}
@@ -19,9 +26,6 @@ external_service_check_update_endpoint = {{ blazar_external_service_check_update
1926
{% if blazar_external_service_on_end_endpoint is defined %}
2027
external_service_on_end_endpoint = {{ blazar_external_service_on_end_endpoint }}
2128
{% endif %}
22-
{% else %}
23-
enabled_filters = MaxLeaseDurationFilter
24-
{% endif %}
2529
max_lease_duration = {{ blazar_default_max_lease_duration }}
2630
reservation_extension_window = {{ blazar_default_reservation_extension_window }}
2731

0 commit comments

Comments
 (0)