---
merged:
  before:
    - name: Loopback888
    - name: Loopback999
    - ipv4:
        - dhcp:
            enable: true
      name: GigabitEthernet1
    - name: GigabitEthernet2
    - name: GigabitEthernet3
    - name: GigabitEthernet4
  commands:
    - interface loopback999
    - ip address 192.0.2.1 255.255.255.0
    - interface GigabitEthernet2
    - ipv6 address autoconfig
    - interface GigabitEthernet3
    - ip address 198.51.100.1 255.255.255.0 secondary
    - ip address 198.51.100.2 255.255.255.0
    - ipv6 address 2001:db8:0:3::/64
  after:
    - name: Loopback888
    - ipv4:
        - address: 192.0.2.1/24
      name: Loopback999
    - ipv4:
        - dhcp:
            enable: true
      name: GigabitEthernet1
    - ipv6:
        - autoconfig:
            enable: true
      name: GigabitEthernet2
    - ipv4:
        - address: 198.51.100.1/24
          secondary: true
        - address: 198.51.100.2/24
      ipv6:
        - address: 2001:DB8:0:3::/64
      name: GigabitEthernet3
    - name: GigabitEthernet4

replaced:
  before:
    - name: Loopback888
    - name: Loopback999
    - ipv4:
        - dhcp:
            enable: true
      name: GigabitEthernet1
    - ipv4:
        - address: 203.0.113.27/24
      name: GigabitEthernet2
    - ipv4:
        - address: 192.0.2.1/24
          secondary: true
        - address: 192.0.2.2/24
      ipv6:
        - address: 2001:DB8:0:3::/64
        - autoconfig:
            enable: true
      name: GigabitEthernet3
    - name: GigabitEthernet4
  commands:
    - interface GigabitEthernet2
    - no ip address 203.0.113.27 255.255.255.0
    - ip address 203.0.114.1 255.255.255.0
    - interface GigabitEthernet3
    - no ipv6 address autoconfig
    - no ipv6 address 2001:db8:0:3::/64
    - no ip address 192.0.2.2 255.255.255.0
    - no ip address 192.0.2.1 255.255.255.0 secondary
    - ipv6 address 2001:db8:1:1::/64
    - ip address 198.51.100.2 255.255.255.0
    - ip address 198.51.100.1 255.255.255.0 secondary
  after:
    - name: Loopback888
    - name: Loopback999
    - ipv4:
        - dhcp:
            enable: true
      name: GigabitEthernet1
    - ipv4:
        - address: 203.0.114.1/24
      name: GigabitEthernet2
    - ipv4:
        - address: 198.51.100.1/24
          secondary: true
        - address: 198.51.100.2/24
      ipv6:
        - address: 2001:DB8:1:1::/64
      name: GigabitEthernet3
    - name: GigabitEthernet4

overridden:
  before:
    - name: Loopback888
    - name: Loopback999
    - ipv4:
        - dhcp:
            enable: true
      name: GigabitEthernet1
    - ipv4:
        - address: 203.0.113.27/24
      name: GigabitEthernet2
    - ipv4:
        - address: 192.0.2.1/24
          secondary: true
        - address: 192.0.2.2/24
      ipv6:
        - address: 2001:DB8:0:3::/64
        - autoconfig:
            enable: true
      name: GigabitEthernet3
    - name: GigabitEthernet4
  commands:
    - interface GigabitEthernet2
    - no ip address 203.0.113.27 255.255.255.0
    - interface GigabitEthernet3
    - no ipv6 address autoconfig
    - no ipv6 address 2001:db8:0:3::/64
    - no ip address 192.0.2.2 255.255.255.0
    - no ip address 192.0.2.1 255.255.255.0 secondary
    - ip address 198.51.100.2 255.255.255.0 secondary
    - ip address 198.51.100.1 255.255.255.0
  after:
    - name: Loopback888
    - name: Loopback999
    - ipv4:
        - dhcp:
            enable: true
      name: GigabitEthernet1
    - name: GigabitEthernet2
    - ipv4:
        - address: 198.51.100.2/24
          secondary: true
        - address: 198.51.100.1/24
      name: GigabitEthernet3
    - name: GigabitEthernet4

deleted:
  before:
    - ipv4:
        - dhcp:
            enable: true
      name: GigabitEthernet1
    - ipv4:
        - address: 203.0.113.27/24
      name: GigabitEthernet2
    - ipv4:
        - address: 192.0.2.1/24
          secondary: true
        - address: 192.0.2.2/24
      ipv6:
        - address: 2001:DB8:0:3::/64
        - autoconfig:
            enable: true
      name: GigabitEthernet3
    - name: GigabitEthernet4
    - name: Loopback888
    - name: Loopback999
  commands:
    - interface GigabitEthernet2
    - no ip address 203.0.113.27 255.255.255.0
    - interface GigabitEthernet3
    - no ip address 192.0.2.1 255.255.255.0 secondary
    - no ip address 192.0.2.2 255.255.255.0
    - no ipv6 address 2001:db8:0:3::/64
    - no ipv6 address autoconfig
  after:
    - name: Loopback888
    - name: Loopback999
    - ipv4:
        - dhcp:
            enable: true
      name: GigabitEthernet1
    - name: GigabitEthernet2
    - name: GigabitEthernet3
    - name: GigabitEthernet4

gathered:
  config:
    - name: Loopback888
    - name: Loopback999
    - ipv4:
        - dhcp:
            enable: true
      name: GigabitEthernet1
    - ipv4:
        - address: 203.0.113.27/24
      name: GigabitEthernet2
    - ipv4:
        - address: 192.0.2.1/24
          secondary: true
        - address: 192.0.2.2/24
      ipv6:
        - address: 2001:DB8:0:3::/64
        - autoconfig:
            enable: true
      name: GigabitEthernet3
    - name: GigabitEthernet4

parsed:
  config:
    - ipv4:
        - dhcp:
            client_id: GigabitEthernet0/0
            enable: true
            hostname: test.com
      name: GigabitEthernet2
    - ipv4:
        - address: 198.51.100.1/24
          secondary: true
        - address: 198.51.100.2/24
      ipv6:
        - autoconfig:
            enable: true
        - address: 2001:db8:0:3::/64
      name: GigabitEthernet3

rtt:
  commands:
    - interface loopback999
    - no ip address 192.0.2.2 255.255.255.0
    - ip address 192.0.2.1 255.255.255.0

rendered:
  commands:
    - interface loopback999
    - ip address 192.0.2.1 255.255.255.0
    - interface GigabitEthernet2
    - ip address dhcp client-id GigabitEthernet0/0 hostname test.com
    - ipv6 address autoconfig
    - interface GigabitEthernet3
    - ip address 198.51.100.1 255.255.255.0 secondary
    - ip address 198.51.100.2 255.255.255.0
    - ipv6 address dhcp
    - ipv6 address 2001:db8:0:3::/64
