snapctl 0.39.3__tar.gz → 0.41.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.

Files changed (23) hide show
  1. {snapctl-0.39.3 → snapctl-0.41.1}/PKG-INFO +66 -15
  2. {snapctl-0.39.3 → snapctl-0.41.1}/README.md +65 -14
  3. {snapctl-0.39.3 → snapctl-0.41.1}/pyproject.toml +1 -1
  4. {snapctl-0.39.3 → snapctl-0.41.1}/snapctl/commands/byogs.py +135 -56
  5. snapctl-0.41.1/snapctl/commands/byosnap.py +981 -0
  6. {snapctl-0.39.3 → snapctl-0.41.1}/snapctl/commands/game.py +49 -25
  7. {snapctl-0.39.3 → snapctl-0.41.1}/snapctl/commands/generate.py +48 -40
  8. {snapctl-0.39.3 → snapctl-0.41.1}/snapctl/commands/snapend.py +225 -142
  9. {snapctl-0.39.3 → snapctl-0.41.1}/snapctl/config/constants.py +16 -4
  10. {snapctl-0.39.3 → snapctl-0.41.1}/snapctl/config/hashes.py +5 -3
  11. {snapctl-0.39.3 → snapctl-0.41.1}/snapctl/main.py +106 -34
  12. {snapctl-0.39.3 → snapctl-0.41.1}/snapctl/utils/helper.py +2 -4
  13. snapctl-0.39.3/snapctl/commands/byosnap.py +0 -756
  14. {snapctl-0.39.3 → snapctl-0.41.1}/LICENSE +0 -0
  15. {snapctl-0.39.3 → snapctl-0.41.1}/snapctl/__init__.py +0 -0
  16. {snapctl-0.39.3 → snapctl-0.41.1}/snapctl/__main__.py +0 -0
  17. {snapctl-0.39.3 → snapctl-0.41.1}/snapctl/commands/__init__.py +0 -0
  18. {snapctl-0.39.3 → snapctl-0.41.1}/snapctl/config/__init__.py +0 -0
  19. {snapctl-0.39.3 → snapctl-0.41.1}/snapctl/config/endpoints.py +0 -0
  20. {snapctl-0.39.3 → snapctl-0.41.1}/snapctl/types/__init__.py +0 -0
  21. {snapctl-0.39.3 → snapctl-0.41.1}/snapctl/types/definitions.py +0 -0
  22. {snapctl-0.39.3 → snapctl-0.41.1}/snapctl/utils/__init__.py +0 -0
  23. {snapctl-0.39.3 → snapctl-0.41.1}/snapctl/utils/echo.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: snapctl
3
- Version: 0.39.3
3
+ Version: 0.41.1
4
4
  Summary: Snapser CLI Tool
5
5
  Author: Ajinkya Apte
6
6
  Author-email: aj@snapser.com
@@ -310,6 +310,33 @@ snapctl byosnap publish-version --help
310
310
  snapctl byosnap publish-version $byosnap_sid --tag $image_tag --prefix $prefix --version $version --http-port $ingress_port --byosnap-profile $byosnap_profile
