~curtin-dev/curtin/trunk

« back to all changes in this revision

Viewing changes to examples/tests/vlan_network_ipv6.yaml

  • Committer: Ryan Harper
  • Date: 2016-08-29 21:06:46 UTC
  • mfrom: (416.4.28 trunk.more-ipv6)
  • Revision ID: ryan.harper@canonical.com-20160829210646-1f9pv8r691iggedz
curtin/net: overhaul of eni rendering to handle mixed ipv4/ipv6 configs

To ensure complete ipv4/ipv6 support for advanced and stacked
configurations update how curtin.net renders /etc/network/interfaces for
different releases (precise -> yakkety). ifupdown has subtle issues with
various networking features and curtin needs to ensure consistent
behavior.

- Propery handle emitting the 'auto' control tag for stacked interfaces,
  like vlans over bonds
- Workaround LP:1609367 by rendering ifupdown hooks to handle the various
  cases. This works generically in all ubuntu releases 
- Add vmtests for mtu settings
- Drop the use of ipv4 alias interfaces (eth0:1, eth0:2) and instead just
  add additional e/n/i stanzas. ifupdown already uses iproute2's /sbin/ip
  which supports adding additional ip addresses to an interface without the
  use of the v4-only interface alias structure. This provides consistent
  behavior for all types of interfaces (physical, vlan, bonds, and stacked
  interfaces) across all releases. Two side-effects: 1) users can no longer
  `ifdown eth0:1` to remove a single ip address from an interface; if down
  eth0 will take _all_ ip addresses on that interface. 2) ifconfig output
  only shows *one* ipv4 address, so users will need to use /sbin/ip addr
  show <interface> to see all ip addresses assigned to an interface.
- Add vmtests for alias settings
- Restructure all of the common network testcases into a single class
  TestNetworkTestBaseAbs, all varients testing network inherit from this
  class and override only the config file and any special case test-cases
  and file collection
- Global replace of testcase use of 'with open' and instead use
  load_collect_file()
  - Fix falsepositive uefi and multipath test this replacement exposed.
- Add ip_a_to_dict parser for `/sbin/ip a` output
  - drop ifconfig_a parser

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
network:
 
2
  config:
 
3
  - id: interface0
 
4
    mac_address: d4:be:d9:a8:49:13
 
5
    mtu: 1500
 
6
    name: interface0
 
7
    subnets:
 
8
    - address: 2001:4800:78ff:1b:be76:4eff:fe06:96b3
 
9
      netmask: 'ffff:ffff:ffff:ffff::'
 
10
      dns_nameservers:
 
11
      - 10.245.168.2
 
12
      routes:
 
13
            - gateway: 2001:4800:78ff:1b::1
 
14
              netmask: '::'
 
15
              network: '::'
 
16
      type: static
 
17
    type: physical
 
18
  - id: interface1
 
19
    mac_address: d4:be:d9:a8:49:15
 
20
    mtu: 1500
 
21
    name: interface1
 
22
    subnets:
 
23
    - address: 2001:4800:beef:1b:be76:4eff:fe06:97b0
 
24
      netmask: 'ffff:ffff:ffff:ffff::'
 
25
      dns_nameservers: []
 
26
      type: static
 
27
    type: physical
 
28
  - id: interface2
 
29
    mac_address: d4:be:d9:a8:49:17
 
30
    mtu: 1500
 
31
    name: interface2
 
32
    subnets:
 
33
    - type: manual
 
34
      control: manual
 
35
    type: physical
 
36
  - id: interface3
 
37
    mac_address: d4:be:d9:a8:49:19
 
38
    mtu: 1500
 
39
    name: interface3
 
40
    subnets:
 
41
    - type: manual
 
42
      control: manual
 
43
    type: physical
 
44
  - id: interface1.2667
 
45
    mtu: 1500
 
46
    name: interface1.2667
 
47
    subnets:
 
48
    - address: 2001:4800:dead:1b:be76:4eff:c486:12f7
 
49
      netmask: 'ffff:ffff:ffff:ffff::'
 
50
      dns_nameservers: []
 
51
      type: static
 
52
    type: vlan
 
53
    vlan_id: 2667
 
54
    vlan_link: interface1
 
55
  - id: interface1.2668
 
56
    mtu: 1500
 
57
    name: interface1.2668
 
58
    subnets:
 
59
    - address: 2001:4800:feef:1b:be76:4eff:4242:2323
 
60
      netmask: 'ffff:ffff:ffff:ffff::'
 
61
      dns_nameservers: []
 
62
      type: static
 
63
    type: vlan
 
64
    vlan_id: 2668
 
65
    vlan_link: interface1
 
66
  - id: interface1.2669
 
67
    mtu: 1500
 
68
    name: interface1.2669
 
69
    subnets:
 
70
    - address: 2001:4800:effe:1b:be76:7634:5f42:79ff
 
71
      netmask: 'ffff:ffff:ffff:ffff::'
 
72
      dns_nameservers: []
 
73
      type: static
 
74
    type: vlan
 
75
    vlan_id: 2669
 
76
    vlan_link: interface1
 
77
  - id: interface1.2670
 
78
    mtu: 1500
 
79
    name: interface1.2670
 
80
    subnets:
 
81
    - address: 2001:4800:9eaf:1b:be76:7634:321f:bbca
 
82
      netmask: 'ffff:ffff:ffff:ffff::'
 
83
      dns_nameservers: []
 
84
      type: static
 
85
    type: vlan
 
86
    vlan_id: 2670
 
87
    vlan_link: interface1
 
88
  - address: 10.245.168.2
 
89
    search:
 
90
    - dellstack
 
91
    type: nameserver
 
92
  version: 1