boxd 0.2.7__tar.gz → 0.2.7.dev438__tar.gz
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.
- {boxd-0.2.7/src/boxd.egg-info → boxd-0.2.7.dev438}/PKG-INFO +1 -1
- {boxd-0.2.7 → boxd-0.2.7.dev438}/pyproject.toml +1 -1
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/_mappers.py +3 -3
- {boxd-0.2.7 → boxd-0.2.7.dev438/src/boxd.egg-info}/PKG-INFO +1 -1
- {boxd-0.2.7 → boxd-0.2.7.dev438}/tests/test_mappers.py +5 -3
- {boxd-0.2.7 → boxd-0.2.7.dev438}/LICENSE +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/README.md +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/setup.cfg +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/__init__.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/_client.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/_credentials.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/_generated/__init__.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/_generated/api_pb2.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/_generated/api_pb2_grpc.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/_requests.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/_streaming.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/_transport.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/_urls.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/_version_check.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/errors.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/models.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/resources/__init__.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/resources/account.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/resources/credentials.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/resources/disks.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/resources/domains.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/resources/machines.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/resources/orgs.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/resources/snapshots.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd/resources/vars.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd.egg-info/SOURCES.txt +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd.egg-info/dependency_links.txt +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd.egg-info/requires.txt +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/src/boxd.egg-info/top_level.txt +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/tests/test_credentials.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/tests/test_namespaces.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/tests/test_requests.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/tests/test_streaming.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/tests/test_transport.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/tests/test_urls.py +0 -0
- {boxd-0.2.7 → boxd-0.2.7.dev438}/tests/test_version_check.py +0 -0
|
@@ -269,8 +269,8 @@ def snapshot(msg) -> Snapshot:
|
|
|
269
269
|
version=msg.version or None,
|
|
270
270
|
status=msg.status,
|
|
271
271
|
size_bytes=msg.size_bytes,
|
|
272
|
-
created_at=
|
|
273
|
-
updated_at=
|
|
272
|
+
created_at=_epoch_ms(msg.created_at),
|
|
273
|
+
updated_at=_epoch_ms(msg.updated_at),
|
|
274
274
|
vcpu=msg.vcpu,
|
|
275
275
|
memory_bytes=msg.memory_bytes,
|
|
276
276
|
use_count=msg.use_count,
|
|
@@ -301,7 +301,7 @@ def disk(msg) -> Disk:
|
|
|
301
301
|
name=msg.name,
|
|
302
302
|
size_bytes=msg.size_bytes,
|
|
303
303
|
status=msg.status,
|
|
304
|
-
created_at=
|
|
304
|
+
created_at=_epoch_ms(msg.created_at),
|
|
305
305
|
attachments=[disk_attachment(a) for a in msg.attachments],
|
|
306
306
|
)
|
|
307
307
|
|
|
@@ -198,14 +198,15 @@ def test_snapshot_version_zero_means_nothing_captured_yet():
|
|
|
198
198
|
|
|
199
199
|
|
|
200
200
|
def test_snapshot_created_at_is_the_first_capture_updated_at_the_latest():
|
|
201
|
+
# The wire values are epoch milliseconds, not seconds.
|
|
201
202
|
snapshot = m.snapshot(
|
|
202
203
|
api_pb2.SnapshotInfo(
|
|
203
204
|
snapshot_id="s1",
|
|
204
205
|
name="base",
|
|
205
206
|
version=3,
|
|
206
207
|
status="ready",
|
|
207
|
-
created_at=
|
|
208
|
-
updated_at=
|
|
208
|
+
created_at=1_700_000_000_000,
|
|
209
|
+
updated_at=1_700_090_000_000,
|
|
209
210
|
)
|
|
210
211
|
)
|
|
211
212
|
assert snapshot.version == 3
|
|
@@ -290,13 +291,14 @@ def test_proxy_with_a_pinned_port_reports_mode_locked():
|
|
|
290
291
|
|
|
291
292
|
|
|
292
293
|
def test_disk_attachments_status_and_created_at_are_mapped():
|
|
294
|
+
# The wire value is epoch milliseconds, not seconds.
|
|
293
295
|
disk = m.disk(
|
|
294
296
|
api_pb2.DiskInfo(
|
|
295
297
|
disk_id="d1",
|
|
296
298
|
name="data",
|
|
297
299
|
size_bytes=10,
|
|
298
300
|
status="ready",
|
|
299
|
-
created_at=
|
|
301
|
+
created_at=1_700_000_000_000,
|
|
300
302
|
attachments=[
|
|
301
303
|
api_pb2.DiskAttachment(
|
|
302
304
|
vm_id="vm-1", vm_name="alpha", mount_path="/data", mount_mode="rw"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|