311
311
  ```
312
312
 
313
+ #### 8. byosnap sync
314
+
315
+ This command is for development purposes. It allows developers to rapidly build, update and push their
316
+ BYOSnap to a dev Snapend. Simply, make changes to your code locally, and then run this command to deploy
317
+ your BYOSnap straight to your development Snapend.
318
+
319
+ IMPORTANT: This command will only work for Dev Snapends. Additionally if the tag you are using in this
320
+ command happens to be used by a staging or a production snapend then `sync` will not work. We do this to
321
+ ensure that your staging and production BYOSnap images do not get impacted.
322
+
323
+ ```
324
+ # Help for the byosnap command
325
+ snapctl byosnap sync --help
326
+
327
+ # Publish a new image
328
+ # $byosnap_sid = Snap ID for your snap
329
+ # $code_root_path = Local code path where your Dockerfile is present
330
+ # $resources_path = Optional path to the resources directory in your Snap. This ensures, you are not forced to put the Dockerfile, swagger.json and README.md in the root directory of your Snap.
331
+ # $skip-build = true/false. Default is false. Pass this flag as true to skip the build and head straight to tag and push. Build step needs to run and tagged using the --tag you pass to the publish-image command for this to work.
332
+ # $image_tag = An image tag for your snap. Note snapctl adds a timestamp, allowing you to use the same command.
333
+ # $version = Semantic version for your snap Eg: v0.0.1
334
+ # $snapend_id = Dev Snapend Id
335
+ # Example:
336
+ snapctl byosnap sync byosnap-jinks-flask --path /Users/DevName/Development/SnapserEngine/jinks_flask --tag my-first-image --version "v0.0.11" --snapend-id "jxmmfryo"
337
+ snapctl byosnap sync $byosnap_sid --path $code_root_path --tag $image_tag --version $version --snapend-id $snapend_id
338
+ ```
339
+
313
340
  ### BYO Game Server - Bring your own Game Server
314
341
  Snapctl commands for your custom game server
315
342
 
@@ -378,6 +405,25 @@ snapctl byogs publish --tag $image_tag --path $code_root_path --resources-path $
378
405
  snapctl byogs publish --tag $image_tag --skip-build
379
406
  ```
380
407
 
408
+ #### 5. byogs sync
409
+
410
+ This command allows developers to rapidly build, update and push their BYOGs out to a Snapend fleet. Simply, make changes to your code locally, and then run this command to deploy your BYOGs straight to your Snapend fleet.
411
+
412
+ ```
413
+ # Help for the byogs command
414
+ snapctl byogs sync --help
415
+
416
+ # Publish a new image
417
+ # $code_root_path = Local code path where your Dockerfile is present
418
+ # $resources_path = Optional path to the resources directory in your Snap. This ensures, you are not forced to put the Dockerfile, swagger.json and README.md in the root directory of your Snap.
419
+ # $skip-build = true/false. Default is false. Pass this flag as true to skip the build and head straight to tag and push. Build step needs to run and tagged using the --tag you pass to the publish-image command for this to work.
420
+ # $image_tag = An image tag for your snap. Note snapctl adds a timestamp, allowing you to use the same command.
421
+ # $snapend_id = Snapend Id
422
+ # $fleet_name = Fleet Name
423
+ # Example:
424
+ snapctl byogs sync --path /Users/DevName/Development/SnapserEngine/game_server --tag my-first-image --snapend-id "jxmmfryo" --fleet-name "my-fleet"
425
+ snapctl byosnap sync --path $code_root_path --tag $image_tag --snapend-id $snapend_id --fleet-name $fleet_name
426
+ ```
381
427
 
382
428
  ### Game
383
429
  Snapctl commands for your game
@@ -460,11 +506,12 @@ snapctl snapend download --help
460
506
  # $protos-category = messages or services (only with --type protos)
461
507
  # $auth-type = user or app (only with --type server-sdk)
462
508
  # Example:
