~curtin-dev/curtin/trunk

« back to all changes in this revision

Viewing changes to examples/tests/basic_network_static_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
showtrace: true
 
2
network:
 
3
    version: 1
 
4
    config:
 
5
        # Physical interfaces.
 
6
        - type: physical
 
7
          name: interface0
 
8
          mac_address: "52:54:00:12:34:00"
 
9
          subnets:
 
10
              - type: static
 
11
                address: 2001:4800:78ff:1b:be76:4eff:fe06:96b3
 
12
                netmask: 'ffff:ffff:ffff:ffff::'
 
13
                routes:
 
14
                  - gateway: 2001:4800:78ff:1b::1
 
15
                    netmask: '::'
 
16
                    network: '::'
 
17
        - type: nameserver
 
18
          address:
 
19
            - 10.0.2.3
 
20
          search:
 
21
            - wark.maas
 
22
            - foobar.maas