| {%- set os_family = salt['grains.get']('os_family', '') %} |
| |
| {%- set default_params = { |
| 'cacert_file': salt['grains.filter_by']({ |
| 'Debian': '/etc/ssl/certs/ca-certificates.crt', |
| 'RedHat': '/etc/pki/tls/certs/ca-bundle.crt' |
| }), |
| 'enabled': false } |
| %} |
| |
| {%- if os_family == "Debian" %} |
| {%- set compute_pkgs_ovn = ['ovn-common', 'ovn-host'] %} |
| {%- if pillar.neutron.compute is defined and pillar.neutron.compute.metadata is defined %} |
| {%- do compute_pkgs_ovn.extend(['neutron-common', 'python-networking-ovn', 'haproxy']) %} |
| {%- endif %} |
| {%- set linuxbridge_enabled = pillar.neutron.compute is defined and pillar.neutron.compute.get('backend', {}).get('mechanism', {}).get('lb', {}).get('driver', {}) == "linuxbridge" %} |
| {%- if linuxbridge_enabled %} |
| {%- set pkgs_cmp = ['neutron-linuxbridge-agent'] %} |
| {%- set services_cmp = ['neutron-linuxbridge-agent'] %} |
| {%- else %} |
| {%- set pkgs_cmp = ['neutron-openvswitch-agent', 'python-pycadf'] %} |
| {%- set services_cmp = ['neutron-openvswitch-agent'] %} |
| {%- endif %} |
| {%- endif %} |
| |
| |
| {% set compute = salt['grains.filter_by']({ |
| 'BaseDefaults': default_params, |
| 'Debian': { |
| 'pkgs': pkgs_cmp, |
| 'pkgs_ovn': compute_pkgs_ovn, |
| 'pkgs_bagpipe': ['python-networking-bagpipe'], |
| 'services': services_cmp, |
| 'services_ovn': ['ovn-host'], |
| 'dpdk': false, |
| 'notification': {}, |
| 'audit': { |
| 'enabled': false |
| }, |
| 'logging': { |
| 'app_name': 'neutron', |
| 'log_appender': false, |
| 'log_handlers': { |
| 'watchedfile': { |
| 'enabled': true |
| } |
| }, |
| }, |
| }, |
| 'RedHat': { |
| 'pkgs': ['openstack-neutron-openvswitch', 'python-pycadf'], |
| 'pkgs_ovn': ['openvswitch-ovn'], |
| 'pkgs_bagpipe': ['python-networking-bagpipe'], |
| 'services': ['neutron-openvswitch-agent'], |
| 'services_ovn': ['ovn-host'], |
| 'dpdk': false, |
| 'notification': {}, |
| 'audit': { |
| 'enabled': false |
| }, |
| 'logging': { |
| 'app_name': 'neutron', |
| 'log_appender': false, |
| 'log_handlers': { |
| 'watchedfile': { |
| 'enabled': true |
| } |
| }, |
| }, |
| }, |
| }, merge=pillar.neutron.get('compute', {}), base='BaseDefaults') %} |
| |
| {%- set opendaylight_enabled = pillar.neutron.gateway is defined and pillar.neutron.gateway.opendaylight is defined %} |
| {%- set linuxbridge_enabled = pillar.neutron.gateway is defined and pillar.neutron.gateway.get('backend', {}).get('mechanism', {}).get('lb', {}).get('driver', {}) == "linuxbridge" %} |
| {%- set dhcp_enabled = pillar.neutron.gateway is defined and pillar.neutron.gateway.get('dhcp_agent_enabled', True) %} |
| {%- set pkgs_list = ['neutron-metadata-agent'] %} |
| |
| {%- set services_list = ['neutron-metadata-agent'] %} |
| {%- if dhcp_enabled %} |
| {%- do pkgs_list.extend(['neutron-dhcp-agent']) %} |
| {%- do services_list.extend(['neutron-dhcp-agent']) %} |
| {%- endif %} |
| {%- if linuxbridge_enabled %} |
| {%- do pkgs_list.extend(['neutron-linuxbridge-agent', 'neutron-l3-agent']) %} |
| {%- do services_list.extend(['neutron-linuxbridge-agent', 'neutron-l3-agent']) %} |
| {%- elif not opendaylight_enabled %} |
| {%- do pkgs_list.extend(['neutron-openvswitch-agent', 'neutron-l3-agent']) %} |
| {%- do services_list.extend(['neutron-openvswitch-agent', 'neutron-l3-agent']) %} |
| {%- endif %} |
| |
| {% set gateway = salt['grains.filter_by']({ |
| 'BaseDefaults': default_params, |
| 'Debian': { |
| 'pkgs': pkgs_list, |
| 'pkgs_l2gw_agent': ['neutron-l2gateway-agent'], |
| 'services': services_list, |
| 'dpdk': false, |
| 'notification': {}, |
| 'logging': { |
| 'app_name': 'neutron', |
| 'log_appender': false, |
| 'log_handlers': { |
| 'watchedfile': { |
| 'enabled': true |
| } |
| }, |
| }, |
| }, |
| 'RedHat': { |
| 'pkgs': ['openstack-neutron-openvswitch'], |
| 'pkgs_l2gw_agent': ['openstack-neutron-l2gw-agent'], |
| 'services': services_list, |
| 'dpdk': false, |
| 'notification': {}, |
| 'logging': { |
| 'app_name': 'neutron', |
| 'log_appender': false, |
| 'log_handlers': { |
| 'watchedfile': { |
| 'enabled': true |
| } |
| }, |
| }, |
| }, |
| }, merge=pillar.neutron.get('gateway', {}), base='BaseDefaults') %} |
| |
| {%- set sfc_enabled = pillar.neutron.get('server', {}).get('sfc', {}).get('enabled', False) %} |
| {%- set wsgi_enabled = pillar.neutron.get('server', {}).get('wsgi', {}).get('enabled', False) %} |
| {%- set server_pkgs_list = ['python-neutron-lbaas'] %} |
| {%- do server_pkgs_list.append('uwsgi-plugin-python' if wsgi_enabled else 'neutron-server') %} |
| {%- do server_pkgs_list.append('python-networking-sfc') if sfc_enabled %} |
| {%- set server_services_list = ['neutron-server'] %} |
| {%- do server_services_list.append('neutron-rpc-server') if wsgi_enabled %} |
| |
| {% set server = salt['grains.filter_by']({ |
| 'BaseDefaults': default_params, |
| 'Debian': { |
| 'pkgs': server_pkgs_list, |
| 'pkgs_ovn': ['python-networking-ovn', 'ovn-common', 'ovn-central'], |
| 'pkgs_ml2': ['neutron-plugin-ml2'], |
| 'pkgs_l2gw': ['python-networking-l2gw'], |
| 'pkgs_bgpvpn': ['python-networking-bgpvpn'], |
| 'pkgs_bagpipe': ['python-networking-bagpipe'], |
| 'services': server_services_list, |
| 'services_ovn': ['openvswitch-switch', 'ovn-central'], |
| 'notification': {}, |
| 'dpdk': false, |
| 'cors': {}, |
| 'oslo_policy': { |
| 'policy_file': 'policy.json', |
| 'bgpvpn_policy_file': 'policy.d/bgpvpn.json' |
| }, |
| 'audit': { |
| 'enabled': false |
| }, |
| 'logging': { |
| 'app_name': 'neutron', |
| 'log_appender': false, |
| 'log_handlers': { |
| 'watchedfile': { |
| 'enabled': true |
| } |
| }, |
| }, |
| }, |
| 'RedHat': { |
| 'pkgs_ml2': ['openstack-neutron-ml2', 'python-pycadf'], |
| 'pkgs': ['openstack-neutron'], |
| 'pkgs_ovn': ['openvswitch-ovn', 'python-networking-ovn'], |
| 'pkgs_l2gw': ['python2-networking-l2gw'], |
| 'pkgs_bgpvpn': ['python-networking-bgpvpn'], |
| 'pkgs_bagpipe': ['python-networking-bagpipe'], |
| 'services': ['neutron-server'], |
| 'services_ovn': ['openvswitch', 'ovn-central'], |
| 'notification': {}, |
| 'dpdk': false, |
| 'cors': {}, |
| 'oslo_policy': { |
| 'policy_file': 'policy.json', |
| 'bgpvpn_policy_file': 'policy.d/bgpvpn.json' |
| }, |
| 'audit': { |
| 'enabled': false |
| }, |
| 'logging': { |
| 'app_name': 'neutron', |
| 'log_appender': false, |
| 'log_handlers': { |
| 'watchedfile': { |
| 'enabled': true |
| } |
| }, |
| }, |
| }, |
| }, merge=pillar.neutron.get('server', {}), base='BaseDefaults') %} |
| |
| {% set client = salt['grains.filter_by']({ |
| 'Debian': { |
| 'pkgs': ['python-neutronclient'], |
| 'enabled': false |
| }, |
| 'RedHat': { |
| 'pkgs': ['python-neutronclient'], |
| 'enabled': false |
| }, |
| }, merge=pillar.neutron.get('client', {})) %} |
| |
| {% set fwaas = salt['grains.filter_by']({ |
| 'default': { |
| 'v1': { |
| 'driver': 'iptables', |
| 'l3_extension': 'fwaas', |
| 'service_plugin': 'firewall', |
| }, |
| 'v2': { |
| 'driver': 'iptables_v2', |
| 'l3_extension': 'fwaas_v2', |
| 'service_plugin': 'firewall_v2', |
| }, |
| 'pkgs': ['python-neutron-fwaas'], |
| 'api_version': 'v1', |
| }, |
| }, merge=pillar.neutron.get('fwaas', {}), base='default') %} |
| |
| |
| {% set monitoring = salt['grains.filter_by']({ |
| 'default': { |
| 'error_log_rate': 0.2, |
| 'endpoint_failed_major_threshold': 0.5, |
| 'agents_failed_minor_threshold': 0.3, |
| 'agents_failed_major_threshold': 0.6, |
| }, |
| }, grain='os_family', merge=salt['pillar.get']('neutron:monitoring')) %} |
| |
| {% set upgrade = salt['grains.filter_by']({ |
| 'default': { |
| 'resource_migration': { |
| 'l3': { |
| 'enabled': True |
| } |
| } |
| }, |
| }, grain='os_family', merge=pillar.get('neutron', {}).get('upgrade')) %} |