Dennis Dmitriev | f4826bc | 2017-09-28 19:03:54 +0300 | [diff] [blame] | 1 | {#- Provides: #} |
| 2 | {#- br_ctl (linux bridge) + control address #} |
| 3 | {#- vhost0 #} |
| 4 | {#- Requirements: #} |
| 5 | {#- _param:single_address #} |
| 6 | {#- _param:control_vlan #} |
| 7 | {#- _param:control_network_netmask #} |
| 8 | {#- _param:tenant_vlan #} |
| 9 | {#- _param:tenant_address #} |
| 10 | {#- _param:tenant_netmask #} |
| 11 | {#- _param:tenant_network_gateway #} |
| 12 | {#- _param:_param:dns_server01 #} |
| 13 | {#- _param:_param:dns_server02 #} |
| 14 | |
| 15 | # {{ interfaces_role }} |
| 16 | {%- for interface_name, interface in interfaces.items() %} |
| 17 | {{ interface_name }}: |
| 18 | mtu: 9000 |
| 19 | enabled: true |
| 20 | name: {{ interface_name }} |
| 21 | proto: manual |
| 22 | type: eth |
| 23 | ipflush_onchange: true |
| 24 | {%- endfor %} |
| 25 | bond0: |
| 26 | mtu: 9000 |
| 27 | enabled: true |
| 28 | mode: active-backup |
| 29 | proto: manual |
| 30 | slaves: {{ ' '.join(interfaces.keys()) }} |
| 31 | type: bond |
| 32 | use_interfaces: |
| 33 | {%- for interface_name in interfaces.keys() %} |
| 34 | - {{ interface_name }} |
| 35 | {%- endfor %} |
| 36 | require_interfaces: |
| 37 | {%- for interface_name in interfaces.keys() %} |
| 38 | - {{ interface_name }} |
| 39 | {%- endfor %} |
| 40 | |
| 41 | br_ctl: |
| 42 | address: ${_param:_esc}{_param:single_address} |
| 43 | enabled: true |
| 44 | netmask: ${_param:_esc}{_param:control_network_netmask} |
| 45 | proto: static |
| 46 | type: bridge |
| 47 | use_interfaces: |
| 48 | - bond0.${_param:_esc}{_param:control_vlan} |
| 49 | require_interfaces: |
| 50 | - bond0.${_param:_esc}{_param:control_vlan} |
| 51 | bond0.control_vlan: |
| 52 | mtu: 9000 |
| 53 | name: bond0.${_param:_esc}{_param:control_vlan} |
| 54 | enabled: true |
| 55 | proto: manual |
| 56 | type: vlan |
| 57 | use_interfaces: |
| 58 | - bond0 |
| 59 | require_interfaces: |
| 60 | - bond0 |
| 61 | |
| 62 | vhost0: |
| 63 | mtu: 9000 |
| 64 | address: ${_param:_esc}{_param:tenant_address} |
| 65 | netmask: ${_param:_esc}{_param:tenant_network_netmask} |
| 66 | gateway: ${_param:_esc}{_param:tenant_network_gateway} |
| 67 | enabled: true |
| 68 | proto: static |
| 69 | type: eth |
| 70 | pre_up_cmds: |
| 71 | - /usr/lib/contrail/if-vhost0 |
| 72 | name_servers: |
| 73 | - ${_param:_esc}{_param:dns_server01} |
| 74 | - ${_param:_esc}{_param:dns_server02} |
| 75 | use_interfaces: |
| 76 | - bond0.${_param:_esc}{_param:tenant_vlan} |
| 77 | require_interfaces: |
| 78 | - bond0.${_param:_esc}{_param:tenant_vlan} |
| 79 | bond0.tenant_vlan: |
| 80 | mtu: 9000 |
| 81 | name: bond0.${_param:_esc}{_param:tenant_vlan} |
| 82 | enabled: true |
| 83 | proto: manual |
| 84 | type: vlan |
| 85 | use_interfaces: |
| 86 | - bond0 |
| 87 | require_interfaces: |
| 88 | - bond0 |