463
- # snapctl snapend download gx5x6bc0 --category snapend-manifest --type yaml
464
- # snapctl snapend download gx5x6bc0 --category client-sdk --type unity
465
- # snapctl snapend download gx5x6bc0 --category server-sdk --type unity --auth-type app
466
- # snapctl snapend download gx5x6bc0 --category protos --type raw --protos-category messages
467
- snapctl snapend download $snapend_id --category $category --type $type
509
+ # snapctl snapend download --snapend-id gx5x6bc0 --category snapend-manifest --type yaml --out-path .
510
+ # snapctl snapend download --snapend-id gx5x6bc0 --category sdk --type unity --sdk-access-type external --sdk-auth-type user --out-path .
511
+ # snapctl snapend download --snapend-id gx5x6bc0 --category sdk --type cpp --sdk-access-type internal --out-path .
512
+ # snapctl snapend download --snapend-id gx5x6bc0 --category protos --type raw --protos-category messages --out-path .
513
+ snapctl snapend download $snapend_id --category $category --type $type --sdk-access-type $sdk_access_type --sdk-auth-type $sdk_auth_type --out-path $out_path
514
+
468
515
  ```
469
516
 
470
517
  #### 3. Clone Snapend
@@ -540,15 +587,14 @@ snapctl snapend state $snapend_id
540
587
 
541
588
  ## Error codes
542
589
  ### CLI Return Codes
543
-
544
590
  | Error Code | Description |
545
591
  |------------|----------------------------------------------------------|
546
592
  | 0 | Operation completed successfully |
547
593
  | 1 | General error |
548
594
  | 2 | Input error |
595
+ | 3 | Resource not found |
549
596
 
550
597
  ### Configuration Errors
551
-
552
598
  | Error Code | Description |
553
599
  |------------|----------------------------------------------------------|
554
600
  | 10 | Configuration incorrect |
@@ -556,9 +602,9 @@ snapctl snapend state $snapend_id
556
602
  | 12 | Dependency missing |
557
603
 
558
604
  ### BYOGS Errors
559
-
560
605
  | Error Code | Description |
561
606
  |------------|----------------------------------------------------------|
607
+ | 3 | BYOGs resource not found |
562
608
  | 20 | Generic BYOGS error |
563
609
  | 21 | BYOGS dependency missing |
564
610
  | 22 | BYOGS ECR login error |
@@ -569,9 +615,9 @@ snapctl snapend state $snapend_id
569
615
  | 27 | BYOGS publish duplicate tag error |
570
616
 
571
617
  ### BYOSNAP Errors
572
-
573
618
  | Error Code | Description |
574
619
  |------------|----------------------------------------------------------|
620
+ | 3 | BYOSnap resource not found |
575
621
  | 30 | Generic BYOSNAP error |
576
622
  | 31 | BYOSNAP dependency missing |
577
623
  | 32 | BYOSNAP ECR login error |
@@ -587,21 +633,27 @@ snapctl snapend state $snapend_id
587
633
  | 42 | BYOSNAP publish version permission error |
588
634
  | 43 | BYOSNAP publish version duplicate version error |
589
635
  | 44 | BYOSNAP publish version duplicate tag error |
636
+ | 45 | BYOSNAP update version error |
637
+ | 46 | BYOSNAP update version service in use |
638
+ | 47 | BYOSNAP update version tag error |
639
+ | 48 | BYOSNAP update version invalid version error |
590
640
 
591
- ### Game Errors
592
641
 
642
+ ### Game Errors
593
643
  | Error Code | Description |
594
644
  |------------|----------------------------------------------------------|
645
+ | 3 | Game resource not found |
595
646
  | 50 | Generic game error |
596
647
  | 51 | Game create error |
597
648
  | 52 | Game create permission error |
598
- | 53 | Game create duplicate name error |
599
- | 54 | Game enumerate error |
649
+ | 53 | Game create limit error |
650
+ | 54 | Game create duplicate name error |
651
+ | 55 | Game enumerate error |
600
652
 
601
653
  ### Snapend Errors
602
-
603
654
  | Error Code | Description |
604
655
  |------------|----------------------------------------------------------|
656
+ | 3 | Snapend resource not found |
605
657
  | 60 | Generic snapend error |
606
658
  | 61 | Snapend enumerate error |
607
659
  | 62 | Snapend clone error |
@@ -620,7 +672,6 @@ snapctl snapend state $snapend_id
620
672
  | 75 | Snapend state error |
621
673
 
622
674
  ### Generate Errors
623
-
624
675
  | Error Code | Description |
625
676
  |------------|----------------------------------------------------------|
626
677
  | 80 | Generic generate error |
@@ -291,6 +291,33 @@ snapctl byosnap publish-version --help
291
291
  snapctl byosnap publish-version $byosnap_sid --tag $image_tag --prefix $prefix --version $version --http-port $ingress_port --byosnap-profile $byosnap_profile
292
292
  ```
293
293
 
