network: document and add type hint for NetworkDev.info
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
This commit is contained in:
parent
dc26a1d252
commit
221466aa70
|
@ -21,6 +21,7 @@ from socket import AF_INET, AF_INET6
|
|||
from typing import Dict, List, Optional
|
||||
|
||||
import attr
|
||||
import probert.network
|
||||
import yaml
|
||||
|
||||
from subiquitycore import netplan
|
||||
|
@ -189,13 +190,16 @@ class BondParameters:
|
|||
]
|
||||
|
||||
|
||||
class NetworkDev(object):
|
||||
class NetworkDev:
|
||||
def __init__(self, model, name, typ):
|
||||
self._model = model
|
||||
self._name = name
|
||||
self.type = typ
|
||||
self.config = {}
|
||||
self.info = None
|
||||
# Devices that have been configured in Subiquity but do not (yet) exist
|
||||
# on the system have their "info" field set to None. Once they exist,
|
||||
# probert should pass on the information through a call to new_link().
|
||||
self.info: Optional[probert.network.Link] = None
|
||||
self.disabled_reason = None
|
||||
self.dhcp_events = {}
|
||||
self._dhcp_state = {
|
||||
|
|
Loading…
Reference in New Issue