Browse Source

support ipv6 network configuration

tags/v0.1
Arnold Bechtoldt 10 years ago
parent
commit
bebba16f76
3 changed files with 25 additions and 9 deletions
  1. +17
    -5
      network/defaults.yaml
  2. +3
    -4
      network/interfaces.sls
  3. +5
    -0
      pillar.example.sls

+ 17
- 5
network/defaults.yaml View File

interfaces: interfaces:
pkgs: [] pkgs: []
default_values: default_values:
enable: True
proto: dhcp
enabled: True
type: eth type: eth
params_supported: params_supported:
- proto
- ipaddr - ipaddr
- gateway - gateway
- netmask - netmask
- mode - mode
- slaves - slaves
#TODO - broadcast #TODO - broadcast
# IPV6
- enable_ipv6
- ipv6proto
- ipv6ipaddr
- ipv6netmask
- ipv6gateway
def_entries: def_entries:
- name: lo - name: lo
proto: loopback proto: loopback
interfaces: interfaces:
pkgs: [] pkgs: []
vlan_pkg: False vlan_pkg: False
values:
enable: True
proto: dhcp
default_values:
enabled: True
type: eth type: eth
params_supported: params_supported:
- proto
- ipaddr - ipaddr
- gateway - gateway
- netmask - netmask
- mode - mode
- slaves - slaves
#TODO - broadcast #TODO - broadcast
# IPV6
- enable_ipv6
- ipv6proto
- ipv6ipaddr
- ipv6netmask
- ipv6gateway
def_entries: [] def_entries: []
# - name: lo # - name: lo
# proto: none # proto: none

+ 3
- 4
network/interfaces.sls View File

{% endif %} {% endif %}


{% for n in interfaces %} {% for n in interfaces %}
network-{{ n.name }}:
network_{{ n.name }}:
network: network:
- managed - managed
- name: {{ n.name }} - name: {{ n.name }}
- enabled: {{ n.enable|default(datamap.interfaces.default_values.enable) }}
- proto: {{ n.proto|default(datamap.interfaces.default_values.proto) }}
- enabled: {{ n.enabled|default(datamap.interfaces.default_values.enabled) }}
- type: {{ n.type|default(datamap.interfaces.default_values.type) }} - type: {{ n.type|default(datamap.interfaces.default_values.type) }}
{% for p in datamap.interfaces.params_supported %} {% for p in datamap.interfaces.params_supported %}
{{ set_p(p, n) }} {{ set_p(p, n) }}
{% if n.use is defined %} {% if n.use is defined %}
- use: - use:
{% for u in n.use %} {% for u in n.use %}
- network: network-{{ u }}
- network: network_{{ u }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if n.provider is defined %} {% if n.provider is defined %}

+ 5
- 0
pillar.example.sls View File

ipaddr: 192.168.2.31 ipaddr: 192.168.2.31
netmask: 255.255.255.0 netmask: 255.255.255.0
gateway: 192.168.2.1 gateway: 192.168.2.1
enable_ipv6: True
ipv6proto: static
ipv6ipaddr: '2a03:4000:c:100::a'
ipv6netmask: 64
ipv6gateway: 'fe80::1'


resolver: resolver:
domain: domain.local domain: domain.local

Loading…
Cancel
Save