storage: expect optional NVMe controllers in the storage config
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
This commit is contained in:
parent
383a9d20f4
commit
c95716669c
|
@ -70,7 +70,7 @@ parts:
|
|||
|
||||
source: https://git.launchpad.net/curtin
|
||||
source-type: git
|
||||
source-commit: a349105809af6188cb394e300a99846df3d117f0
|
||||
source-commit: 237053d9d18916dd72cf861280474d4df0e9fd24
|
||||
|
||||
override-pull: |
|
||||
craftctl default
|
||||
|
|
|
@ -704,12 +704,21 @@ class Dasd:
|
|||
preserve: bool = False
|
||||
|
||||
|
||||
@fsobj("nvme_controller")
|
||||
class NVMeController:
|
||||
transport: str
|
||||
tcp_port: Optional[int] = None
|
||||
tcp_addr: Optional[str] = None
|
||||
preserve: bool = False
|
||||
|
||||
|
||||
@fsobj("disk")
|
||||
class Disk(_Device):
|
||||
ptable: Optional[str] = attributes.ptable()
|
||||
serial: Optional[str] = None
|
||||
wwn: Optional[str] = None
|
||||
multipath: Optional[str] = None
|
||||
nvme_controller: Optional[NVMeController] = attributes.ref(default=None)
|
||||
path: Optional[str] = None
|
||||
wipe: Optional[str] = None
|
||||
preserve: bool = False
|
||||
|
@ -755,6 +764,7 @@ class Disk(_Device):
|
|||
"serial": self.serial or "unknown",
|
||||
"wwn": self.wwn or "unknown",
|
||||
"multipath": self.multipath or "unknown",
|
||||
"nvme-controller": self.nvme_controller,
|
||||
"size": self.size,
|
||||
"humansize": humanize_size(self.size),
|
||||
"vendor": self._info.vendor or "unknown",
|
||||
|
|
|
@ -37,6 +37,7 @@ labels_keys = [
|
|||
("Bus:", "bus"),
|
||||
("Rotational:", "rotational"),
|
||||
("Path:", "devpath"),
|
||||
("NVMe controller:", "nvme-controller"),
|
||||
]
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue