snapctl 0.43.2__py3-none-any.whl → 0.46.0__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.
Potentially problematic release.
This version of snapctl might be problematic. Click here for more details.
- snapctl/commands/byogs.py +37 -18
- snapctl/commands/byosnap.py +623 -222
- snapctl/commands/generate.py +3 -71
- snapctl/commands/release_notes.py +65 -0
- snapctl/commands/snapend.py +91 -76
- snapctl/config/constants.py +11 -9
- snapctl/config/hashes.py +18 -25
- snapctl/data/profiles/snapser-byosnap-profile.json +62 -0
- snapctl/data/profiles/snapser-byosnap-profile.yaml +54 -0
- snapctl/data/releases/beta-0.46.0.mdx +55 -0
- snapctl/main.py +81 -67
- {snapctl-0.43.2.dist-info → snapctl-0.46.0.dist-info}/METADATA +199 -98
- snapctl-0.46.0.dist-info/RECORD +27 -0
- snapctl-0.43.2.dist-info/RECORD +0 -23
- {snapctl-0.43.2.dist-info → snapctl-0.46.0.dist-info}/LICENSE +0 -0
- {snapctl-0.43.2.dist-info → snapctl-0.46.0.dist-info}/WHEEL +0 -0
- {snapctl-0.43.2.dist-info → snapctl-0.46.0.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "TODO: Add your BYOSnap name here. Name has to start with byosnap-. This is to ensure we avoid any collisions.",
|
|
3
|
+
"description": "TODO: Add your BYOSnap description here",
|
|
4
|
+
"platform": "TODO: Add your platform here. Options are 'linux/arm64' or 'linux/amd64'",
|
|
5
|
+
"language": "TODO: Add your language here. Options are 'go', 'node', 'python', 'java', 'csharp', 'cpp', 'rust', 'ruby', 'php', 'perl', 'clojure', 'lua', 'ts', 'js', 'kotlin', 'c'",
|
|
6
|
+
"prefix": "TODO: Add your prefix here. Prefix should start with / and only contain one path segment. Eg: '/v1'",
|
|
7
|
+
"ingress": {
|
|
8
|
+
"external_port": {
|
|
9
|
+
"name": "http",
|
|
10
|
+
"port": "TODO: Enter your external port here. Eg: 5003. Make sure it is a number and not a string."
|
|
11
|
+
},
|
|
12
|
+
"internal_ports": [
|
|
13
|
+
{
|
|
14
|
+
"name": "TODO: Optionally add your internal port name here. Eg: grpc. Names should be unique across the `ingress` dict. IMPORTANT: If you are not adding any internal ports, just keep `internal_ports: []`\",",
|
|
15
|
+
"port": "TODO: Optionally add your internal port here. Eg: 5004. Make sure it is a number and not a string. Port numbers should be unique across the `ingress` dict."
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"readiness_probe_config": {
|
|
20
|
+
"initial_delay_seconds": "TODO: Optionally add your readiness delay in seconds here. Eg: 5 or use null. Make sure it is a number and not a string.",
|
|
21
|
+
"path": "TODO: Optionally add your readiness path here. Eg: '/health' or use null"
|
|
22
|
+
},
|
|
23
|
+
"dev_template": {
|
|
24
|
+
"cpu": 100,
|
|
25
|
+
"memory": 0.125,
|
|
26
|
+
"min_replicas": 1,
|
|
27
|
+
"cmd": "",
|
|
28
|
+
"args": [],
|
|
29
|
+
"env_params": [
|
|
30
|
+
{
|
|
31
|
+
"key": "SNAPSER_ENVIRONMENT",
|
|
32
|
+
"value": "DEVELOPMENT"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"stage_template": {
|
|
37
|
+
"cpu": 100,
|
|
38
|
+
"memory": 0.125,
|
|
39
|
+
"min_replicas": 1,
|
|
40
|
+
"cmd": "",
|
|
41
|
+
"args": [],
|
|
42
|
+
"env_params": [
|
|
43
|
+
{
|
|
44
|
+
"key": "SNAPSER_ENVIRONMENT",
|
|
45
|
+
"value": "STAGING"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"prod_template": {
|
|
50
|
+
"cpu": 100,
|
|
51
|
+
"memory": 0.125,
|
|
52
|
+
"min_replicas": 2,
|
|
53
|
+
"cmd": "",
|
|
54
|
+
"args": [],
|
|
55
|
+
"env_params": [
|
|
56
|
+
{
|
|
57
|
+
"key": "SNAPSER_ENVIRONMENT",
|
|
58
|
+
"value": "PRODUCTION"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: "My BYOSnap" # TODO: Add your BYOSnap name here.
|
|
2
|
+
description: "Description" # TODO: Add your BYOSnap description here
|
|
3
|
+
platform: "linux/arm64" # TODO: Add your platform here. Options are 'linux/arm64' or 'linux/amd64'
|
|
4
|
+
language: "go" # TODO: Add your language here. Options are 'go', 'node', 'python', 'java', 'csharp', 'cpp', 'rust', 'ruby', 'php', 'perl', 'clojure', 'lua', 'ts', 'js', 'kotlin', 'c'
|
|
5
|
+
prefix: "/v1" # TODO: Add your prefix here. Prefix should start with / and only contain one path segment. Eg: '/v1'
|
|
6
|
+
ingress:
|
|
7
|
+
external_port:
|
|
8
|
+
name: http
|
|
9
|
+
port: 5003 # TODO: Enter your external port here. Eg: 5003. Make sure it is a number and not a string.
|
|
10
|
+
internal_ports: []
|
|
11
|
+
# Uncomment the section below if you need internal ports
|
|
12
|
+
# internal_ports:
|
|
13
|
+
# - name: "grpc" # TODO: Optionally add your internal port name here. Eg: grpc. Names should be unique across the `ingress` dict. IMPORTANT: If you are not adding any internal ports, just keep `internal_ports: []`
|
|
14
|
+
# port: 5004 # TODO: Optionally add your internal port here. Eg: 5004. Make sure it is a number and not a string. Port numbers should be unique across the `ingress` dict.
|
|
15
|
+
readiness_probe_config:
|
|
16
|
+
initial_delay_seconds: null
|
|
17
|
+
path: null
|
|
18
|
+
# Uncomment the section below if you need a readiness probe
|
|
19
|
+
# readiness_probe_config:
|
|
20
|
+
# initial_delay_seconds: 5 # "TODO: Optionally add your readiness delay in seconds here. Eg: 5 or use null. Make sure it is a number and not a string."
|
|
21
|
+
# path: '/healthz' # "TODO: Optionally add your readiness path here. Eg: '/health' or use null"
|
|
22
|
+
dev_template:
|
|
23
|
+
cpu: 100 # Options are [100, 250, 500, 750, 1000, 1500, 2000, 3000]
|
|
24
|
+
memory: 0.125 # Options are [0.125, 0.25, 0.5, 1, 2, 3, 4]
|
|
25
|
+
min_replicas: 1 # In Dev min_replicas should be 1
|
|
26
|
+
cmd: "" # TODO: Optionally add your dev command here. Eg: "python3 app.py" or use an empty string
|
|
27
|
+
args: [] # TODO: Optionally add your dev args here. Eg: ["--port", "5003"] or use an empty array
|
|
28
|
+
env_params: [] # TODO: Optionally add your dev env params here. Eg: [{"key": "SNAPSER_ENVIRONMENT", "value": "DEVELOPMENT"}] or use an empty array
|
|
29
|
+
# Uncomment the section below if you need dev env params
|
|
30
|
+
# env_params:
|
|
31
|
+
# - key: SNAPSER_ENVIRONMENT
|
|
32
|
+
# value: DEVELOPMENT
|
|
33
|
+
stage_template:
|
|
34
|
+
cpu: 100 # Options are [100, 250, 500, 750, 1000, 1500, 2000, 3000]
|
|
35
|
+
memory: 0.125 # Options are [0.125, 0.25, 0.5, 1, 2, 3, 4]
|
|
36
|
+
min_replicas: 1 # In Staging min_replicas should be 1
|
|
37
|
+
cmd: "" # TODO: Optionally add your dev command here. Eg: "python3 app.py" or use an empty string
|
|
38
|
+
args: [] # TODO: Optionally add your dev args here. Eg: ["--port", "5003"] or use an empty array
|
|
39
|
+
env_params: [] # TODO: Optionally add your dev env params here. Eg: [{"key": "SNAPSER_ENVIRONMENT", "value": "STAGING"}] or use an empty array
|
|
40
|
+
# Uncomment the section below if you need dev env params
|
|
41
|
+
# env_params:
|
|
42
|
+
# - key: SNAPSER_ENVIRONMENT
|
|
43
|
+
# value: STAGING
|
|
44
|
+
prod_template:
|
|
45
|
+
cpu: 100 # Options are [100, 250, 500, 750, 1000, 1500, 2000, 3000]
|
|
46
|
+
memory: 0.125 # Options are [0.125, 0.25, 0.5, 1, 2, 3, 4]
|
|
47
|
+
min_replicas: 1 # Options are [1, 2, 3, 4]
|
|
48
|
+
cmd: "" # TODO: Optionally add your dev command here. Eg: "python3 app.py" or use an empty string
|
|
49
|
+
args: [] # TODO: Optionally add your dev args here. Eg: ["--port", "5003"] or use an empty array
|
|
50
|
+
env_params: [] # TODO: Optionally add your dev env params here. Eg: [{"key": "SNAPSER_ENVIRONMENT", "value": "PRODUCTION"}] or use an empty array
|
|
51
|
+
# Uncomment the section below if you need dev env params
|
|
52
|
+
# env_params:
|
|
53
|
+
# - key: SNAPSER_ENVIRONMENT
|
|
54
|
+
# value: PRODUCTION
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
## beta-0.46.0
|
|
2
|
+
##### Feb 14, 2025
|
|
3
|
+
|
|
4
|
+
### Breaking Changes
|
|
5
|
+
- **BYOSnap**:
|
|
6
|
+
- BYOSnap commands like `publish`, `sync` and `upload-docs` now take BYOSnap ID as a
|
|
7
|
+
non-positional argument. You now have to pass the BYOSnap Id using `--byosnap-id`.
|
|
8
|
+
```bash
|
|
9
|
+
# Previously
|
|
10
|
+
snapctl byosnap publish byosnap-jinks-flask --version "v0.0.1" --path $path
|
|
11
|
+
|
|
12
|
+
# New
|
|
13
|
+
snapctl byosnap publish --byosnap-id byosnap-jinks-flask --version "v0.0.1" --path $path
|
|
14
|
+
```
|
|
15
|
+
- BYOSnap input parameter `--byosnap-profile-file` has been renamed to `--profile-filename`
|
|
16
|
+
|
|
17
|
+
- **Generate**: The ability to generate a base BYOSnap profile using the `generate` command has
|
|
18
|
+
been deprecated. Instead its moved under `byosnap` commands for consistency.
|
|
19
|
+
|
|
20
|
+
- **Snapend**:
|
|
21
|
+
- The manifest path variable has been changed for Snapend commands like `apply` and `clone`
|
|
22
|
+
from `--manifest-path` to `--manifest-path-filename`, for consistency with our new
|
|
23
|
+
variable naming nomenclature.
|
|
24
|
+
- The Snapend download command has new variable names like `format` and `type`. This is to add
|
|
25
|
+
more consistency and clarity to the command.
|
|
26
|
+
```bash
|
|
27
|
+
# Previously
|
|
28
|
+
# snapctl snapend download --snapend-id gx5x6bc0 --category sdk --type unity --sdk-access-type external --sdk-auth-type user --out-path .
|
|
29
|
+
|
|
30
|
+
# New
|
|
31
|
+
snapctl snapend download --snapend-id gx5x6bc0 --category sdk --format unity --type user --out-path .
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
- Input param `--docker` for BYOGS and BYOSnap commands has been changed to `--docker_filename`
|
|
35
|
+
|
|
36
|
+
### New Commands
|
|
37
|
+
- **BYOSnap Generate Profile**: You can now use a new command to generate a base BYOSnap profile.
|
|
38
|
+
```bash
|
|
39
|
+
snapctl byosnap generate-profile --out-path $outputPath --profile-filename $profileName
|
|
40
|
+
```
|
|
41
|
+
- **BYOSnap Validate Profile**: After you hand edit the base BYOSnap profile, you can use this
|
|
42
|
+
command to validate your BYOSnap profile before using it in other commands like `publish` and `sync`
|
|
43
|
+
```bash
|
|
44
|
+
snapctl byosnap validate-profile --path $path --profile-filename $profileName
|
|
45
|
+
# or
|
|
46
|
+
snapctl byosnap validate-profile --resources-path $resources_path --profile-filename $profileName
|
|
47
|
+
```
|
|
48
|
+
- **Release Notes**: You can now view release notes for a specific version of Snapctl using the
|
|
49
|
+
`release-notes` command.
|
|
50
|
+
```bash
|
|
51
|
+
snapctl release-notes releases
|
|
52
|
+
snapctl release-notes show
|
|
53
|
+
# or
|
|
54
|
+
snapctl release-notes show --version $version
|
|
55
|
+
```
|
snapctl/main.py
CHANGED
|
@@ -13,9 +13,10 @@ from snapctl.commands.byogs import ByoGs
|
|
|
13
13
|
from snapctl.commands.game import Game
|
|
14
14
|
from snapctl.commands.generate import Generate
|
|
15
15
|
from snapctl.commands.snapend import Snapend
|
|
16
|
+
from snapctl.commands.release_notes import ReleaseNotes
|
|
16
17
|
from snapctl.config.constants import COMPANY_NAME, API_KEY, URL_KEY, CONFIG_FILE_MAC, \
|
|
17
18
|
CONFIG_FILE_WIN, DEFAULT_PROFILE, VERSION, SNAPCTL_SUCCESS, CONFIG_PATH_KEY, \
|
|
18
|
-
SNAPCTL_CONFIGURATION_INCORRECT
|
|
19
|
+
SNAPCTL_CONFIGURATION_INCORRECT, VERSION_PREFIX
|
|
19
20
|
from snapctl.config.endpoints import END_POINTS
|
|
20
21
|
from snapctl.config.hashes import PROTOS_TYPES, SERVICE_IDS, \
|
|
21
22
|
SNAPEND_MANIFEST_TYPES, SDK_TYPES
|
|
@@ -224,7 +225,7 @@ def validate(
|
|
|
224
225
|
None, "--api-key", help="API Key override.", callback=api_key_context_callback
|
|
225
226
|
),
|
|
226
227
|
profile: Union[str, None] = typer.Option(
|
|
227
|
-
None, "--profile", help="Profile to use.", callback=profile_context_callback
|
|
228
|
+
None, "--profile", help="Profile from the Snapser config to use.", callback=profile_context_callback
|
|
228
229
|
),
|
|
229
230
|
) -> None:
|
|
230
231
|
"""
|
|
@@ -236,6 +237,34 @@ def validate(
|
|
|
236
237
|
raise typer.Exit(code=SNAPCTL_SUCCESS)
|
|
237
238
|
|
|
238
239
|
|
|
240
|
+
@app.command()
|
|
241
|
+
def release_notes(
|
|
242
|
+
ctx: typer.Context,
|
|
243
|
+
subcommand: str = typer.Argument(
|
|
244
|
+
..., help="Release Notes Subcommands: " + ", ".join(ReleaseNotes.SUBCOMMANDS) + "."
|
|
245
|
+
),
|
|
246
|
+
version: str = typer.Option(
|
|
247
|
+
VERSION_PREFIX + VERSION, help="(optional: show-version) If not passed will show the latest version."
|
|
248
|
+
),
|
|
249
|
+
api_key: Union[str, None] = typer.Option(
|
|
250
|
+
None, "--api-key", help="API Key override.", callback=api_key_context_callback
|
|
251
|
+
),
|
|
252
|
+
profile: Union[str, None] = typer.Option(
|
|
253
|
+
None, "--profile", help="Profile from the Snapser config to use.", callback=profile_context_callback
|
|
254
|
+
),
|
|
255
|
+
) -> None:
|
|
256
|
+
"""
|
|
257
|
+
Release notes for Snapctl
|
|
258
|
+
"""
|
|
259
|
+
validate_command_context(ctx)
|
|
260
|
+
release_notes_obj: ReleaseNotes = ReleaseNotes(
|
|
261
|
+
subcommand=subcommand,
|
|
262
|
+
version=version
|
|
263
|
+
)
|
|
264
|
+
getattr(release_notes_obj, subcommand.replace('-', '_'))()
|
|
265
|
+
raise typer.Exit(code=SNAPCTL_SUCCESS)
|
|
266
|
+
|
|
267
|
+
|
|
239
268
|
@app.command()
|
|
240
269
|
def byogs(
|
|
241
270
|
ctx: typer.Context,
|
|
@@ -243,10 +272,6 @@ def byogs(
|
|
|
243
272
|
subcommand: str = typer.Argument(
|
|
244
273
|
..., help="BYOGs Subcommands: " + ", ".join(ByoGs.SUBCOMMANDS) + "."
|
|
245
274
|
),
|
|
246
|
-
# sid: str = typer.Argument(
|
|
247
|
-
# ByoGs.SID, help="Game Server Id. Should start with byogs"
|
|
248
|
-
# ),
|
|
249
|
-
# publish, publish-image and publish-version
|
|
250
275
|
tag: str = typer.Option(
|
|
251
276
|
None, "--tag",
|
|
252
277
|
help="(req: build, push, publish) Tag for your snap"
|
|
@@ -258,7 +283,7 @@ def byogs(
|
|
|
258
283
|
resources_path: Union[str, None] = typer.Option(
|
|
259
284
|
None, "--resources-path", help="(optional: publish) Path to resources such as your Dockerfile, swagger.json or README.md"
|
|
260
285
|
),
|
|
261
|
-
|
|
286
|
+
docker_filename: str = typer.Option(
|
|
262
287
|
"Dockerfile", help="(optional: publish) Dockerfile name to use"
|
|
263
288
|
),
|
|
264
289
|
skip_build: bool = typer.Option(
|
|
@@ -284,7 +309,7 @@ def byogs(
|
|
|
284
309
|
None, "--api-key", help="API Key override.", callback=api_key_context_callback
|
|
285
310
|
),
|
|
286
311
|
profile: Union[str, None] = typer.Option(
|
|
287
|
-
None, "--profile", help="Profile to use.", callback=profile_context_callback
|
|
312
|
+
None, "--profile", help="Profile from the Snapser config to use.", callback=profile_context_callback
|
|
288
313
|
),
|
|
289
314
|
) -> None:
|
|
290
315
|
"""
|
|
@@ -298,7 +323,7 @@ def byogs(
|
|
|
298
323
|
tag=tag,
|
|
299
324
|
path=path,
|
|
300
325
|
resources_path=resources_path,
|
|
301
|
-
|
|
326
|
+
docker_filename=docker_filename,
|
|
302
327
|
skip_build=skip_build,
|
|
303
328
|
snapend_id=snapend_id,
|
|
304
329
|
fleet_names=fleet_names,
|
|
@@ -314,9 +339,11 @@ def byosnap(
|
|
|
314
339
|
ctx: typer.Context,
|
|
315
340
|
# Required fields
|
|
316
341
|
subcommand: str = typer.Argument(
|
|
317
|
-
..., help="BYOSnap Subcommands: " + ", ".join(ByoSnap.
|
|
342
|
+
..., help="BYOSnap Subcommands: " + ", ".join(ByoSnap.SHOW_SUBCOMMANDS) + ". Commands to be deprecated soon: " + ", ".join(ByoSnap.TO_DEPRECATE_SUBCOMMANDS) + "."
|
|
343
|
+
),
|
|
344
|
+
byosnap_id: Union[str, None] = typer.Option(
|
|
345
|
+
None, "--byosnap-id", help="(req: 'publish', 'sync', 'upload-docs', 'create', 'publish-image', 'publish-version', 'update-version') BYOSnap Id. Should start with byosnap-"
|
|
318
346
|
),
|
|
319
|
-
sid: str = typer.Argument(..., help="Snap Id. Should start with byosnap-"),
|
|
320
347
|
# publish
|
|
321
348
|
path: Union[str, None] = typer.Option(
|
|
322
349
|
None, "--path", help="(req: publish, sync, publish-image, publish-version) Path to your snap code"
|
|
@@ -350,35 +377,40 @@ def byosnap(
|
|
|
350
377
|
),
|
|
351
378
|
platform_type: str = typer.Option(
|
|
352
379
|
None, "--platform",
|
|
353
|
-
help="(req: create) Platform for your snap - " +
|
|
380
|
+
help="(req: create) Platform for your snap - " +
|
|
354
381
|
", ".join(ByoSnap.PLATFORMS) + "."
|
|
355
382
|
),
|
|
356
383
|
language: str = typer.Option(
|
|
357
384
|
None, "--language",
|
|
358
|
-
help="(req: create) Language of your snap - " +
|
|
385
|
+
help="(req: create) Language of your snap - " +
|
|
359
386
|
", ".join(ByoSnap.LANGUAGES) + "."
|
|
360
387
|
),
|
|
361
388
|
# publish-image and publish-version
|
|
362
389
|
tag: str = typer.Option(
|
|
363
390
|
None, "--tag", help=(
|
|
364
|
-
"(req: publish-image, publish-version) Tag for your snap"
|
|
391
|
+
"(req: publish-image, publish-version, upload-docs) Tag for your snap"
|
|
365
392
|
)
|
|
366
393
|
),
|
|
367
394
|
# overrides
|
|
368
395
|
skip_build: bool = typer.Option(
|
|
369
396
|
False, "--skip-build", help="(optional: publish-image, sync) Skip the build step. You have to pass the image tag you used during the build step."
|
|
370
397
|
),
|
|
371
|
-
|
|
398
|
+
docker_filename: str = typer.Option(
|
|
372
399
|
"Dockerfile", help="(optional override: publish, sync) Dockerfile name to use"
|
|
373
400
|
),
|
|
374
|
-
|
|
375
|
-
"snapser-byosnap-profile.json", "--
|
|
401
|
+
profile_filename: str = typer.Option(
|
|
402
|
+
"snapser-byosnap-profile.json", "--profile-filename", help="(req: generate-profile, validate-profile) (optional override: publish, publish-version) BYOSnap Profile is picked up via the --path or the --resources-path. This allows you to override the default profile filename."
|
|
403
|
+
),
|
|
404
|
+
out_path: Union[str, None] = typer.Option(
|
|
405
|
+
None, "--out-path", help=(
|
|
406
|
+
"(req: generate-profile) Path to output the byosnap profile"
|
|
407
|
+
)
|
|
376
408
|
),
|
|
377
409
|
api_key: Union[str, None] = typer.Option(
|
|
378
410
|
None, "--api-key", help="(optional override) API Key override.", callback=api_key_context_callback
|
|
379
411
|
),
|
|
380
412
|
profile: Union[str, None] = typer.Option(
|
|
381
|
-
None, "--profile", help="(optional override) Profile to use.", callback=profile_context_callback
|
|
413
|
+
None, "--profile", help="(optional override) Profile from the Snapser config to use.", callback=profile_context_callback
|
|
382
414
|
),
|
|
383
415
|
) -> None:
|
|
384
416
|
"""
|
|
@@ -389,7 +421,7 @@ def byosnap(
|
|
|
389
421
|
subcommand=subcommand,
|
|
390
422
|
base_url=ctx.obj['base_url'],
|
|
391
423
|
api_key=ctx.obj['api_key'],
|
|
392
|
-
|
|
424
|
+
byosnap_id=byosnap_id,
|
|
393
425
|
name=name,
|
|
394
426
|
desc=desc,
|
|
395
427
|
platform_type=platform_type,
|
|
@@ -397,12 +429,13 @@ def byosnap(
|
|
|
397
429
|
tag=tag,
|
|
398
430
|
path=path,
|
|
399
431
|
resources_path=resources_path,
|
|
400
|
-
|
|
432
|
+
docker_filename=docker_filename,
|
|
401
433
|
version=version,
|
|
402
434
|
skip_build=skip_build,
|
|
403
435
|
snapend_id=snapend_id,
|
|
404
436
|
blocking=blocking,
|
|
405
|
-
|
|
437
|
+
profile_filename=profile_filename,
|
|
438
|
+
out_path=out_path
|
|
406
439
|
)
|
|
407
440
|
getattr(byosnap_obj, subcommand.replace('-', '_'))()
|
|
408
441
|
success(f"BYOSnap {subcommand} complete")
|
|
@@ -426,7 +459,7 @@ def game(
|
|
|
426
459
|
None, "--api-key", help="API Key override.", callback=api_key_context_callback
|
|
427
460
|
),
|
|
428
461
|
profile: Union[str, None] = typer.Option(
|
|
429
|
-
None, "--profile", help="Profile to use.", callback=profile_context_callback
|
|
462
|
+
None, "--profile", help="Profile from the Snapser config to use.", callback=profile_context_callback
|
|
430
463
|
),
|
|
431
464
|
) -> None:
|
|
432
465
|
"""
|
|
@@ -450,26 +483,20 @@ def generate(
|
|
|
450
483
|
# Required fields
|
|
451
484
|
subcommand: str = typer.Argument(
|
|
452
485
|
..., help=(
|
|
453
|
-
"Generate Subcommands: " +
|
|
454
|
-
", ".join(Generate.SUBCOMMANDS) + "."
|
|
455
|
-
"Deprecation Notice: " + \
|
|
456
|
-
",".join(Generate.DEPRECATED_SOON_SUBCOMMANDS) + \
|
|
457
|
-
" will be deprecated soon. "
|
|
458
|
-
"Use `snapctl generate profile --category byosnap --out-path <output_path>` command instead."
|
|
486
|
+
"Generate Subcommands: " +
|
|
487
|
+
", ".join(Generate.SUBCOMMANDS) + "."
|
|
459
488
|
)
|
|
460
489
|
),
|
|
461
490
|
category: Union[str, None] = typer.Option(
|
|
462
491
|
None, "--category",
|
|
463
492
|
help=(
|
|
464
|
-
"(req:
|
|
465
|
-
|
|
466
|
-
") (token: " + ", ".join(Generate.CATEGORIES['credentials']) + ')'
|
|
493
|
+
"(req: token) (token: " +
|
|
494
|
+
", ".join(Generate.CATEGORIES['credentials']) + ')'
|
|
467
495
|
)
|
|
468
496
|
),
|
|
469
|
-
# byosnap-profile, profile
|
|
470
497
|
out_path: Union[str, None] = typer.Option(
|
|
471
498
|
None, "--out-path", help=(
|
|
472
|
-
"(req:
|
|
499
|
+
"(req: token) Path to output the byosnap profile"
|
|
473
500
|
)
|
|
474
501
|
),
|
|
475
502
|
# overrides
|
|
@@ -477,7 +504,7 @@ def generate(
|
|
|
477
504
|
None, "--api-key", help="API Key override.", callback=api_key_context_callback
|
|
478
505
|
),
|
|
479
506
|
profile: Union[str, None] = typer.Option(
|
|
480
|
-
None, "--profile", help="Profile to use.", callback=profile_context_callback
|
|
507
|
+
None, "--profile", help="Profile from the Snapser config to use.", callback=profile_context_callback
|
|
481
508
|
),
|
|
482
509
|
) -> None:
|
|
483
510
|
"""
|
|
@@ -514,9 +541,9 @@ def snapend(
|
|
|
514
541
|
help="(req: enumerate, clone) Game Id"
|
|
515
542
|
),
|
|
516
543
|
# apply, clone
|
|
517
|
-
|
|
518
|
-
None, "--manifest-path",
|
|
519
|
-
help="(req: apply|clone) Path to the manifest file"
|
|
544
|
+
manifest_path_filename: str = typer.Option(
|
|
545
|
+
None, "--manifest-path-filename",
|
|
546
|
+
help="(req: apply|clone) Full Path to the manifest file including the filename."
|
|
520
547
|
),
|
|
521
548
|
# download
|
|
522
549
|
category: str = typer.Option(
|
|
@@ -526,35 +553,22 @@ def snapend(
|
|
|
526
553
|
", ".join(Snapend.DOWNLOAD_CATEGORY) + "."
|
|
527
554
|
)
|
|
528
555
|
),
|
|
529
|
-
|
|
530
|
-
|
|
556
|
+
category_format: str = typer.Option(
|
|
557
|
+
None, "--format",
|
|
531
558
|
help=(
|
|
532
|
-
"(
|
|
533
|
-
"
|
|
534
|
-
)
|
|
535
|
-
),
|
|
536
|
-
sdk_auth_type: str = typer.Option(
|
|
537
|
-
None, "--sdk-auth-type",
|
|
538
|
-
help=(
|
|
539
|
-
"(optional: download) Only applicable for --category sdk --sdk-access-type external "
|
|
540
|
-
"Auth-Types: (" + ", ".join(Snapend.AUTH_TYPES) + ")"
|
|
541
|
-
)
|
|
542
|
-
),
|
|
543
|
-
platform_type: str = typer.Option(
|
|
544
|
-
None, "--type",
|
|
545
|
-
help=(
|
|
546
|
-
"(req: --category sdk|protos|snapend-manifest --type ) "
|
|
547
|
-
"SDK Types: sdk(" + ", ".join(SDK_TYPES.keys()) +
|
|
559
|
+
"(req: --category sdk|protos|snapend-manifest --format ) "
|
|
560
|
+
"SDK Formats: sdk(" + ", ".join(SDK_TYPES.keys()) +
|
|
548
561
|
") protos(" + ", ".join(PROTOS_TYPES.keys()) + ")" +
|
|
549
|
-
") snapend-manifest(" +
|
|
562
|
+
") snapend-manifest(" +
|
|
550
563
|
", ".join(SNAPEND_MANIFEST_TYPES.keys()) + ")"
|
|
551
564
|
)
|
|
552
565
|
),
|
|
553
|
-
|
|
554
|
-
|
|
566
|
+
category_type: str = typer.Option(
|
|
567
|
+
None, "--type",
|
|
555
568
|
help=(
|
|
556
|
-
"(optional: download) Only applicable for --category protos --
|
|
557
|
-
"
|
|
569
|
+
"(optional: download) Only applicable for --category sdk|protos --type"
|
|
570
|
+
"Sdk-types: (" + ", ".join(Snapend.CATEGORY_TYPE_SDK) + ")"
|
|
571
|
+
"Protos-types: (" + ", ".join(Snapend.CATEGORY_TYPE_PROTOS) + ")"
|
|
558
572
|
)
|
|
559
573
|
),
|
|
560
574
|
snaps: Union[str, None] = typer.Option(
|
|
@@ -587,8 +601,8 @@ def snapend(
|
|
|
587
601
|
byogs_list: str = typer.Option(
|
|
588
602
|
None, "--byogs",
|
|
589
603
|
help=(
|
|
590
|
-
"(optional: update) Comma separated list of BYOGs
|
|
591
|
-
"Eg: fleet-1:
|
|
604
|
+
"(optional: update) Comma separated list of BYOGs fleet_name:tag. "
|
|
605
|
+
"Eg: fleet-1:v1.0.0,fleet-2:v1.0.0"
|
|
592
606
|
)
|
|
593
607
|
),
|
|
594
608
|
# create, update, promote, apply, clone
|
|
@@ -604,7 +618,7 @@ def snapend(
|
|
|
604
618
|
None, "--api-key", help="API Key override.", callback=api_key_context_callback
|
|
605
619
|
),
|
|
606
620
|
profile: Union[str, None] = typer.Option(
|
|
607
|
-
None, "--profile", help="Profile to use.", callback=profile_context_callback
|
|
621
|
+
None, "--profile", help="Profile from the Snapser config to use.", callback=profile_context_callback
|
|
608
622
|
),
|
|
609
623
|
) -> None:
|
|
610
624
|
"""
|
|
@@ -621,11 +635,11 @@ def snapend(
|
|
|
621
635
|
# Clone
|
|
622
636
|
name=name, env=env,
|
|
623
637
|
# Apply, Clone
|
|
624
|
-
|
|
638
|
+
manifest_path_filename=manifest_path_filename,
|
|
625
639
|
# Download
|
|
626
|
-
category=category,
|
|
627
|
-
|
|
628
|
-
|
|
640
|
+
category=category,
|
|
641
|
+
category_format=category_format,
|
|
642
|
+
category_type=category_type,
|
|
629
643
|
snaps=snaps,
|
|
630
644
|
# Download, Apply and Clone
|
|
631
645
|
out_path=out_path,
|