boxd 0.2.5.dev47__tar.gz → 0.2.6.dev355__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.5.dev47/src/boxd.egg-info → boxd-0.2.6.dev355}/PKG-INFO +44 -3
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/README.md +43 -2
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/pyproject.toml +1 -1
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/__init__.py +4 -0
- boxd-0.2.6.dev355/src/boxd/_generated/api_pb2.py +420 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/_generated/api_pb2_grpc.py +192 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/_mappers.py +18 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/_requests.py +39 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/models.py +22 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/resources/machines.py +55 -0
- boxd-0.2.6.dev355/src/boxd/resources/orgs.py +184 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355/src/boxd.egg-info}/PKG-INFO +44 -3
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/tests/test_namespaces.py +68 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/tests/test_urls.py +1 -1
- boxd-0.2.5.dev47/src/boxd/_generated/api_pb2.py +0 -406
- boxd-0.2.5.dev47/src/boxd/resources/orgs.py +0 -85
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/LICENSE +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/setup.cfg +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/_client.py +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/_credentials.py +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/_generated/__init__.py +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/_streaming.py +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/_transport.py +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/_urls.py +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/_version_check.py +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/errors.py +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/resources/__init__.py +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/resources/account.py +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/resources/credentials.py +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/resources/disks.py +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/resources/domains.py +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/resources/snapshots.py +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd/resources/vars.py +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd.egg-info/SOURCES.txt +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd.egg-info/dependency_links.txt +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd.egg-info/requires.txt +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/src/boxd.egg-info/top_level.txt +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/tests/test_credentials.py +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/tests/test_mappers.py +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/tests/test_requests.py +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/tests/test_streaming.py +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/tests/test_transport.py +0 -0
- {boxd-0.2.5.dev47 → boxd-0.2.6.dev355}/tests/test_version_check.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: boxd
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6.dev355
|
|
4
4
|
Summary: Python SDK for the boxd cloud VM platform
|
|
5
5
|
Author: Azin
|
|
6
6
|
License-Expression: MIT
|
|
@@ -188,7 +188,7 @@ boxd.machines.create(
|
|
|
188
188
|
cmd=["/usr/local/bin/start"],
|
|
189
189
|
restart_policy="always", # "always" | "never"
|
|
190
190
|
vcpu=2,
|
|
191
|
-
memory="8G", #
|
|
191
|
+
memory="8G", # sizes: 1 vCPU/4G, 2/8G, 4/16G
|
|
192
192
|
disk="100G",
|
|
193
193
|
auto_suspend_timeout=300, # seconds; 0 disables
|
|
194
194
|
auto_destroy_timeout=0,
|
|
@@ -219,7 +219,7 @@ Everything else:
|
|
|
219
219
|
|
|
220
220
|
```python
|
|
221
221
|
boxd.machines.fork("my-machine", "my-copy") # live clone
|
|
222
|
-
boxd.machines.fork(id, shared=True
|
|
222
|
+
boxd.machines.fork(id, shared=True) # forks keep the source machine's size
|
|
223
223
|
boxd.machines.rename(id, "new-name") # returns the new name; reboots the machine
|
|
224
224
|
boxd.machines.share(id) # visible to your whole org
|
|
225
225
|
boxd.machines.unshare(id)
|
|
@@ -237,6 +237,30 @@ private to you unless you pass `shared=True`.
|
|
|
237
237
|
usable. Call `wait_until_ready` before doing anything that depends on it
|
|
238
238
|
running — especially before forking it again.
|
|
239
239
|
|
|
240
|
+
### Sizing
|
|
241
|
+
|
|
242
|
+
There are three sizes: 1 vCPU/4G, 2/8G, 4/16G. Name either dimension and the
|
|
243
|
+
other follows, so `vcpu=2` and `memory="8G"` are the same request. Anything
|
|
244
|
+
above your org's quota is refused, never quietly clamped.
|
|
245
|
+
|
|
246
|
+
A machine keeps the size it was created with, through stop/start, wake, and
|
|
247
|
+
migration alike. Changing it is an explicit call:
|
|
248
|
+
|
|
249
|
+
```python
|
|
250
|
+
result = boxd.machines.resize(id, memory="8G") # or vcpu=2
|
|
251
|
+
result.vcpu, result.memory_bytes # the size now persisted
|
|
252
|
+
result.rebooted # it was running, so it was rebooted
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
A **running** machine is rebooted to apply the new size: a cold boot, so the
|
|
256
|
+
disk survives and anything in RAM does not. A **stopped** machine takes it at
|
|
257
|
+
its next start. A suspended or hibernated machine is refused, because its
|
|
258
|
+
saved memory image is the old size — resume or wake it first.
|
|
259
|
+
|
|
260
|
+
A create that names no size uses the org default (see
|
|
261
|
+
[Organizations](#organizations-credentials-account)), and a fork always
|
|
262
|
+
inherits its source's size.
|
|
263
|
+
|
|
240
264
|
### The `Machine` record
|
|
241
265
|
|
|
242
266
|
```python
|
|
@@ -588,6 +612,23 @@ delegation is actually live, for the same reason as per-machine domains
|
|
|
588
612
|
above. A background check then verifies delegation and issues certs
|
|
589
613
|
automatically, then flips `status` to `"active"`.
|
|
590
614
|
|
|
615
|
+
An org also has a default machine size: what a `create` that names no size
|
|
616
|
+
gets. It is a preference *below* the quota, not the quota itself — the quota
|
|
617
|
+
stays the operator-owned ceiling and the per-request maximum. Setting or
|
|
618
|
+
clearing it requires org admin; reading it doesn't.
|
|
619
|
+
|
|
620
|
+
```python
|
|
621
|
+
boxd.orgs.set_machine_defaults("acme", vcpu=2) # or memory="8G"
|
|
622
|
+
d = boxd.orgs.get_machine_defaults("acme")
|
|
623
|
+
d.is_set # False = no default; the values
|
|
624
|
+
d.vcpu, d.memory_bytes # below are just the quota
|
|
625
|
+
d.ceiling_vcpu, d.ceiling_memory_bytes # the org quota
|
|
626
|
+
boxd.orgs.clear_machine_defaults("acme") # back to the quota
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
Only machines created afterwards are affected — every existing machine keeps
|
|
630
|
+
the size it was created with. Omit the org to target your home org.
|
|
631
|
+
|
|
591
632
|
```python
|
|
592
633
|
key = boxd.api_keys.create(
|
|
593
634
|
"ci",
|
|
@@ -156,7 +156,7 @@ boxd.machines.create(
|
|
|
156
156
|
cmd=["/usr/local/bin/start"],
|
|
157
157
|
restart_policy="always", # "always" | "never"
|
|
158
158
|
vcpu=2,
|
|
159
|
-
memory="8G", #
|
|
159
|
+
memory="8G", # sizes: 1 vCPU/4G, 2/8G, 4/16G
|
|
160
160
|
disk="100G",
|
|
161
161
|
auto_suspend_timeout=300, # seconds; 0 disables
|
|
162
162
|
auto_destroy_timeout=0,
|
|
@@ -187,7 +187,7 @@ Everything else:
|
|
|
187
187
|
|
|
188
188
|
```python
|
|
189
189
|
boxd.machines.fork("my-machine", "my-copy") # live clone
|
|
190
|
-
boxd.machines.fork(id, shared=True
|
|
190
|
+
boxd.machines.fork(id, shared=True) # forks keep the source machine's size
|
|
191
191
|
boxd.machines.rename(id, "new-name") # returns the new name; reboots the machine
|
|
192
192
|
boxd.machines.share(id) # visible to your whole org
|
|
193
193
|
boxd.machines.unshare(id)
|
|
@@ -205,6 +205,30 @@ private to you unless you pass `shared=True`.
|
|
|
205
205
|
usable. Call `wait_until_ready` before doing anything that depends on it
|
|
206
206
|
running — especially before forking it again.
|
|
207
207
|
|
|
208
|
+
### Sizing
|
|
209
|
+
|
|
210
|
+
There are three sizes: 1 vCPU/4G, 2/8G, 4/16G. Name either dimension and the
|
|
211
|
+
other follows, so `vcpu=2` and `memory="8G"` are the same request. Anything
|
|
212
|
+
above your org's quota is refused, never quietly clamped.
|
|
213
|
+
|
|
214
|
+
A machine keeps the size it was created with, through stop/start, wake, and
|
|
215
|
+
migration alike. Changing it is an explicit call:
|
|
216
|
+
|
|
217
|
+
```python
|
|
218
|
+
result = boxd.machines.resize(id, memory="8G") # or vcpu=2
|
|
219
|
+
result.vcpu, result.memory_bytes # the size now persisted
|
|
220
|
+
result.rebooted # it was running, so it was rebooted
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
A **running** machine is rebooted to apply the new size: a cold boot, so the
|
|
224
|
+
disk survives and anything in RAM does not. A **stopped** machine takes it at
|
|
225
|
+
its next start. A suspended or hibernated machine is refused, because its
|
|
226
|
+
saved memory image is the old size — resume or wake it first.
|
|
227
|
+
|
|
228
|
+
A create that names no size uses the org default (see
|
|
229
|
+
[Organizations](#organizations-credentials-account)), and a fork always
|
|
230
|
+
inherits its source's size.
|
|
231
|
+
|
|
208
232
|
### The `Machine` record
|
|
209
233
|
|
|
210
234
|
```python
|
|
@@ -556,6 +580,23 @@ delegation is actually live, for the same reason as per-machine domains
|
|
|
556
580
|
above. A background check then verifies delegation and issues certs
|
|
557
581
|
automatically, then flips `status` to `"active"`.
|
|
558
582
|
|
|
583
|
+
An org also has a default machine size: what a `create` that names no size
|
|
584
|
+
gets. It is a preference *below* the quota, not the quota itself — the quota
|
|
585
|
+
stays the operator-owned ceiling and the per-request maximum. Setting or
|
|
586
|
+
clearing it requires org admin; reading it doesn't.
|
|
587
|
+
|
|
588
|
+
```python
|
|
589
|
+
boxd.orgs.set_machine_defaults("acme", vcpu=2) # or memory="8G"
|
|
590
|
+
d = boxd.orgs.get_machine_defaults("acme")
|
|
591
|
+
d.is_set # False = no default; the values
|
|
592
|
+
d.vcpu, d.memory_bytes # below are just the quota
|
|
593
|
+
d.ceiling_vcpu, d.ceiling_memory_bytes # the org quota
|
|
594
|
+
boxd.orgs.clear_machine_defaults("acme") # back to the quota
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
Only machines created afterwards are affected — every existing machine keeps
|
|
598
|
+
the size it was created with. Omit the org to target your home org.
|
|
599
|
+
|
|
559
600
|
```python
|
|
560
601
|
key = boxd.api_keys.create(
|
|
561
602
|
"ci",
|
|
@@ -60,11 +60,13 @@ from .models import (
|
|
|
60
60
|
MachineStatus,
|
|
61
61
|
Org,
|
|
62
62
|
OrgDomain,
|
|
63
|
+
OrgMachineDefaults,
|
|
63
64
|
OrgRef,
|
|
64
65
|
PauseResult,
|
|
65
66
|
Proxy,
|
|
66
67
|
ProxyEntry,
|
|
67
68
|
ProxyPortMode,
|
|
69
|
+
ResizeResult,
|
|
68
70
|
ResumeResult,
|
|
69
71
|
Secret,
|
|
70
72
|
Snapshot,
|
|
@@ -118,11 +120,13 @@ __all__ = [
|
|
|
118
120
|
"MachineStatus",
|
|
119
121
|
"Org",
|
|
120
122
|
"OrgDomain",
|
|
123
|
+
"OrgMachineDefaults",
|
|
121
124
|
"OrgRef",
|
|
122
125
|
"PauseResult",
|
|
123
126
|
"Proxy",
|
|
124
127
|
"ProxyEntry",
|
|
125
128
|
"ProxyPortMode",
|
|
129
|
+
"ResizeResult",
|
|
126
130
|
"ResumeResult",
|
|
127
131
|
"Secret",
|
|
128
132
|
"Snapshot",
|