Skip to content

Commit 0ef9266

Browse files
feat: Network manager
1 parent 9469ec9 commit 0ef9266

File tree

2 files changed

+22
-27
lines changed

2 files changed

+22
-27
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 18
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-7c27e323412e72166bce2de104f1bf82b57197e05b686e94cd81d07e288bd558.yml
3-
openapi_spec_hash: 4656d2b318d04a9fec0210897d76b505
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-2d26027dfc3e310d3004f117e7a2834be18bdb5054b034262b2caa4c69b78f79.yml
3+
openapi_spec_hash: 02e0e42393d3a95414878cdd23d1f5ad
44
config_hash: 35db4c99791f175865381f13a8ad6075

pkg/cmd/instance.go

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,28 @@ var instancesCreate = cli.Command{
1616
Name: "create",
1717
Usage: "Create and start instance",
1818
Flags: []cli.Flag{
19-
&cli.StringFlag{
20-
Name: "id",
21-
Usage: "Unique identifier for the instance (provided by caller)",
22-
},
2319
&cli.StringFlag{
2420
Name: "image",
25-
Usage: "Image identifier",
21+
Usage: "OCI image reference",
2622
},
2723
&cli.StringFlag{
2824
Name: "name",
29-
Usage: "Human-readable name",
25+
Usage: "Human-readable name (lowercase letters, digits, and dashes only; cannot start or end with a dash)",
3026
},
31-
&cli.Int64Flag{
32-
Name: "memory-max-mb",
33-
Usage: "Maximum memory with hotplug in MB",
34-
Value: 4096,
27+
&cli.StringFlag{
28+
Name: "hotplug-size",
29+
Usage: `Additional memory for hotplug (human-readable format like "3GB", "1G")`,
30+
Value: "3GB",
3531
},
36-
&cli.Int64Flag{
37-
Name: "memory-mb",
38-
Usage: "Base memory in MB",
39-
Value: 1024,
32+
&cli.StringFlag{
33+
Name: "overlay-size",
34+
Usage: `Writable overlay disk size (human-readable format like "10GB", "50G")`,
35+
Value: "10GB",
4036
},
41-
&cli.Int64Flag{
42-
Name: "timeout-seconds",
43-
Usage: "Timeout for scale-to-zero semantics",
44-
Value: 3600,
37+
&cli.StringFlag{
38+
Name: "size",
39+
Usage: `Base memory size (human-readable format like "1GB", "512MB", "2G")`,
40+
Value: "1GB",
4541
},
4642
&cli.Int64Flag{
4743
Name: "vcpus",
@@ -138,13 +134,12 @@ func handleInstancesCreate(ctx context.Context, cmd *cli.Command) error {
138134
}
139135
params := hypeman.InstanceNewParams{}
140136
if err := unmarshalStdinWithFlags(cmd, map[string]string{
141-
"id": "id",
142-
"image": "image",
143-
"name": "name",
144-
"memory-max-mb": "memory_max_mb",
145-
"memory-mb": "memory_mb",
146-
"timeout-seconds": "timeout_seconds",
147-
"vcpus": "vcpus",
137+
"image": "image",
138+
"name": "name",
139+
"hotplug-size": "hotplug_size",
140+
"overlay-size": "overlay_size",
141+
"size": "size",
142+
"vcpus": "vcpus",
148143
}, &params); err != nil {
149144
return err
150145
}

0 commit comments

Comments
 (0)