snapctl 0.31.1__tar.gz → 0.32.1__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.
Potentially problematic release.
This version of snapctl might be problematic. Click here for more details.
- snapctl-0.32.1/LICENSE +29 -0
- {snapctl-0.31.1 → snapctl-0.32.1}/PKG-INFO +100 -70
- {snapctl-0.31.1 → snapctl-0.32.1}/README.md +96 -68
- {snapctl-0.31.1 → snapctl-0.32.1}/pyproject.toml +4 -2
- snapctl-0.32.1/snapctl/commands/byogs.py +319 -0
- snapctl-0.32.1/snapctl/commands/byosnap.py +653 -0
- snapctl-0.32.1/snapctl/commands/game.py +113 -0
- snapctl-0.32.1/snapctl/commands/generate.py +93 -0
- snapctl-0.32.1/snapctl/commands/snapend.py +691 -0
- snapctl-0.32.1/snapctl/config/constants.py +91 -0
- {snapctl-0.31.1 → snapctl-0.32.1}/snapctl/config/hashes.py +14 -0
- {snapctl-0.31.1 → snapctl-0.32.1}/snapctl/main.py +106 -124
- snapctl-0.32.1/snapctl/types/definitions.py +28 -0
- {snapctl-0.31.1 → snapctl-0.32.1}/snapctl/utils/echo.py +10 -2
- snapctl-0.32.1/snapctl/utils/helper.py +95 -0
- snapctl-0.31.1/snapctl/commands/byogs.py +0 -493
- snapctl-0.31.1/snapctl/commands/byosnap.py +0 -571
- snapctl-0.31.1/snapctl/commands/game.py +0 -107
- snapctl-0.31.1/snapctl/commands/snapend.py +0 -611
- snapctl-0.31.1/snapctl/config/constants.py +0 -27
- snapctl-0.31.1/snapctl/types/definitions.py +0 -12
- snapctl-0.31.1/snapctl/utils/helper.py +0 -38
- {snapctl-0.31.1 → snapctl-0.32.1}/snapctl/__init__.py +0 -0
- {snapctl-0.31.1 → snapctl-0.32.1}/snapctl/__main__.py +0 -0
- {snapctl-0.31.1 → snapctl-0.32.1}/snapctl/commands/__init__.py +0 -0
- {snapctl-0.31.1 → snapctl-0.32.1}/snapctl/config/__init__.py +0 -0
- {snapctl-0.31.1 → snapctl-0.32.1}/snapctl/config/endpoints.py +0 -0
- {snapctl-0.31.1 → snapctl-0.32.1}/snapctl/types/__init__.py +0 -0
- {snapctl-0.31.1 → snapctl-0.32.1}/snapctl/utils/__init__.py +0 -0
snapctl-0.32.1/LICENSE
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Snapser Inc. Proprietary License
|
|
2
|
+
|
|
3
|
+
This CLI tool, its source code, and any accompanying documentation (collectively referred to as the "Software") are the property of Snapser Inc. ("Snapser"). The Software is provided under the following license terms and conditions:
|
|
4
|
+
|
|
5
|
+
1. License Grant:
|
|
6
|
+
Snapser grants you a non-exclusive, non-transferable, revocable license to use the Software solely for your internal business purposes. You may not distribute, sublicense, rent, lease, sell, or otherwise transfer the Software or any portion thereof.
|
|
7
|
+
|
|
8
|
+
2. Restrictions:
|
|
9
|
+
You may not modify, adapt, translate, reverse engineer, decompile, disassemble, or create derivative works based on the Software. You may not remove or alter any copyright, trademark, or other proprietary rights notices contained in the Software.
|
|
10
|
+
|
|
11
|
+
3. Ownership:
|
|
12
|
+
The Software and all intellectual property rights therein are and shall remain the exclusive property of Snapser Inc. Nothing in this license agreement shall be construed to transfer ownership of the Software to you.
|
|
13
|
+
|
|
14
|
+
4. Term and Termination:
|
|
15
|
+
This license is effective until terminated by either party. Snapser may terminate this license at any time if you breach any of its terms and conditions. Upon termination, you must immediately cease all use of the Software and destroy all copies thereof.
|
|
16
|
+
|
|
17
|
+
5. Disclaimer of Warranty:
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, SNAPSER DISCLAIMS ALL WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. SNAPSER DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE.
|
|
19
|
+
|
|
20
|
+
6. Limitation of Liability:
|
|
21
|
+
IN NO EVENT SHALL SNAPSER BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION, LOSS OF INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF SNAPSER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
22
|
+
|
|
23
|
+
7. Governing Law:
|
|
24
|
+
This license agreement shall be governed by and construed in accordance with the laws of the United States of America, excluding its conflicts of law principles. Any disputes arising out of or in connection with this agreement shall be subject to the exclusive jurisdiction of the courts located in the United States of America.
|
|
25
|
+
|
|
26
|
+
By using the Software, you agree to be bound by the terms and conditions of this license agreement. If you do not agree to these terms and conditions, do not use the Software.
|
|
27
|
+
|
|
28
|
+
Snapser Inc.
|
|
29
|
+
June 4, 2024
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: snapctl
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.32.1
|
|
4
4
|
Summary: Snapser CLI Tool
|
|
5
5
|
Author: Ajinkya Apte
|
|
6
6
|
Author-email: aj@snapser.com
|
|
@@ -11,8 +11,10 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.12
|
|
12
12
|
Requires-Dist: configparser (>=6.0.0,<7.0.0)
|
|
13
13
|
Requires-Dist: pyfiglet (>=1.0.2,<2.0.0)
|
|
14
|
+
Requires-Dist: pytest (>=8.2.2,<9.0.0)
|
|
15
|
+
Requires-Dist: pytest-mock (>=3.14.0,<4.0.0)
|
|
14
16
|
Requires-Dist: requests (>=2.28.2,<3.0.0)
|
|
15
|
-
Requires-Dist: typer[all] (>=0.
|
|
17
|
+
Requires-Dist: typer[all] (>=0.12.3,<0.13.0)
|
|
16
18
|
Description-Content-Type: text/markdown
|
|
17
19
|
|
|
18
20
|
# Snapser CLI Tool
|
|
@@ -244,16 +246,16 @@ snapctl byosnap push $byosnap_sid --tag $image_tag
|
|
|
244
246
|
Upload swagger.json and README.md for you Snap
|
|
245
247
|
|
|
246
248
|
```
|
|
247
|
-
# Help for the
|
|
249
|
+
# Help for the byosnap command
|
|
248
250
|
snapctl byosnap upload-docs --help
|
|
249
251
|
|
|
250
252
|
# Publish a new image
|
|
251
|
-
# $
|
|
253
|
+
# $byosnap_sid = Snap ID for your snap
|
|
252
254
|
# $image_tag = An image tag for your snap
|
|
253
255
|
# $code_root_path = Local code path where your swagger.json and README.md files are present
|
|
254
256
|
# Example:
|
|
255
257
|
# snapctl byosnap upload-docs byosnap-jinks-flask --tag my-first-image --path /Users/DevName/Development/SnapserEngine/jinks_flask
|
|
256
|
-
snapctl byosnap upload-docs $
|
|
258
|
+
snapctl byosnap upload-docs $byosnap_sid --tag $image_tag --path $code_root_path
|
|
257
259
|
```
|
|
258
260
|
|
|
259
261
|
#### 6. byosnap publish-image
|
|
@@ -305,28 +307,7 @@ See all the supported commands
|
|
|
305
307
|
snapctl byogs --help
|
|
306
308
|
```
|
|
307
309
|
|
|
308
|
-
#### 2.
|
|
309
|
-
|
|
310
|
-
Create a custom game server. Note that you will have to build, push and publish your game server image, for it to be useable
|
|
311
|
-
in a Snapend fleet.
|
|
312
|
-
|
|
313
|
-
```
|
|
314
|
-
# Help for the byosnap command
|
|
315
|
-
snapctl byogs create --help
|
|
316
|
-
|
|
317
|
-
# Create a new snap
|
|
318
|
-
# $byogs_sid = Game server ID for your snap. Should start with `byogs-`
|
|
319
|
-
# $name = User friendly name for your BYOGs
|
|
320
|
-
# $desc = User friendly description
|
|
321
|
-
# $platform = Currently only supported platform is linux/amd64
|
|
322
|
-
# $language = One of go, python, ruby, c#, c++, rust, java, node
|
|
323
|
-
|
|
324
|
-
# Example:
|
|
325
|
-
# snapctl byogs create byosnap-jinks-gs --name "Jinks Flask Microservice" --desc "Custom Microservice" --platform "linux/arm64" --language "go"
|
|
326
|
-
snapctl byogs create $byogs_sid --name "$name" --desc "$desc" --platform "$platform" --language "$language"
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
#### 3. byogs build
|
|
310
|
+
#### 2. byogs build
|
|
330
311
|
|
|
331
312
|
Build your custom game server image.
|
|
332
313
|
|
|
@@ -335,15 +316,14 @@ Build your custom game server image.
|
|
|
335
316
|
snapctl byogs build --help
|
|
336
317
|
|
|
337
318
|
# Publish a new image
|
|
338
|
-
# $byogs_sid = Game server ID for your snap
|
|
339
319
|
# $image_tag = An image tag for your snap
|
|
340
320
|
# $code_root_path = Local code path where your Dockerfile is present
|
|
341
321
|
# Example:
|
|
342
322
|
# snapctl byogs build byosnap-jinks-gs --tag my-first-image --path /Users/DevName/Development/SnapserEngine/game_server
|
|
343
|
-
snapctl byogs build
|
|
323
|
+
snapctl byogs build --tag $image_tag --path $code_root_path
|
|
344
324
|
```
|
|
345
325
|
|
|
346
|
-
####
|
|
326
|
+
#### 3. byogs push
|
|
347
327
|
|
|
348
328
|
Push your custom game server image.
|
|
349
329
|
|
|
@@ -352,51 +332,13 @@ Push your custom game server image.
|
|
|
352
332
|
snapctl byogs push --help
|
|
353
333
|
|
|
354
334
|
# Publish a new image
|
|
355
|
-
# $byogs_sid = Game server ID for your snap
|
|
356
335
|
# $image_tag = An image tag for your snap
|
|
357
336
|
# Example:
|
|
358
337
|
# snapctl byogs push byosnap-jinks-gs --tag my-first-image
|
|
359
|
-
snapctl byogs push
|
|
338
|
+
snapctl byogs push --tag $image_tag
|
|
360
339
|
```
|
|
361
340
|
|
|
362
|
-
####
|
|
363
|
-
|
|
364
|
-
Publish your custom game server image. This command executes, `build` and `push` one after the other.
|
|
365
|
-
|
|
366
|
-
```
|
|
367
|
-
# Help for the byogs command
|
|
368
|
-
snapctl byogs publish-image --help
|
|
369
|
-
|
|
370
|
-
# Publish a new image
|
|
371
|
-
# $byogs_sid = Game server ID for your snap
|
|
372
|
-
# $image_tag = An image tag for your snap
|
|
373
|
-
# $code_root_path = Local code path where your Dockerfile is present
|
|
374
|
-
# Example:
|
|
375
|
-
# snapctl byogs publish-image byosnap-jinks-gs --tag my-first-image --path /Users/DevName/Development/SnapserEngine/game_server
|
|
376
|
-
snapctl byogs publish-image $byogs_sid --tag $image_tag --path $code_root_path
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
#### 6. [Deprecated soon] byogs publish-version
|
|
380
|
-
|
|
381
|
-
Publish a new version for your game server. Only after your game server version is published, you will be able
|
|
382
|
-
to use it in your Snapend fleet. This command should be run after you `push` or `publish-image` commands.
|
|
383
|
-
|
|
384
|
-
```
|
|
385
|
-
# Help for the byogs command
|
|
386
|
-
snapctl byogs publish-version --help
|
|
387
|
-
|
|
388
|
-
# Publish a new image
|
|
389
|
-
# $byogs_sid = Snap ID for your snap
|
|
390
|
-
# $image_tag = Any image tag for your snap
|
|
391
|
-
# $prefix = Prefix for your snap Eg: /v1
|
|
392
|
-
# $version = Semantic version for your snap Eg: v0.0.1
|
|
393
|
-
# $ingress_port = Ingress port for your snap Eg: 5003
|
|
394
|
-
# Example:
|
|
395
|
-
# snapctl byogs publish-image byosnap-jinks-gs --tag my-first-image --prefix /v1 --version v0.0.1 --http-port 5003
|
|
396
|
-
snapctl byogs publish-version $byogs_sid --tag $image_tag --prefix $prefix --version $version --http-port $ingress_port
|
|
397
|
-
```
|
|
398
|
-
|
|
399
|
-
#### 7. [New] byogs publish
|
|
341
|
+
#### 4. byogs publish
|
|
400
342
|
|
|
401
343
|
Publish your custom game server image. This commend replaces the old way of creating, publishing image and
|
|
402
344
|
then publishing the byogs. Now all you have to do is publish your image and create a fleet using the web portal.
|
|
@@ -546,3 +488,91 @@ snapctl snapend state --help
|
|
|
546
488
|
snapctl snapend state $snapend_id
|
|
547
489
|
```
|
|
548
490
|
|
|
491
|
+
## Error codes
|
|
492
|
+
### CLI Return Codes
|
|
493
|
+
|
|
494
|
+
| Error Code | Description |
|
|
495
|
+
|------------|----------------------------------------------------------|
|
|
496
|
+
| 0 | Operation completed successfully |
|
|
497
|
+
| 1 | General error |
|
|
498
|
+
| 2 | Input error |
|
|
499
|
+
|
|
500
|
+
### Configuration Errors
|
|
501
|
+
|
|
502
|
+
| Error Code | Description |
|
|
503
|
+
|------------|----------------------------------------------------------|
|
|
504
|
+
| 10 | Configuration incorrect |
|
|
505
|
+
| 11 | Configuration error |
|
|
506
|
+
| 12 | Dependency missing |
|
|
507
|
+
|
|
508
|
+
### BYOGS Errors
|
|
509
|
+
|
|
510
|
+
| Error Code | Description |
|
|
511
|
+
|------------|----------------------------------------------------------|
|
|
512
|
+
| 20 | Generic BYOGS error |
|
|
513
|
+
| 21 | BYOGS dependency missing |
|
|
514
|
+
| 22 | BYOGS ECR login error |
|
|
515
|
+
| 23 | BYOGS build error |
|
|
516
|
+
| 24 | BYOGS tag error |
|
|
517
|
+
| 25 | BYOGS publish error |
|
|
518
|
+
| 26 | BYOGS publish permission error |
|
|
519
|
+
| 27 | BYOGS publish duplicate tag error |
|
|
520
|
+
|
|
521
|
+
### BYOSNAP Errors
|
|
522
|
+
|
|
523
|
+
| Error Code | Description |
|
|
524
|
+
|------------|----------------------------------------------------------|
|
|
525
|
+
| 30 | Generic BYOSNAP error |
|
|
526
|
+
| 31 | BYOSNAP dependency missing |
|
|
527
|
+
| 32 | BYOSNAP ECR login error |
|
|
528
|
+
| 33 | BYOSNAP build error |
|
|
529
|
+
| 34 | BYOSNAP tag error |
|
|
530
|
+
| 35 | BYOSNAP publish image error |
|
|
531
|
+
| 36 | BYOSNAP publish image permission error |
|
|
532
|
+
| 37 | BYOSNAP publish image duplicate tag error |
|
|
533
|
+
| 38 | BYOSNAP create error |
|
|
534
|
+
| 39 | BYOSNAP create permission error |
|
|
535
|
+
| 40 | BYOSNAP create duplicate name error |
|
|
536
|
+
| 41 | BYOSNAP publish version error |
|
|
537
|
+
| 42 | BYOSNAP publish version permission error |
|
|
538
|
+
| 43 | BYOSNAP publish version duplicate version error |
|
|
539
|
+
| 44 | BYOSNAP publish version duplicate tag error |
|
|
540
|
+
|
|
541
|
+
### Game Errors
|
|
542
|
+
|
|
543
|
+
| Error Code | Description |
|
|
544
|
+
|------------|----------------------------------------------------------|
|
|
545
|
+
| 50 | Generic game error |
|
|
546
|
+
| 51 | Game create error |
|
|
547
|
+
| 52 | Game create permission error |
|
|
548
|
+
| 53 | Game create duplicate name error |
|
|
549
|
+
| 54 | Game enumerate error |
|
|
550
|
+
|
|
551
|
+
### Snapend Errors
|
|
552
|
+
|
|
553
|
+
| Error Code | Description |
|
|
554
|
+
|------------|----------------------------------------------------------|
|
|
555
|
+
| 60 | Generic snapend error |
|
|
556
|
+
| 61 | Snapend enumerate error |
|
|
557
|
+
| 62 | Snapend clone error |
|
|
558
|
+
| 63 | Snapend clone server error |
|
|
559
|
+
| 64 | Snapend clone timeout error |
|
|
560
|
+
| 65 | Snapend apply error |
|
|
561
|
+
| 66 | Snapend apply server error |
|
|
562
|
+
| 67 | Snapend apply timeout error |
|
|
563
|
+
| 68 | Snapend promote error |
|
|
564
|
+
| 69 | Snapend promote server error |
|
|
565
|
+
| 70 | Snapend promote timeout error |
|
|
566
|
+
| 71 | Snapend download error |
|
|
567
|
+
| 72 | Snapend update error |
|
|
568
|
+
| 73 | Snapend update server error |
|
|
569
|
+
| 74 | Snapend update timeout error |
|
|
570
|
+
| 75 | Snapend state error |
|
|
571
|
+
|
|
572
|
+
### Generate Errors
|
|
573
|
+
|
|
574
|
+
| Error Code | Description |
|
|
575
|
+
|------------|----------------------------------------------------------|
|
|
576
|
+
| 80 | Generic generate error |
|
|
577
|
+
| 81 | Generate BYOSNAP profile error |
|
|
578
|
+
|
|
@@ -227,16 +227,16 @@ snapctl byosnap push $byosnap_sid --tag $image_tag
|
|
|
227
227
|
Upload swagger.json and README.md for you Snap
|
|
228
228
|
|
|
229
229
|
```
|
|
230
|
-
# Help for the
|
|
230
|
+
# Help for the byosnap command
|
|
231
231
|
snapctl byosnap upload-docs --help
|
|
232
232
|
|
|
233
233
|
# Publish a new image
|
|
234
|
-
# $
|
|
234
|
+
# $byosnap_sid = Snap ID for your snap
|
|
235
235
|
# $image_tag = An image tag for your snap
|
|
236
236
|
# $code_root_path = Local code path where your swagger.json and README.md files are present
|
|
237
237
|
# Example:
|
|
238
238
|
# snapctl byosnap upload-docs byosnap-jinks-flask --tag my-first-image --path /Users/DevName/Development/SnapserEngine/jinks_flask
|
|
239
|
-
snapctl byosnap upload-docs $
|
|
239
|
+
snapctl byosnap upload-docs $byosnap_sid --tag $image_tag --path $code_root_path
|
|
240
240
|
```
|
|
241
241
|
|
|
242
242
|
#### 6. byosnap publish-image
|
|
@@ -288,28 +288,7 @@ See all the supported commands
|
|
|
288
288
|
snapctl byogs --help
|
|
289
289
|
```
|
|
290
290
|
|
|
291
|
-
#### 2.
|
|
292
|
-
|
|
293
|
-
Create a custom game server. Note that you will have to build, push and publish your game server image, for it to be useable
|
|
294
|
-
in a Snapend fleet.
|
|
295
|
-
|
|
296
|
-
```
|
|
297
|
-
# Help for the byosnap command
|
|
298
|
-
snapctl byogs create --help
|
|
299
|
-
|
|
300
|
-
# Create a new snap
|
|
301
|
-
# $byogs_sid = Game server ID for your snap. Should start with `byogs-`
|
|
302
|
-
# $name = User friendly name for your BYOGs
|
|
303
|
-
# $desc = User friendly description
|
|
304
|
-
# $platform = Currently only supported platform is linux/amd64
|
|
305
|
-
# $language = One of go, python, ruby, c#, c++, rust, java, node
|
|
306
|
-
|
|
307
|
-
# Example:
|
|
308
|
-
# snapctl byogs create byosnap-jinks-gs --name "Jinks Flask Microservice" --desc "Custom Microservice" --platform "linux/arm64" --language "go"
|
|
309
|
-
snapctl byogs create $byogs_sid --name "$name" --desc "$desc" --platform "$platform" --language "$language"
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
#### 3. byogs build
|
|
291
|
+
#### 2. byogs build
|
|
313
292
|
|
|
314
293
|
Build your custom game server image.
|
|
315
294
|
|
|
@@ -318,15 +297,14 @@ Build your custom game server image.
|
|
|
318
297
|
snapctl byogs build --help
|
|
319
298
|
|
|
320
299
|
# Publish a new image
|
|
321
|
-
# $byogs_sid = Game server ID for your snap
|
|
322
300
|
# $image_tag = An image tag for your snap
|
|
323
301
|
# $code_root_path = Local code path where your Dockerfile is present
|
|
324
302
|
# Example:
|
|
325
303
|
# snapctl byogs build byosnap-jinks-gs --tag my-first-image --path /Users/DevName/Development/SnapserEngine/game_server
|
|
326
|
-
snapctl byogs build
|
|
304
|
+
snapctl byogs build --tag $image_tag --path $code_root_path
|
|
327
305
|
```
|
|
328
306
|
|
|
329
|
-
####
|
|
307
|
+
#### 3. byogs push
|
|
330
308
|
|
|
331
309
|
Push your custom game server image.
|
|
332
310
|
|
|
@@ -335,51 +313,13 @@ Push your custom game server image.
|
|
|
335
313
|
snapctl byogs push --help
|
|
336
314
|
|
|
337
315
|
# Publish a new image
|
|
338
|
-
# $byogs_sid = Game server ID for your snap
|
|
339
316
|
# $image_tag = An image tag for your snap
|
|
340
317
|
# Example:
|
|
341
318
|
# snapctl byogs push byosnap-jinks-gs --tag my-first-image
|
|
342
|
-
snapctl byogs push
|
|
319
|
+
snapctl byogs push --tag $image_tag
|
|
343
320
|
```
|
|
344
321
|
|
|
345
|
-
####
|
|
346
|
-
|
|
347
|
-
Publish your custom game server image. This command executes, `build` and `push` one after the other.
|
|
348
|
-
|
|
349
|
-
```
|
|
350
|
-
# Help for the byogs command
|
|
351
|
-
snapctl byogs publish-image --help
|
|
352
|
-
|
|
353
|
-
# Publish a new image
|
|
354
|
-
# $byogs_sid = Game server ID for your snap
|
|
355
|
-
# $image_tag = An image tag for your snap
|
|
356
|
-
# $code_root_path = Local code path where your Dockerfile is present
|
|
357
|
-
# Example:
|
|
358
|
-
# snapctl byogs publish-image byosnap-jinks-gs --tag my-first-image --path /Users/DevName/Development/SnapserEngine/game_server
|
|
359
|
-
snapctl byogs publish-image $byogs_sid --tag $image_tag --path $code_root_path
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
#### 6. [Deprecated soon] byogs publish-version
|
|
363
|
-
|
|
364
|
-
Publish a new version for your game server. Only after your game server version is published, you will be able
|
|
365
|
-
to use it in your Snapend fleet. This command should be run after you `push` or `publish-image` commands.
|
|
366
|
-
|
|
367
|
-
```
|
|
368
|
-
# Help for the byogs command
|
|
369
|
-
snapctl byogs publish-version --help
|
|
370
|
-
|
|
371
|
-
# Publish a new image
|
|
372
|
-
# $byogs_sid = Snap ID for your snap
|
|
373
|
-
# $image_tag = Any image tag for your snap
|
|
374
|
-
# $prefix = Prefix for your snap Eg: /v1
|
|
375
|
-
# $version = Semantic version for your snap Eg: v0.0.1
|
|
376
|
-
# $ingress_port = Ingress port for your snap Eg: 5003
|
|
377
|
-
# Example:
|
|
378
|
-
# snapctl byogs publish-image byosnap-jinks-gs --tag my-first-image --prefix /v1 --version v0.0.1 --http-port 5003
|
|
379
|
-
snapctl byogs publish-version $byogs_sid --tag $image_tag --prefix $prefix --version $version --http-port $ingress_port
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
#### 7. [New] byogs publish
|
|
322
|
+
#### 4. byogs publish
|
|
383
323
|
|
|
384
324
|
Publish your custom game server image. This commend replaces the old way of creating, publishing image and
|
|
385
325
|
then publishing the byogs. Now all you have to do is publish your image and create a fleet using the web portal.
|
|
@@ -528,3 +468,91 @@ snapctl snapend state --help
|
|
|
528
468
|
# snapctl snapend state gx5x6bc0
|
|
529
469
|
snapctl snapend state $snapend_id
|
|
530
470
|
```
|
|
471
|
+
|
|
472
|
+
## Error codes
|
|
473
|
+
### CLI Return Codes
|
|
474
|
+
|
|
475
|
+
| Error Code | Description |
|
|
476
|
+
|------------|----------------------------------------------------------|
|
|
477
|
+
| 0 | Operation completed successfully |
|
|
478
|
+
| 1 | General error |
|
|
479
|
+
| 2 | Input error |
|
|
480
|
+
|
|
481
|
+
### Configuration Errors
|
|
482
|
+
|
|
483
|
+
| Error Code | Description |
|
|
484
|
+
|------------|----------------------------------------------------------|
|
|
485
|
+
| 10 | Configuration incorrect |
|
|
486
|
+
| 11 | Configuration error |
|
|
487
|
+
| 12 | Dependency missing |
|
|
488
|
+
|
|
489
|
+
### BYOGS Errors
|
|
490
|
+
|
|
491
|
+
| Error Code | Description |
|
|
492
|
+
|------------|----------------------------------------------------------|
|
|
493
|
+
| 20 | Generic BYOGS error |
|
|
494
|
+
| 21 | BYOGS dependency missing |
|
|
495
|
+
| 22 | BYOGS ECR login error |
|
|
496
|
+
| 23 | BYOGS build error |
|
|
497
|
+
| 24 | BYOGS tag error |
|
|
498
|
+
| 25 | BYOGS publish error |
|
|
499
|
+
| 26 | BYOGS publish permission error |
|
|
500
|
+
| 27 | BYOGS publish duplicate tag error |
|
|
501
|
+
|
|
502
|
+
### BYOSNAP Errors
|
|
503
|
+
|
|
504
|
+
| Error Code | Description |
|
|
505
|
+
|------------|----------------------------------------------------------|
|
|
506
|
+
| 30 | Generic BYOSNAP error |
|
|
507
|
+
| 31 | BYOSNAP dependency missing |
|
|
508
|
+
| 32 | BYOSNAP ECR login error |
|
|
509
|
+
| 33 | BYOSNAP build error |
|
|
510
|
+
| 34 | BYOSNAP tag error |
|
|
511
|
+
| 35 | BYOSNAP publish image error |
|
|
512
|
+
| 36 | BYOSNAP publish image permission error |
|
|
513
|
+
| 37 | BYOSNAP publish image duplicate tag error |
|
|
514
|
+
| 38 | BYOSNAP create error |
|
|
515
|
+
| 39 | BYOSNAP create permission error |
|
|
516
|
+
| 40 | BYOSNAP create duplicate name error |
|
|
517
|
+
| 41 | BYOSNAP publish version error |
|
|
518
|
+
| 42 | BYOSNAP publish version permission error |
|
|
519
|
+
| 43 | BYOSNAP publish version duplicate version error |
|
|
520
|
+
| 44 | BYOSNAP publish version duplicate tag error |
|
|
521
|
+
|
|
522
|
+
### Game Errors
|
|
523
|
+
|
|
524
|
+
| Error Code | Description |
|
|
525
|
+
|------------|----------------------------------------------------------|
|
|
526
|
+
| 50 | Generic game error |
|
|
527
|
+
| 51 | Game create error |
|
|
528
|
+
| 52 | Game create permission error |
|
|
529
|
+
| 53 | Game create duplicate name error |
|
|
530
|
+
| 54 | Game enumerate error |
|
|
531
|
+
|
|
532
|
+
### Snapend Errors
|
|
533
|
+
|
|
534
|
+
| Error Code | Description |
|
|
535
|
+
|------------|----------------------------------------------------------|
|
|
536
|
+
| 60 | Generic snapend error |
|
|
537
|
+
| 61 | Snapend enumerate error |
|
|
538
|
+
| 62 | Snapend clone error |
|
|
539
|
+
| 63 | Snapend clone server error |
|
|
540
|
+
| 64 | Snapend clone timeout error |
|
|
541
|
+
| 65 | Snapend apply error |
|
|
542
|
+
| 66 | Snapend apply server error |
|
|
543
|
+
| 67 | Snapend apply timeout error |
|
|
544
|
+
| 68 | Snapend promote error |
|
|
545
|
+
| 69 | Snapend promote server error |
|
|
546
|
+
| 70 | Snapend promote timeout error |
|
|
547
|
+
| 71 | Snapend download error |
|
|
548
|
+
| 72 | Snapend update error |
|
|
549
|
+
| 73 | Snapend update server error |
|
|
550
|
+
| 74 | Snapend update timeout error |
|
|
551
|
+
| 75 | Snapend state error |
|
|
552
|
+
|
|
553
|
+
### Generate Errors
|
|
554
|
+
|
|
555
|
+
| Error Code | Description |
|
|
556
|
+
|------------|----------------------------------------------------------|
|
|
557
|
+
| 80 | Generic generate error |
|
|
558
|
+
| 81 | Generate BYOSNAP profile error |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "snapctl"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.32.1"
|
|
4
4
|
description = "Snapser CLI Tool"
|
|
5
5
|
authors = ["Ajinkya Apte <aj@snapser.com>"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -11,10 +11,12 @@ snapctl = "snapctl.main:app"
|
|
|
11
11
|
|
|
12
12
|
[tool.poetry.dependencies]
|
|
13
13
|
python = "^3.10"
|
|
14
|
-
typer = {extras = ["all"], version = "^0.
|
|
14
|
+
typer = {extras = ["all"], version = "^0.12.3"}
|
|
15
15
|
requests = "^2.28.2"
|
|
16
16
|
configparser = "^6.0.0"
|
|
17
17
|
pyfiglet = "^1.0.2"
|
|
18
|
+
pytest = "^8.2.2"
|
|
19
|
+
pytest-mock = "^3.14.0"
|
|
18
20
|
|
|
19
21
|
|
|
20
22
|
[build-system]
|