goosebit 0.1.1__py3-none-any.whl → 0.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- goosebit/__init__.py +5 -2
- goosebit/api/__init__.py +1 -1
- goosebit/api/devices.py +59 -39
- goosebit/api/download.py +28 -14
- goosebit/api/firmware.py +40 -34
- goosebit/api/helper.py +30 -0
- goosebit/api/rollouts.py +64 -13
- goosebit/api/routes.py +14 -7
- goosebit/auth/__init__.py +14 -6
- goosebit/db.py +5 -0
- goosebit/models.py +110 -10
- goosebit/permissions.py +26 -20
- goosebit/realtime/__init__.py +1 -1
- goosebit/realtime/logs.py +3 -6
- goosebit/settings.py +4 -6
- goosebit/telemetry/__init__.py +28 -0
- goosebit/telemetry/prometheus.py +10 -0
- goosebit/ui/__init__.py +1 -1
- goosebit/ui/routes.py +33 -40
- goosebit/ui/static/js/devices.js +187 -250
- goosebit/ui/static/js/firmware.js +229 -92
- goosebit/ui/static/js/index.js +79 -90
- goosebit/ui/static/js/logs.js +14 -11
- goosebit/ui/static/js/rollouts.js +169 -27
- goosebit/ui/static/js/util.js +66 -0
- goosebit/ui/templates/devices.html +75 -51
- goosebit/ui/templates/firmware.html +149 -35
- goosebit/ui/templates/index.html +9 -26
- goosebit/ui/templates/login.html +58 -27
- goosebit/ui/templates/logs.html +15 -5
- goosebit/ui/templates/nav.html +77 -26
- goosebit/ui/templates/rollouts.html +62 -39
- goosebit/updater/__init__.py +1 -1
- goosebit/updater/controller/__init__.py +1 -1
- goosebit/updater/controller/v1/__init__.py +1 -1
- goosebit/updater/controller/v1/routes.py +53 -35
- goosebit/updater/manager.py +205 -103
- goosebit/updater/routes.py +4 -7
- goosebit/updates/__init__.py +70 -0
- goosebit/updates/swdesc.py +83 -0
- {goosebit-0.1.1.dist-info → goosebit-0.1.2.dist-info}/METADATA +53 -3
- goosebit-0.1.2.dist-info/RECORD +51 -0
- goosebit/updater/download/__init__.py +0 -1
- goosebit/updater/download/routes.py +0 -6
- goosebit/updater/download/v1/__init__.py +0 -1
- goosebit/updater/download/v1/routes.py +0 -13
- goosebit/updater/misc.py +0 -57
- goosebit/updates/artifacts.py +0 -89
- goosebit/updates/version.py +0 -38
- goosebit-0.1.1.dist-info/RECORD +0 -53
- {goosebit-0.1.1.dist-info → goosebit-0.1.2.dist-info}/LICENSE +0 -0
- {goosebit-0.1.1.dist-info → goosebit-0.1.2.dist-info}/WHEEL +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: goosebit
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.2
|
4
4
|
Summary:
|
5
5
|
Author: Upstream Data
|
6
6
|
Author-email: brett@upstreamdata.ca
|
@@ -9,12 +9,17 @@ Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.11
|
10
10
|
Classifier: Programming Language :: Python :: 3.12
|
11
11
|
Requires-Dist: aerich (>=0.7.2,<0.8.0)
|
12
|
+
Requires-Dist: aiocache (>=0.12.2,<0.13.0)
|
12
13
|
Requires-Dist: aiofiles (>=24.1.0,<25.0.0)
|
13
14
|
Requires-Dist: argon2-cffi (>=23.1.0,<24.0.0)
|
14
15
|
Requires-Dist: fastapi[uvicorn] (>=0.111.0,<0.112.0)
|
15
16
|
Requires-Dist: itsdangerous (>=2.2.0,<3.0.0)
|
16
17
|
Requires-Dist: jinja2 (>=3.1.4,<4.0.0)
|
17
18
|
Requires-Dist: joserfc (>=1.0.0,<2.0.0)
|
19
|
+
Requires-Dist: libconf (>=2.0.1,<3.0.0)
|
20
|
+
Requires-Dist: opentelemetry-distro (>=0.47b0,<0.48)
|
21
|
+
Requires-Dist: opentelemetry-exporter-prometheus (>=0.47b0,<0.48)
|
22
|
+
Requires-Dist: opentelemetry-instrumentation-fastapi (>=0.47b0,<0.48)
|
18
23
|
Requires-Dist: python-multipart (>=0.0.9,<0.0.10)
|
19
24
|
Requires-Dist: semver (>=3.0.2,<4.0.0)
|
20
25
|
Requires-Dist: tortoise-orm (>=0.21.4,<0.22.0)
|
@@ -22,6 +27,7 @@ Requires-Dist: websockets (>=12.0,<13.0)
|
|
22
27
|
Description-Content-Type: text/markdown
|
23
28
|
|
24
29
|
# gooseBit
|
30
|
+
|
25
31
|
<img src="docs/img/goosebit-logo.png" style="width: 100px; height: 100px; display: block;">
|
26
32
|
|
27
33
|
---
|
@@ -30,7 +36,7 @@ A simplistic, opinionated remote update server implementing hawkBit™'s [DDI AP
|
|
30
36
|
|
31
37
|
## Setup
|
32
38
|
|
33
|
-
To set up, install the dependencies in `pyproject.toml` with `poetry install`.
|
39
|
+
To set up, install the dependencies in `pyproject.toml` with `poetry install`. Then you can run gooseBit by running `main.py`.
|
34
40
|
|
35
41
|
## Initial Startup
|
36
42
|
|
@@ -38,26 +44,32 @@ The first time you start gooseBit, you should change the default username and pa
|
|
38
44
|
The default login credentials for testing are `admin@goosebit.local`, `admin`.
|
39
45
|
|
40
46
|
## Assumptions
|
41
|
-
|
47
|
+
|
48
|
+
- [SWUpdate](https://swupdate.org) used on device side.
|
42
49
|
|
43
50
|
## Current Feature Set
|
44
51
|
|
45
52
|
### Firmware repository
|
53
|
+
|
46
54
|
Uploading firmware images through frontend. All files should follow the format `{model}_{revision}_{version}`, where
|
47
55
|
`version` is either a semantic version or a datetime version in the format `YYYYMMDD-HHmmSS`.
|
48
56
|
|
49
57
|
### Automatic device registration
|
58
|
+
|
50
59
|
First time a new device connects, its configuration data is requested. `hw_model` and `hw_revision` are captured from
|
51
60
|
the configuration data (both fall back to `default` if not provided) which allows to distinguish different device
|
52
61
|
types and their revisions.
|
53
62
|
|
54
63
|
### Automatically update device to newest firmware
|
64
|
+
|
55
65
|
Once a device is registered it will get the newest available firmware from the repository based on model and revision.
|
56
66
|
|
57
67
|
### Manually update device to specific firmware
|
68
|
+
|
58
69
|
Frontend allows to assign specific firmware to be rolled out.
|
59
70
|
|
60
71
|
### Firmware rollout
|
72
|
+
|
61
73
|
Rollouts allow a fine-grained assignment of firmwares to devices. The reported device model and revision is combined
|
62
74
|
with the manually set feed and flavor values on a device to determine a matching rollout.
|
63
75
|
|
@@ -67,7 +79,45 @@ fast, stable).
|
|
67
79
|
The flavor can be used for different type of builds (like: debug, prod).
|
68
80
|
|
69
81
|
### Pause updates
|
82
|
+
|
70
83
|
Device can be pinned to its current firmware.
|
71
84
|
|
72
85
|
### Realtime update logs
|
86
|
+
|
73
87
|
While an update is running, the update logs are captured and visualized in the frontend.
|
88
|
+
|
89
|
+
## Development
|
90
|
+
|
91
|
+
### Code formatting and linting
|
92
|
+
|
93
|
+
Code is formatted using different tools
|
94
|
+
|
95
|
+
- black and isort for `*.py`
|
96
|
+
- biomejs for `*.js`, `*.json`
|
97
|
+
- prettier for `*.html`, `*.md`, `*.yml`, `*.yaml`
|
98
|
+
|
99
|
+
Code is linted using different tools as well
|
100
|
+
|
101
|
+
- flake8 for `*.py`
|
102
|
+
- biomejs for `*.js`
|
103
|
+
|
104
|
+
Best to have pre-commit install git hooks that run all those tools before a commit:
|
105
|
+
|
106
|
+
```bash
|
107
|
+
poetry run pre-commit install
|
108
|
+
```
|
109
|
+
|
110
|
+
To manually apply the hooks to all files use:
|
111
|
+
|
112
|
+
```bash
|
113
|
+
pre-commit run --all-files
|
114
|
+
```
|
115
|
+
|
116
|
+
### Testing
|
117
|
+
|
118
|
+
Tests are implemented using pytest. To run all tests
|
119
|
+
|
120
|
+
```bash
|
121
|
+
poetry run pytest
|
122
|
+
```
|
123
|
+
|
@@ -0,0 +1,51 @@
|
|
1
|
+
goosebit/__init__.py,sha256=zoQORspnBSSDfv2MpqFWrZtE2U_pE8KLWFIpiPSZVE0,2026
|
2
|
+
goosebit/api/__init__.py,sha256=4RRIzqC6KbCESIC9Vc6G4iAa28IWQH4KROTGd2S4AoI,41
|
3
|
+
goosebit/api/devices.py,sha256=w7KVp1NjVPMeSG1lr6nbhFExiavCz2bWYhWlngIqegA,4940
|
4
|
+
goosebit/api/download.py,sha256=kyOs8iZDnSma-HXb2qB7d3CC2tqP_2EJEODXcVvmwTY,998
|
5
|
+
goosebit/api/firmware.py,sha256=AfWZy41N0LGfyPhOOZ8Y8TQVHQJSHc5YNp12GNf5GaQ,1696
|
6
|
+
goosebit/api/helper.py,sha256=ErvjXru-FKhScE_toNKaxLabFyx_uZgDRNEGBZks-60,1000
|
7
|
+
goosebit/api/rollouts.py,sha256=6WDhPtzx1iiAmhqEx7NjeIDfmi5io1yWUDPFxO7Yn44,2673
|
8
|
+
goosebit/api/routes.py,sha256=gnQGxgZBQGRXQjagAN2tAo7aNzcULClQlVfYZcsrdfk,698
|
9
|
+
goosebit/auth/__init__.py,sha256=BpneDLWS7yfW4QIjFejdTRsUP8rIOQJjC5nggC5FMsg,4222
|
10
|
+
goosebit/db.py,sha256=2jqsYhJklJQ8Zuh9D4sy9lYfcqg3E-R6bOUSAbvjpjk,984
|
11
|
+
goosebit/models.py,sha256=zrZr-bKFOnd3CxLFtgTMullwRS49614O4b51OLQX6wo,4312
|
12
|
+
goosebit/permissions.py,sha256=4WmoReDCK2oIZJQyMOU8eQvdczb-KGY1nqPn4hOf1n4,1836
|
13
|
+
goosebit/realtime/__init__.py,sha256=4RRIzqC6KbCESIC9Vc6G4iAa28IWQH4KROTGd2S4AoI,41
|
14
|
+
goosebit/realtime/logs.py,sha256=t-tYO5EM5J9PGHUrz_7VCPiyGHIr2zQ3nkObYNaS4-A,1248
|
15
|
+
goosebit/realtime/routes.py,sha256=DzL1xBsdSc4SF2FiOAeuVKmcAq3m4DYo6KqD_pCNMww,269
|
16
|
+
goosebit/settings.py,sha256=MaCmklqfDO75WSrHkVdZ978DnO-iq7nnKabqkv6MVI0,1589
|
17
|
+
goosebit/telemetry/__init__.py,sha256=Gxc2gRyX8CQy6cdHepa2Hsn6n50f07_fr-OS_OOFukY,707
|
18
|
+
goosebit/telemetry/prometheus.py,sha256=vORU7zgqlAepTk7IwTE5_vt18_tbILWlJhCfeGMwTsM,382
|
19
|
+
goosebit/ui/__init__.py,sha256=4RRIzqC6KbCESIC9Vc6G4iAa28IWQH4KROTGd2S4AoI,41
|
20
|
+
goosebit/ui/routes.py,sha256=-I0muVY2SDAhF57Vn6jR8oGMye8ouKG55f8z3wB461Y,3249
|
21
|
+
goosebit/ui/static/__init__.py,sha256=AsZiM3h9chQ_YaBbAD6TVFf0244Q9DetkDMl70q8swQ,135
|
22
|
+
goosebit/ui/static/favicon.ico,sha256=FLzKyAkMvQcMg58nzCJxQOfPFxT4yYbP7S82pdY6zng,4286
|
23
|
+
goosebit/ui/static/favicon.svg,sha256=2iEZocLSave4QTjaR3GxGVT1zaDNl6T_GtN61YHsvJU,6595
|
24
|
+
goosebit/ui/static/js/devices.js,sha256=hdGaB4_az6AyVeFs09Ah9obMaOEONgXMFeXp-VVXWm4,11686
|
25
|
+
goosebit/ui/static/js/firmware.js,sha256=cfaVeJz2It4JvO7POBd3nag1_Mc5w51vByja-04g5Ac,9062
|
26
|
+
goosebit/ui/static/js/index.js,sha256=sxguHagyK3agGqnNHMf2AbhhmawewP5YMts6IYKfGRI,5550
|
27
|
+
goosebit/ui/static/js/logs.js,sha256=e9gBfWC7WNS87sO6tBlU1c8oKIch_Ot9sVkUTta-vbU,862
|
28
|
+
goosebit/ui/static/js/rollouts.js,sha256=jzAnX-waTPWim_uY8mC99KzkIQvAP-CZOT0HNARPOqY,6619
|
29
|
+
goosebit/ui/static/js/util.js,sha256=zJJH3lUc_spskseRSAV57dCFJJPgZxpiVA3WUP0-_tk,2049
|
30
|
+
goosebit/ui/static/svg/goosebit-logo.svg,sha256=2iEZocLSave4QTjaR3GxGVT1zaDNl6T_GtN61YHsvJU,6595
|
31
|
+
goosebit/ui/templates/__init__.py,sha256=M-F9UIAOVyRdsVIjU-19cCiXh48-LZBAKvl8R4CLlkM,140
|
32
|
+
goosebit/ui/templates/devices.html,sha256=8NH9NJqtzi6quqTA8B3TTKRnydJcVvJg0jkGeqr1CNY,3899
|
33
|
+
goosebit/ui/templates/firmware.html,sha256=yBV7Jzx4cy_aXLpSQfni9DB0byQ8b44Xv1GNQ-Q0NyI,7254
|
34
|
+
goosebit/ui/templates/index.html,sha256=QxRMJwUb37dQCiLSR84ICsUOHfZmo1QuW-3mlSaPTHg,796
|
35
|
+
goosebit/ui/templates/login.html,sha256=Uql0T8JIUuTXYOzto_BNTfKRQiZAqZvyr3wPGjRjhWE,2729
|
36
|
+
goosebit/ui/templates/logs.html,sha256=rGqLPHALZoFxJzyB82_vOaWndzDbr7ZbvyAuah5nbxM,1289
|
37
|
+
goosebit/ui/templates/nav.html,sha256=njPQEUXst2tR_nKWh4reaOyslC2dfNXNOBIT8pbPnb4,4948
|
38
|
+
goosebit/ui/templates/rollouts.html,sha256=3BGmRpfj5RaRNljVAYUYgKSdMpv-Mkn88lS1-V29naE,2620
|
39
|
+
goosebit/updater/__init__.py,sha256=4RRIzqC6KbCESIC9Vc6G4iAa28IWQH4KROTGd2S4AoI,41
|
40
|
+
goosebit/updater/controller/__init__.py,sha256=4RRIzqC6KbCESIC9Vc6G4iAa28IWQH4KROTGd2S4AoI,41
|
41
|
+
goosebit/updater/controller/routes.py,sha256=8CnLb-kDuO-yFeWdu4apIyctCf9OzvJ011Az3QDGemU,123
|
42
|
+
goosebit/updater/controller/v1/__init__.py,sha256=4RRIzqC6KbCESIC9Vc6G4iAa28IWQH4KROTGd2S4AoI,41
|
43
|
+
goosebit/updater/controller/v1/routes.py,sha256=sbMJZ69vOS1P28jECHfq48HVZyct37FI7E3NJc9xst4,6585
|
44
|
+
goosebit/updater/manager.py,sha256=UIV3FOABplB0jmA4pZFSoL2yEtByX1Kw2CEydmt0g7U,11400
|
45
|
+
goosebit/updater/routes.py,sha256=B9ufgYIkSsdKniiUTeJnwYsa_MWdQtuu5m3MNmHXZQQ,717
|
46
|
+
goosebit/updates/__init__.py,sha256=uVpqyW2q3j7cf20zo9yIXzdHGaduyfWMjTWWpP4bUzY,1946
|
47
|
+
goosebit/updates/swdesc.py,sha256=wT4TQSE5S13akMLGrCGUfWWi2j1freFENhDvaC5oTx4,2545
|
48
|
+
goosebit-0.1.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
49
|
+
goosebit-0.1.2.dist-info/METADATA,sha256=CFvsYgfBtR0Ve4ejtAp6q-b-En6K43l3R-o0lWWx2Ec,3827
|
50
|
+
goosebit-0.1.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
51
|
+
goosebit-0.1.2.dist-info/RECORD,,
|
@@ -1 +0,0 @@
|
|
1
|
-
from .routes import router
|
@@ -1 +0,0 @@
|
|
1
|
-
from .routes import router
|
@@ -1,13 +0,0 @@
|
|
1
|
-
from fastapi import APIRouter
|
2
|
-
from fastapi.requests import Request
|
3
|
-
from fastapi.responses import FileResponse
|
4
|
-
|
5
|
-
from goosebit.settings import UPDATES_DIR
|
6
|
-
|
7
|
-
router = APIRouter(prefix="/v1")
|
8
|
-
|
9
|
-
|
10
|
-
@router.get("/{dev_id}/{file}")
|
11
|
-
async def download_file(request: Request, tenant: str, dev_id: str, file: str):
|
12
|
-
filename = UPDATES_DIR.joinpath(file)
|
13
|
-
return FileResponse(filename, media_type="application/octet-stream")
|
goosebit/updater/misc.py
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
from __future__ import annotations
|
2
|
-
|
3
|
-
import hashlib
|
4
|
-
from pathlib import Path
|
5
|
-
from typing import Optional
|
6
|
-
|
7
|
-
from goosebit.models import Device
|
8
|
-
from goosebit.settings import UPDATE_VERSION_PARSER, UPDATES_DIR
|
9
|
-
|
10
|
-
|
11
|
-
def sha1_hash_file(file_path: Path):
|
12
|
-
with file_path.open("rb") as f:
|
13
|
-
sha1_hash = hashlib.file_digest(f, "sha1")
|
14
|
-
return sha1_hash.hexdigest()
|
15
|
-
|
16
|
-
|
17
|
-
def get_newest_fw(hw_model: str, hw_revision: str) -> Optional[str]:
|
18
|
-
def filter_filename(filename, hw_model, hw_revision) -> bool:
|
19
|
-
image_data = filename.split("_")
|
20
|
-
assert len(image_data) == 3
|
21
|
-
model, revision, _ = image_data
|
22
|
-
return model == hw_model and revision == hw_revision
|
23
|
-
|
24
|
-
fw_files = [
|
25
|
-
f
|
26
|
-
for f in UPDATES_DIR.iterdir()
|
27
|
-
if f.suffix == ".swu" and filter_filename(f.name, hw_model, hw_revision)
|
28
|
-
]
|
29
|
-
if len(fw_files) == 0:
|
30
|
-
return None
|
31
|
-
|
32
|
-
return str(sorted(fw_files, key=lambda x: fw_sort_key(x), reverse=True)[0].name)
|
33
|
-
|
34
|
-
|
35
|
-
def validate_filename(filename: str) -> bool:
|
36
|
-
try:
|
37
|
-
fw_sort_key(Path(filename))
|
38
|
-
return True
|
39
|
-
except ValueError:
|
40
|
-
return False
|
41
|
-
|
42
|
-
|
43
|
-
def fw_sort_key(filename: Path):
|
44
|
-
return UPDATE_VERSION_PARSER.parse(filename)
|
45
|
-
|
46
|
-
|
47
|
-
async def get_device_by_uuid(dev_id: str) -> Device:
|
48
|
-
if dev_id == "unknown":
|
49
|
-
return Device(
|
50
|
-
uuid="unknown",
|
51
|
-
name="Unknown",
|
52
|
-
fw_file="latest",
|
53
|
-
fw_version=None,
|
54
|
-
last_state=None,
|
55
|
-
last_log=None,
|
56
|
-
)
|
57
|
-
return (await Device.get_or_create(uuid=dev_id))[0]
|
goosebit/updates/artifacts.py
DELETED
@@ -1,89 +0,0 @@
|
|
1
|
-
import datetime
|
2
|
-
from pathlib import Path
|
3
|
-
from typing import Optional
|
4
|
-
|
5
|
-
from fastapi.requests import Request
|
6
|
-
|
7
|
-
from goosebit.settings import UPDATES_DIR
|
8
|
-
from goosebit.updater.misc import get_newest_fw, sha1_hash_file
|
9
|
-
|
10
|
-
|
11
|
-
class FirmwareArtifact:
|
12
|
-
def __init__(self, file: str = None, hw_model: str = None, hw_revision: str = None):
|
13
|
-
if file == "latest":
|
14
|
-
self.file = get_newest_fw(hw_model, hw_revision)
|
15
|
-
elif file == "pinned":
|
16
|
-
self.file = None
|
17
|
-
elif file == "none":
|
18
|
-
self.file = None
|
19
|
-
else:
|
20
|
-
self.file = file
|
21
|
-
|
22
|
-
def __eq__(self, other):
|
23
|
-
if isinstance(other, str):
|
24
|
-
return self.name == other
|
25
|
-
elif isinstance(other, FirmwareArtifact):
|
26
|
-
return self.file == other.file
|
27
|
-
return False
|
28
|
-
|
29
|
-
def is_empty(self) -> bool:
|
30
|
-
return self.file is None
|
31
|
-
|
32
|
-
def file_exists(self) -> bool:
|
33
|
-
if self.is_empty():
|
34
|
-
return False
|
35
|
-
return self.path.exists()
|
36
|
-
|
37
|
-
@property
|
38
|
-
def name(self) -> Optional[str]:
|
39
|
-
return self.file
|
40
|
-
|
41
|
-
@property
|
42
|
-
def version(self):
|
43
|
-
if not self.is_empty():
|
44
|
-
image_data = self.name.split("_")
|
45
|
-
assert len(image_data) == 3
|
46
|
-
return "_".join(image_data[1:])
|
47
|
-
|
48
|
-
@property
|
49
|
-
def timestamp(self):
|
50
|
-
return datetime.datetime.strptime(self.version, "%Y%m%d_%H%M%S")
|
51
|
-
|
52
|
-
@property
|
53
|
-
def path(self) -> Optional[Path]:
|
54
|
-
if not self.is_empty():
|
55
|
-
return UPDATES_DIR.joinpath(self.file)
|
56
|
-
|
57
|
-
@property
|
58
|
-
def dl_endpoint(self):
|
59
|
-
return "download_file"
|
60
|
-
|
61
|
-
def generate_chunk(self, request: Request, tenant: str, dev_id: str) -> list:
|
62
|
-
if not self.file_exists():
|
63
|
-
return []
|
64
|
-
return [
|
65
|
-
{
|
66
|
-
"part": "os",
|
67
|
-
"version": "1",
|
68
|
-
"name": self.file,
|
69
|
-
"artifacts": [
|
70
|
-
{
|
71
|
-
"filename": self.file,
|
72
|
-
"hashes": {"sha1": sha1_hash_file(self.path)},
|
73
|
-
"size": self.path.stat().st_size,
|
74
|
-
"_links": {
|
75
|
-
"download": {
|
76
|
-
"href": str(
|
77
|
-
request.url_for(
|
78
|
-
self.dl_endpoint,
|
79
|
-
tenant=tenant,
|
80
|
-
dev_id=dev_id,
|
81
|
-
file=self.file,
|
82
|
-
)
|
83
|
-
)
|
84
|
-
}
|
85
|
-
},
|
86
|
-
}
|
87
|
-
],
|
88
|
-
}
|
89
|
-
]
|
goosebit/updates/version.py
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
import dataclasses
|
2
|
-
from datetime import datetime
|
3
|
-
from pathlib import Path
|
4
|
-
from typing import Callable, Literal
|
5
|
-
|
6
|
-
from semver import Version as SemanticVersion
|
7
|
-
|
8
|
-
|
9
|
-
@dataclasses.dataclass
|
10
|
-
class DatetimeVersion:
|
11
|
-
timestamp: int
|
12
|
-
|
13
|
-
@classmethod
|
14
|
-
def parse(cls, version: str):
|
15
|
-
firmware_date = datetime.strptime(version, "%Y%m%d-%H%M%S")
|
16
|
-
return cls(timestamp=int(firmware_date.timestamp()))
|
17
|
-
|
18
|
-
def __gt__(self, other):
|
19
|
-
return self.timestamp > other.timestamp
|
20
|
-
|
21
|
-
def __lt__(self, other):
|
22
|
-
return self.timestamp < other.timestamp
|
23
|
-
|
24
|
-
|
25
|
-
@dataclasses.dataclass
|
26
|
-
class UpdateVersionParser:
|
27
|
-
parser: Callable
|
28
|
-
|
29
|
-
def parse(self, filename: Path):
|
30
|
-
_, _, version = filename.stem.split("_")
|
31
|
-
return self.parser(version)
|
32
|
-
|
33
|
-
@classmethod
|
34
|
-
def create(cls, parse_mode: Literal["semantic", "datetime"]):
|
35
|
-
if parse_mode == "semantic":
|
36
|
-
return cls(parser=SemanticVersion.parse)
|
37
|
-
if parse_mode == "datetime":
|
38
|
-
return cls(parser=DatetimeVersion.parse)
|
goosebit-0.1.1.dist-info/RECORD
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
goosebit/__init__.py,sha256=95cV9cH6zMXpS9UIOT10DOSZKSQM89ui1E_iEWhs_vk,1890
|
2
|
-
goosebit/api/__init__.py,sha256=Pn8KJu4sVaJKSSley4e1K5D_I3PrDd8ZLpWXchouH_o,27
|
3
|
-
goosebit/api/devices.py,sha256=ZoooxjkPECfoItpSeOiik5LrdEitxCXV18c3y5aHeMg,3358
|
4
|
-
goosebit/api/download.py,sha256=I9aL3ZkT2T5hfyTsuwwR5vFF5XjqnjHV0WjK0p-oToQ,607
|
5
|
-
goosebit/api/firmware.py,sha256=GXrLZcIospqAr8eqBf7RsW334hNELMXrnA1JJ9BrXIE,1410
|
6
|
-
goosebit/api/rollouts.py,sha256=dWYUcqBOPZoEIcKZOxHGiLfTjxUHXvAGn-At4K4yRZY,1027
|
7
|
-
goosebit/api/routes.py,sha256=k8xzSMd4UCerQxEdljoOXzlKZHHHBQndmY805RJv7AA,414
|
8
|
-
goosebit/auth/__init__.py,sha256=5s-aZ_p1M7qz2DwN-Oq3NivbR39FCIzxKdRfgokm-4Q,3837
|
9
|
-
goosebit/db.py,sha256=lIQR3s290qZX54NL1J-85Ge6l98xbV9_oRaCO48vdTY,787
|
10
|
-
goosebit/models.py,sha256=a3QmFXgBK5wBXMO7-lR0R83N9wbXj7gc89SYY2i0udI,1764
|
11
|
-
goosebit/permissions.py,sha256=WQwJYBWwAbUT5y6-s0STPdRI25XvAhqZ_22xEJDYESY,1702
|
12
|
-
goosebit/realtime/__init__.py,sha256=Pn8KJu4sVaJKSSley4e1K5D_I3PrDd8ZLpWXchouH_o,27
|
13
|
-
goosebit/realtime/logs.py,sha256=EKZaHGw3QqiLnW9gXodhNosM7ORJO4I8ZPSVjzggQhs,1266
|
14
|
-
goosebit/realtime/routes.py,sha256=DzL1xBsdSc4SF2FiOAeuVKmcAq3m4DYo6KqD_pCNMww,269
|
15
|
-
goosebit/settings.py,sha256=a3UB5AuB2LQrCtNSX4PtB9y-hT3o1P6zryFr7WggYAI,1659
|
16
|
-
goosebit/ui/__init__.py,sha256=Pn8KJu4sVaJKSSley4e1K5D_I3PrDd8ZLpWXchouH_o,27
|
17
|
-
goosebit/ui/routes.py,sha256=dmAqLKtolbFx0G5fgpYuS_jKOoosRanf7B14JyqlT7o,2992
|
18
|
-
goosebit/ui/static/__init__.py,sha256=AsZiM3h9chQ_YaBbAD6TVFf0244Q9DetkDMl70q8swQ,135
|
19
|
-
goosebit/ui/static/favicon.ico,sha256=FLzKyAkMvQcMg58nzCJxQOfPFxT4yYbP7S82pdY6zng,4286
|
20
|
-
goosebit/ui/static/favicon.svg,sha256=2iEZocLSave4QTjaR3GxGVT1zaDNl6T_GtN61YHsvJU,6595
|
21
|
-
goosebit/ui/static/js/devices.js,sha256=f3iDHa4j7u2vDYhrbiCU8L1WwpYlY3zFje4BKdPEC6M,13107
|
22
|
-
goosebit/ui/static/js/firmware.js,sha256=NGjatiXNPxo8cjeREKImfPuHIjPkTDykFJqY1KeUYKU,4450
|
23
|
-
goosebit/ui/static/js/index.js,sha256=vZi8QQSDLy2gtQw67eRIK5DtoEgUmwS-O6uQ2Ysd1iQ,6040
|
24
|
-
goosebit/ui/static/js/logs.js,sha256=0cFbe0_nrc6SIvfqGg567cwKUi-dV8JKAbEQQfPNLqg,794
|
25
|
-
goosebit/ui/static/js/rollouts.js,sha256=7VLU22Yu5Q0hNOAITj58ctf_IQGOZ2hNkQdVAOIU2EM,1543
|
26
|
-
goosebit/ui/static/svg/goosebit-logo.svg,sha256=2iEZocLSave4QTjaR3GxGVT1zaDNl6T_GtN61YHsvJU,6595
|
27
|
-
goosebit/ui/templates/__init__.py,sha256=M-F9UIAOVyRdsVIjU-19cCiXh48-LZBAKvl8R4CLlkM,140
|
28
|
-
goosebit/ui/templates/devices.html,sha256=Ys0BAuQy-ap_dXjJG3xkWboZfyeE2XdgOI0pPdYpiS8,3310
|
29
|
-
goosebit/ui/templates/firmware.html,sha256=rCVgI4oLct6eXbVWsfJndUTEV4K1QPkXzrRV9t3DgtE,2155
|
30
|
-
goosebit/ui/templates/index.html,sha256=ea5Mpz9IMZwmue1xqydCORKarlPaImsPaDqPed8INyE,1192
|
31
|
-
goosebit/ui/templates/login.html,sha256=Ip_-p3DbRyCkIjAfEBO2MyzEynQk1m9eKVGpuPLEF3c,1862
|
32
|
-
goosebit/ui/templates/logs.html,sha256=s8amkmbzwb5WhgEc5bhMhvsQnl5fuVzlgSvM5ZZoxU4,1014
|
33
|
-
goosebit/ui/templates/nav.html,sha256=EHsPzb0V-gFzA4VJaW7JHpxiHXHZa6Bh1AXW874HIxI,3786
|
34
|
-
goosebit/ui/templates/rollouts.html,sha256=QiVKPPYRH33nTfINhWHZaN6mGj7l2griFqL3pdzRw4c,1588
|
35
|
-
goosebit/updater/__init__.py,sha256=Pn8KJu4sVaJKSSley4e1K5D_I3PrDd8ZLpWXchouH_o,27
|
36
|
-
goosebit/updater/controller/__init__.py,sha256=Pn8KJu4sVaJKSSley4e1K5D_I3PrDd8ZLpWXchouH_o,27
|
37
|
-
goosebit/updater/controller/routes.py,sha256=8CnLb-kDuO-yFeWdu4apIyctCf9OzvJ011Az3QDGemU,123
|
38
|
-
goosebit/updater/controller/v1/__init__.py,sha256=Pn8KJu4sVaJKSSley4e1K5D_I3PrDd8ZLpWXchouH_o,27
|
39
|
-
goosebit/updater/controller/v1/routes.py,sha256=LroX2TeNERhed9DVaort2ERSFcX4EfJ7psYc3TO_xCk,4937
|
40
|
-
goosebit/updater/download/__init__.py,sha256=Pn8KJu4sVaJKSSley4e1K5D_I3PrDd8ZLpWXchouH_o,27
|
41
|
-
goosebit/updater/download/routes.py,sha256=HNvpdlZvEeVfpY-JLhvUKHDd9eGKCAOFjh1EN98J9T0,121
|
42
|
-
goosebit/updater/download/v1/__init__.py,sha256=Pn8KJu4sVaJKSSley4e1K5D_I3PrDd8ZLpWXchouH_o,27
|
43
|
-
goosebit/updater/download/v1/routes.py,sha256=ZeOHyw9rxIsEMnPqvSmtPE7RlF0u0EQcNN2jT4NAkG8,416
|
44
|
-
goosebit/updater/manager.py,sha256=-hrcHslzKszCLinKZhZdyM6RQ45ZsTbB8_Dpk6j_WU0,7551
|
45
|
-
goosebit/updater/misc.py,sha256=SWTp2basygNmqoQrtrlWEJb-qtrcHxr_4S_gnsqRbXc,1550
|
46
|
-
goosebit/updater/routes.py,sha256=HN_UTO7msMSqhruwwXVm-Je7jOjm5mSvisW-X9F3Vgc,822
|
47
|
-
goosebit/updates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
48
|
-
goosebit/updates/artifacts.py,sha256=1pvJ271gFgQA8gJTxaMIISOO9l6_3w7Qm9LUo1Stm0g,2676
|
49
|
-
goosebit/updates/version.py,sha256=TIjepIYi5R6h2m-cOpeOg8FAdjT5mnai0oHflkkEnOc,1022
|
50
|
-
goosebit-0.1.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
51
|
-
goosebit-0.1.1.dist-info/METADATA,sha256=iIaFlJlWSfu_zZ2fl-yTTnyDDJW2Sp-c2zQLzIisohw,2931
|
52
|
-
goosebit-0.1.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
53
|
-
goosebit-0.1.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|