snapctl 0.31.1__py3-none-any.whl → 0.32.1__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 +193 -367
- snapctl/commands/byosnap.py +397 -315
- snapctl/commands/game.py +63 -57
- snapctl/commands/generate.py +93 -0
- snapctl/commands/snapend.py +361 -281
- snapctl/config/constants.py +72 -8
- snapctl/config/hashes.py +14 -0
- snapctl/main.py +106 -124
- snapctl/types/definitions.py +20 -4
- snapctl/utils/echo.py +10 -2
- snapctl/utils/helper.py +60 -3
- snapctl-0.32.1.dist-info/LICENSE +29 -0
- {snapctl-0.31.1.dist-info → snapctl-0.32.1.dist-info}/METADATA +100 -70
- snapctl-0.32.1.dist-info/RECORD +23 -0
- snapctl-0.31.1.dist-info/RECORD +0 -21
- {snapctl-0.31.1.dist-info → snapctl-0.32.1.dist-info}/WHEEL +0 -0
- {snapctl-0.31.1.dist-info → snapctl-0.32.1.dist-info}/entry_points.txt +0 -0
|
@@ -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
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
snapctl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
snapctl/__main__.py,sha256=43jKoTk8b85hk_MT6499N3ruHdEfM8WBImd_-3VzjI8,116
|
|
3
|
+
snapctl/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
snapctl/commands/byogs.py,sha256=To8R5JKgLSzvbnE2PAQt2FDf-PJdAFrr_K0ExxA0njs,12751
|
|
5
|
+
snapctl/commands/byosnap.py,sha256=mTrpp7WWSrCRgxcZmZRrv4PAn6U4bQhTDO9UqciZPNw,28223
|
|
6
|
+
snapctl/commands/game.py,sha256=7255xoGszkk2pPcc2sRJP98-3S0qfSKXFOl5CrsbCSY,4349
|
|
7
|
+
snapctl/commands/generate.py,sha256=IWOOEBMreFThRBbTuKkIBgSjWw9E00vMNxyetJBxWMA,3238
|
|
8
|
+
snapctl/commands/snapend.py,sha256=cxBMNMfXyQeLdg5NyKZ2ujjUG7zYxOgyjmeAoD27t7I,29922
|
|
9
|
+
snapctl/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
snapctl/config/constants.py,sha256=ySNjLrl5LYyfR5dX2MnuAKxu3eimRijmpWNo2OigHD4,2703
|
|
11
|
+
snapctl/config/endpoints.py,sha256=VAeOmx3k3ukB-9XuGI65KtCJwFK-KFgzor-UWE8JU0g,297
|
|
12
|
+
snapctl/config/hashes.py,sha256=4yydu7uPRwNo72WcU_HWjoCLDluG7mLPGCWVUFFF-xU,3378
|
|
13
|
+
snapctl/main.py,sha256=NJ9YjfGv3PwIqJDGx3il2KnHmVjiPAFtxvZkJfI160A,18073
|
|
14
|
+
snapctl/types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
+
snapctl/types/definitions.py,sha256=EQzLeiXkJ8ISRlCqHMviNVsWWpmhWjpKaOBLdlvOTmY,644
|
|
16
|
+
snapctl/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
+
snapctl/utils/echo.py,sha256=bvirxTlxv-EAwyf4FT0yAqY5fsevp3yimxKmgQV73Fc,941
|
|
18
|
+
snapctl/utils/helper.py,sha256=jPXQnSbdOnktJdLotBugdHfVwkap-5MoApOmhJ-AsqA,3287
|
|
19
|
+
snapctl-0.32.1.dist-info/LICENSE,sha256=6AcXm54KFSpmUI1ji9NIBd4Xl-DtjTqiyjBzfVb_CEk,2804
|
|
20
|
+
snapctl-0.32.1.dist-info/METADATA,sha256=uHXn0kWDxQSZQbWd9G-tskAqUN-YCCBnO_deyytE1ws,19249
|
|
21
|
+
snapctl-0.32.1.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
22
|
+
snapctl-0.32.1.dist-info/entry_points.txt,sha256=tkKW9MzmFdRs6Bgkv29G78i9WEBK4WIOWunPfe3t2Wg,44
|
|
23
|
+
snapctl-0.32.1.dist-info/RECORD,,
|
snapctl-0.31.1.dist-info/RECORD
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
snapctl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
snapctl/__main__.py,sha256=43jKoTk8b85hk_MT6499N3ruHdEfM8WBImd_-3VzjI8,116
|
|
3
|
-
snapctl/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
snapctl/commands/byogs.py,sha256=2Jocaemxn01IrKno3u9QrVeiAsqIpCJBVsWi2ivHuCY,19762
|
|
5
|
-
snapctl/commands/byosnap.py,sha256=RQv3r30dkz8n1BgEnE-tAnAzPLoz-CLEQoiy1WKZQeg,23172
|
|
6
|
-
snapctl/commands/game.py,sha256=rnsTqrXavE5D-KULXkDBQ-PBI8sSKK4it3S_YMJfiUY,3633
|
|
7
|
-
snapctl/commands/snapend.py,sha256=exMH-8lp9qUociAWHJS15xRr-MtCe1fjbQAQmgODNIw,26187
|
|
8
|
-
snapctl/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
snapctl/config/constants.py,sha256=iX5zkftpOqdGJWoCK8-zwP_Mz9GD3BU62DVKrzTygpw,565
|
|
10
|
-
snapctl/config/endpoints.py,sha256=VAeOmx3k3ukB-9XuGI65KtCJwFK-KFgzor-UWE8JU0g,297
|
|
11
|
-
snapctl/config/hashes.py,sha256=tb0ilslgYvI8L4IKeiMfz2qYRDcezat8tg8dPGqlbAU,3093
|
|
12
|
-
snapctl/main.py,sha256=QES1PqGgMWjKVcOdUA8b14KHweiE2iJigxKtaoJfBDw,19147
|
|
13
|
-
snapctl/types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
-
snapctl/types/definitions.py,sha256=rkRyTBHzeQtCt_uYObgYvL5txnVq8r_n5g4IUAq2FWc,233
|
|
15
|
-
snapctl/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
-
snapctl/utils/echo.py,sha256=0nhWYDBQTfZGtl8EK21hJhj0now2rQmCT-yYMCKupy4,584
|
|
17
|
-
snapctl/utils/helper.py,sha256=xasSsg-0DgHT-TWejh2IXW-s9AYntO1D2O6Uy6BQLcE,1381
|
|
18
|
-
snapctl-0.31.1.dist-info/METADATA,sha256=cIywFLCBwuCumEUspq8sf4qgNcsAcixFSIph1Wz0fvI,16509
|
|
19
|
-
snapctl-0.31.1.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
20
|
-
snapctl-0.31.1.dist-info/entry_points.txt,sha256=tkKW9MzmFdRs6Bgkv29G78i9WEBK4WIOWunPfe3t2Wg,44
|
|
21
|
-
snapctl-0.31.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|