294
+ #### 8. byosnap sync
295
+
296
+ This command is for development purposes. It allows developers to rapidly build, update and push their
297
+ BYOSnap to a dev Snapend. Simply, make changes to your code locally, and then run this command to deploy
298
+ your BYOSnap straight to your development Snapend.
299
+
300
+ IMPORTANT: This command will only work for Dev Snapends. Additionally if the tag you are using in this
301
+ command happens to be used by a staging or a production snapend then `sync` will not work. We do this to
302
+ ensure that your staging and production BYOSnap images do not get impacted.
303
+
304
+ ```
305
+ # Help for the byosnap command
306
+ snapctl byosnap sync --help
307
+
308
+ # Publish a new image
309
+ # $byosnap_sid = Snap ID for your snap
310
+ # $code_root_path = Local code path where your Dockerfile is present
311
+ # $resources_path = Optional path to the resources directory in your Snap. This ensures, you are not forced to put the Dockerfile, swagger.json and README.md in the root directory of your Snap.
312
+ # $skip-build = true/false. Default is false. Pass this flag as true to skip the build and head straight to tag and push. Build step needs to run and tagged using the --tag you pass to the publish-image command for this to work.
313
+ # $image_tag = An image tag for your snap. Note snapctl adds a timestamp, allowing you to use the same command.
314
+ # $version = Semantic version for your snap Eg: v0.0.1
315
+ # $snapend_id = Dev Snapend Id
316
+ # Example:
317
+ snapctl byosnap sync byosnap-jinks-flask --path /Users/DevName/Development/SnapserEngine/jinks_flask --tag my-first-image --version "v0.0.11" --snapend-id "jxmmfryo"
318
+ snapctl byosnap sync $byosnap_sid --path $code_root_path --tag $image_tag --version $version --snapend-id $snapend_id
319
+ ```
320
+
294
321
  ### BYO Game Server - Bring your own Game Server
295
322
  Snapctl commands for your custom game server
296
323
 
@@ -359,6 +386,25 @@ snapctl byogs publish --tag $image_tag --path $code_root_path --resources-path $
359
386
  snapctl byogs publish --tag $image_tag --skip-build
360
387
  ```
361
388
 
389
+ #### 5. byogs sync
390
+
391
+ This command allows developers to rapidly build, update and push their BYOGs out to a Snapend fleet. Simply, make changes to your code locally, and then run this command to deploy your BYOGs straight to your Snapend fleet.
392
+
393
+ ```
394
+ # Help for the byogs command
395
+ snapctl byogs sync --help
396
+
397
+ # Publish a new image
398
+ # $code_root_path = Local code path where your Dockerfile is present
399
+ # $resources_path = Optional path to the resources directory in your Snap. This ensures, you are not forced to put the Dockerfile, swagger.json and README.md in the root directory of your Snap.
400
+ # $skip-build = true/false. Default is false. Pass this flag as true to skip the build and head straight to tag and push. Build step needs to run and tagged using the --tag you pass to the publish-image command for this to work.
401
+ # $image_tag = An image tag for your snap. Note snapctl adds a timestamp, allowing you to use the same command.
402
+ # $snapend_id = Snapend Id
403
+ # $fleet_name = Fleet Name
404
+ # Example:
405
+ snapctl byogs sync --path /Users/DevName/Development/SnapserEngine/game_server --tag my-first-image --snapend-id "jxmmfryo" --fleet-name "my-fleet"
406
+ snapctl byosnap sync --path $code_root_path --tag $image_tag --snapend-id $snapend_id --fleet-name $fleet_name
407
+ ```
362
408
 
363
409
  ### Game
364
410
  Snapctl commands for your game
@@ -441,11 +487,12 @@ snapctl snapend download --help
441
487
  # $protos-category = messages or services (only with --type protos)
442
488
  # $auth-type = user or app (only with --type server-sdk)
443
489
  # Example:
444
- # snapctl snapend download gx5x6bc0 --category snapend-manifest --type yaml
445
- # snapctl snapend download gx5x6bc0 --category client-sdk --type unity
446
- # snapctl snapend download gx5x6bc0 --category server-sdk --type unity --auth-type app
447
- # snapctl snapend download gx5x6bc0 --category protos --type raw --protos-category messages
448
- snapctl snapend download $snapend_id --category $category --type $type
490
+ # snapctl snapend download --snapend-id gx5x6bc0 --category snapend-manifest --type yaml --out-path .
491
+ # snapctl snapend download --snapend-id gx5x6bc0 --category sdk --type unity --sdk-access-type external --sdk-auth-type user --out-path .
492
+ # snapctl snapend download --snapend-id gx5x6bc0 --category sdk --type cpp --sdk-access-type internal --out-path .
493
+ # snapctl snapend download --snapend-id gx5x6bc0 --category protos --type raw --protos-category messages --out-path .
494
+ snapctl snapend download $snapend_id --category $category --type $type --sdk-access-type $sdk_access_type --sdk-auth-type $sdk_auth_type --out-path $out_path
495
+
449
496
  ```
