nitrokey.nk3.updates

class nitrokey.nk3.updates.UpdatePath

Bas: Enum

classmethod create(variant, current, new)
Parametrar:
Returtyp:

UpdatePath

default = 1
nRF_IFS_Migration_v1_3 = 2
class nitrokey.nk3.updates.UpdateUi

Bas: ABC

abstract abort(*msgs)
Parametrar:

msgs (Any)

Returtyp:

Exception

abstract abort_downgrade(current, image)
Parametrar:
Returtyp:

Exception

abstract abort_pynitrokey_version(current, required)
Parametrar:
Returtyp:

Exception

abstract confirm_download(current, new)
Parametrar:
Returtyp:

None

abstract confirm_extra_information(extra_info)
Parametrar:

extra_info (List[str])

Returtyp:

None

abstract confirm_pynitrokey_version(current, required)
Parametrar:
Returtyp:

None

abstract confirm_update(current, new)
Parametrar:
Returtyp:

None

abstract confirm_update_same_version(version)
Parametrar:

version (Version)

Returtyp:

None

abstract download_progress_bar(desc)
Parametrar:

desc (str)

Returtyp:

Iterator[Callable[[int, int], None]]

abstract error(*msgs)
Parametrar:

msgs (Any)

Returtyp:

Exception

abstract finalization_progress_bar()
Returtyp:

Iterator[Callable[[int, int], None]]

abstract pre_bootloader_hint()
Returtyp:

None

abstract request_bootloader_confirmation()
Returtyp:

None

request_repeated_update()
Returtyp:

Exception | None

abstract update_progress_bar()
Returtyp:

Iterator[Callable[[int, int], None]]

class nitrokey.nk3.updates.Updater

Bas: object

__init__(ui, await_bootloader, await_device)
Parametrar:
  • ui (UpdateUi)

  • await_bootloader (Callable[[], NK3Bootloader])

  • await_device (Callable[[int | None, Callable[[int, int], None] | None], NK3])

Returtyp:

None

update(device, image, update_version, ignore_pynitrokey_version=False)
Parametrar:
  • device (TrussedBase)

  • image (str | None)

  • update_version (str | None)

  • ignore_pynitrokey_version (bool)

Returtyp:

Version

nitrokey.nk3.updates.get_extra_information(upath)

Returnera ytterligare information för enheten efter uppdatering baserat på update-path

Parametrar:

upath (UpdatePath)

Returtyp:

List[str]

nitrokey.nk3.updates.get_finalization_wait_retries(upath)

Returnerar antal försök att vänta på enheten efter uppdatering baserat på update-path

Parametrar:

upath (UpdatePath)

Returtyp:

int

nitrokey.nk3.updates.get_firmware_update(release)
Parametrar:

release (Release)

Returtyp:

Asset