diff --git a/.github/workflows/snap.yaml b/.github/workflows/snap.yaml new file mode 100644 index 00000000..87fc7124 --- /dev/null +++ b/.github/workflows/snap.yaml @@ -0,0 +1,10 @@ +name: CI + +on: [push, pull_request] + +jobs: + snap-build: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: snapcore/action-build@v1 diff --git a/subiquitycore/models/network.py b/subiquitycore/models/network.py index 4251ab77..d5ce0cb3 100644 --- a/subiquitycore/models/network.py +++ b/subiquitycore/models/network.py @@ -21,7 +21,6 @@ from socket import AF_INET, AF_INET6 from typing import Dict, List, Optional import attr -import probert.network import yaml from subiquitycore import netplan @@ -196,10 +195,15 @@ class NetworkDev: self._name = name self.type = typ self.config = {} + + # import done here to break a chain where anybody importing + # subiquity.common.types has to have probert + from probert.network import Link + # 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.info: Optional[Link] = None self.disabled_reason = None self.dhcp_events = {} self._dhcp_state = {