450
497
 
451
498
  #### 3. Clone Snapend
@@ -521,15 +568,14 @@ snapctl snapend state $snapend_id
521
568
 
522
569
  ## Error codes
523
570
  ### CLI Return Codes
524
-
525
571
  | Error Code | Description |
526
572
  |------------|----------------------------------------------------------|
527
573
  | 0 | Operation completed successfully |
528
574
  | 1 | General error |
529
575
  | 2 | Input error |
576
+ | 3 | Resource not found |
530
577
 
531
578
  ### Configuration Errors
532
-
533
579
  | Error Code | Description |
534
580
  |------------|----------------------------------------------------------|
535
581
  | 10 | Configuration incorrect |
@@ -537,9 +583,9 @@ snapctl snapend state $snapend_id
537
583
  | 12 | Dependency missing |
538
584
 
539
585
  ### BYOGS Errors
540
-
541
586
  | Error Code | Description |
542
587
  |------------|----------------------------------------------------------|
588
+ | 3 | BYOGs resource not found |
543
589
  | 20 | Generic BYOGS error |
544
590
  | 21 | BYOGS dependency missing |
545
591
  | 22 | BYOGS ECR login error |
@@ -550,9 +596,9 @@ snapctl snapend state $snapend_id
550
596
  | 27 | BYOGS publish duplicate tag error |
551
597
 
552
598
  ### BYOSNAP Errors
553
-
554
599
  | Error Code | Description |
555
600
  |------------|----------------------------------------------------------|
601
+ | 3 | BYOSnap resource not found |
556
602
  | 30 | Generic BYOSNAP error |
557
603
  | 31 | BYOSNAP dependency missing |
558
604
  | 32 | BYOSNAP ECR login error |
@@ -568,21 +614,27 @@ snapctl snapend state $snapend_id
568
614
  | 42 | BYOSNAP publish version permission error |
569
615
  | 43 | BYOSNAP publish version duplicate version error |
570
616
  | 44 | BYOSNAP publish version duplicate tag error |
617
+ | 45 | BYOSNAP update version error |
618
+ | 46 | BYOSNAP update version service in use |
619
+ | 47 | BYOSNAP update version tag error |
620
+ | 48 | BYOSNAP update version invalid version error |
571
621
 
572
- ### Game Errors
573
622
 
623
+ ### Game Errors
574
624
  | Error Code | Description |
575
625
  |------------|----------------------------------------------------------|
626
+ | 3 | Game resource not found |
576
627
  | 50 | Generic game error |
577
628
  | 51 | Game create error |
578
629
  | 52 | Game create permission error |
579
- | 53 | Game create duplicate name error |
580
- | 54 | Game enumerate error |
630
+ | 53 | Game create limit error |
631
+ | 54 | Game create duplicate name error |
632
+ | 55 | Game enumerate error |
581
633
 
582
634
  ### Snapend Errors
583
-
584
635
  | Error Code | Description |
585
636
  |------------|----------------------------------------------------------|
637
+ | 3 | Snapend resource not found |
586
638
  | 60 | Generic snapend error |
587
639
  | 61 | Snapend enumerate error |
588
640
  | 62 | Snapend clone error |
@@ -601,7 +653,6 @@ snapctl snapend state $snapend_id
601
653
  | 75 | Snapend state error |
602
654
 
603
655
  ### Generate Errors
604
-
605
656
  | Error Code | Description |
606
657
  |------------|----------------------------------------------------------|
607
658
  | 80 | Generic generate error |
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "snapctl"
3
- version = "0.39.3"
3
+ version = "0.41.1"
4
4
  description = "Snapser CLI Tool"
5
5
  authors = ["Ajinkya Apte <aj@snapser.com>"]
6
6
  readme = "README.md"