cloudinit.net refactor: find_fallback_nic
Bug #1884606 reported by
Dan Watkins
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Expired
|
Wishlist
|
Unassigned |
Bug Description
This bug is tracking part of the refactor of cloudinit.net into
cloudinit.
named in the title of this bug. See [0] for further details.
Changed in cloud-init: | |
importance: | Undecided → Low |
status: | New → Triaged |
tags: | added: net-refactor |
Changed in cloud-init: | |
importance: | Low → Wishlist |
To post a comment you must log in.
It would be good to refactor this to match what's in cloudinit/ net/init. py:find_ fallback_ nic_linux( ) where we're looking for connected devices...
> carrier = read_sys_ net_int( interface, 'carrier') append( interface) net_int( interface, 'dormant') connected. append( interface) net_safe( interface, 'operstate') connected. append( interface)
> if carrier:
> connected.
> continue
> # check if nic is dormant or down, as this may make a nick appear to
> # not have a carrier even though it could acquire one when brought
> # online by dhclient
> dormant = read_sys_
> if dormant:
> possibly_
> continue
> operstate = read_sys_
> if operstate in ['dormant', 'down', 'lowerlayerdown', 'unknown']:
> possibly_
> continue
Original discussion here: /github. com/canonical/ cloud-init/ pull/453/ files#r44427206 2
https:/