snapctl 0.41.2__py3-none-any.whl → 0.41.3__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 +10 -6
- snapctl/config/constants.py +1 -1
- snapctl/config/endpoints.py +5 -3
- snapctl/main.py +5 -5
- {snapctl-0.41.2.dist-info → snapctl-0.41.3.dist-info}/METADATA +4 -4
- {snapctl-0.41.2.dist-info → snapctl-0.41.3.dist-info}/RECORD +9 -9
- {snapctl-0.41.2.dist-info → snapctl-0.41.3.dist-info}/LICENSE +0 -0
- {snapctl-0.41.2.dist-info → snapctl-0.41.3.dist-info}/WHEEL +0 -0
- {snapctl-0.41.2.dist-info → snapctl-0.41.3.dist-info}/entry_points.txt +0 -0
snapctl/commands/byogs.py
CHANGED
|
@@ -38,7 +38,7 @@ class ByoGs:
|
|
|
38
38
|
tag: Union[str, None] = None, path: Union[str, None] = None,
|
|
39
39
|
resources_path: Union[str, None] = None, dockerfile: Union[str, None] = None,
|
|
40
40
|
skip_build: bool = False, snapend_id: Union[str, None] = None,
|
|
41
|
-
|
|
41
|
+
fleet_names: Union[str, None] = None, blocking: bool = False
|
|
42
42
|
) -> None:
|
|
43
43
|
self.subcommand: str = subcommand
|
|
44
44
|
self.base_url: str = base_url
|
|
@@ -58,7 +58,7 @@ class ByoGs:
|
|
|
58
58
|
self.dockerfile: str = dockerfile
|
|
59
59
|
self.skip_build: bool = skip_build
|
|
60
60
|
self.snapend_id: Union[str, None] = snapend_id
|
|
61
|
-
self.
|
|
61
|
+
self.fleet_names: Union[str, None] = fleet_names
|
|
62
62
|
self.blocking: bool = blocking
|
|
63
63
|
# Validate input
|
|
64
64
|
self.validate_input()
|
|
@@ -383,9 +383,9 @@ class ByoGs:
|
|
|
383
383
|
snapctl_error(
|
|
384
384
|
message="Missing required parameter: snapend_id",
|
|
385
385
|
code=SNAPCTL_INPUT_ERROR)
|
|
386
|
-
if not self.
|
|
386
|
+
if not self.fleet_names:
|
|
387
387
|
snapctl_error(
|
|
388
|
-
message="Missing required parameter:
|
|
388
|
+
message="Missing required parameter: fleet_names",
|
|
389
389
|
code=SNAPCTL_INPUT_ERROR)
|
|
390
390
|
|
|
391
391
|
# CRUD methods
|
|
@@ -448,10 +448,14 @@ class ByoGs:
|
|
|
448
448
|
"""
|
|
449
449
|
self.tag = f'{self.tag}-{int(time.time())}'
|
|
450
450
|
self.publish(no_exit=True)
|
|
451
|
-
|
|
451
|
+
fleet_list: List[str] = self.fleet_names.split(',')
|
|
452
|
+
byogs_list: List[str] = []
|
|
453
|
+
for fleet in fleet_list:
|
|
454
|
+
byogs_list.append(f"{fleet.strip()}:{self.tag}")
|
|
452
455
|
snapend = Snapend(
|
|
453
456
|
subcommand='update', base_url=self.base_url, api_key=self.api_key,
|
|
454
|
-
snapend_id=self.snapend_id, byogs=
|
|
457
|
+
snapend_id=self.snapend_id, byogs=", ".join(map(str, byogs_list)),
|
|
458
|
+
blocking=self.blocking
|
|
455
459
|
)
|
|
456
460
|
snapend.update(no_exit=True)
|
|
457
461
|
return snapctl_success(message='BYOGs sync successful')
|
snapctl/config/constants.py
CHANGED
snapctl/config/endpoints.py
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
'''
|
|
2
2
|
This file contains the endpoints for the Snapser API.
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
'''
|
|
4
|
+
from typing import Dict
|
|
5
|
+
|
|
6
|
+
END_POINTS: Dict[str, str] = {
|
|
5
7
|
'DEV': 'https://gateway.dev.snapser.io/snapser',
|
|
6
8
|
'DEV_TWO': 'https://gateway.dev.snapser.io/devtwo',
|
|
7
9
|
'PLAYTEST': 'https://gateway.dev.snapser.io/playtest',
|
snapctl/main.py
CHANGED
|
@@ -266,11 +266,11 @@ def byogs(
|
|
|
266
266
|
),
|
|
267
267
|
snapend_id: str = typer.Option(
|
|
268
268
|
None, "--snapend-id",
|
|
269
|
-
help=("(req: sync) Snapend Id.
|
|
269
|
+
help=("(req: sync) Snapend Id.")
|
|
270
270
|
),
|
|
271
|
-
|
|
272
|
-
None, "--fleet-
|
|
273
|
-
help=("(req: sync)
|
|
271
|
+
fleet_names: str = typer.Option(
|
|
272
|
+
None, "--fleet-names",
|
|
273
|
+
help=("(req: sync) Comma separated fleet names.")
|
|
274
274
|
),
|
|
275
275
|
blocking: bool = typer.Option(
|
|
276
276
|
False, "--blocking",
|
|
@@ -301,7 +301,7 @@ def byogs(
|
|
|
301
301
|
dockerfile=docker_file,
|
|
302
302
|
skip_build=skip_build,
|
|
303
303
|
snapend_id=snapend_id,
|
|
304
|
-
|
|
304
|
+
fleet_names=fleet_names,
|
|
305
305
|
blocking=blocking
|
|
306
306
|
)
|
|
307
307
|
getattr(byogs_obj, subcommand.replace('-', '_'))()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: snapctl
|
|
3
|
-
Version: 0.41.
|
|
3
|
+
Version: 0.41.3
|
|
4
4
|
Summary: Snapser CLI Tool
|
|
5
5
|
Author: Ajinkya Apte
|
|
6
6
|
Author-email: aj@snapser.com
|
|
@@ -419,10 +419,10 @@ snapctl byogs sync --help
|
|
|
419
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
420
|
# $image_tag = An image tag for your snap. Note snapctl adds a timestamp, allowing you to use the same command.
|
|
421
421
|
# $snapend_id = Snapend Id
|
|
422
|
-
# $
|
|
422
|
+
# $fleet_names = Comma separated fleet names
|
|
423
423
|
# Example:
|
|
424
|
-
snapctl byogs sync --path /Users/DevName/Development/SnapserEngine/game_server --tag my-first-image --snapend-id "jxmmfryo" --fleet-
|
|
425
|
-
snapctl byosnap sync --path $code_root_path --tag $image_tag --snapend-id $snapend_id --fleet-
|
|
424
|
+
snapctl byogs sync --path /Users/DevName/Development/SnapserEngine/game_server --tag my-first-image --snapend-id "jxmmfryo" --fleet-names "my-fleet,my-second-fleet"
|
|
425
|
+
snapctl byosnap sync --path $code_root_path --tag $image_tag --snapend-id $snapend_id --fleet-names $fleet_names
|
|
426
426
|
```
|
|
427
427
|
|
|
428
428
|
### Game
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
snapctl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
snapctl/__main__.py,sha256=43jKoTk8b85hk_MT6499N3ruHdEfM8WBImd_-3VzjI8,116
|
|
3
3
|
snapctl/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
snapctl/commands/byogs.py,sha256=
|
|
4
|
+
snapctl/commands/byogs.py,sha256=IE4E2Vpy6yJGtuS1M1mTdDF7wHw3pPPW6NkEeyPQt9w,18203
|
|
5
5
|
snapctl/commands/byosnap.py,sha256=h9O8Tz9Fx19xcGVREw-Q5PK8bNqHmTI8EaG-7q38jpI,43354
|
|
6
6
|
snapctl/commands/game.py,sha256=nCXtEXAJkvOw26c_OBGr7Pz4hwu-5FXHyBR2kkXhLCM,5247
|
|
7
7
|
snapctl/commands/generate.py,sha256=isiTl3SE1G7wqEWjdYPKDtlBR-HE2-iNdZK_pKgiKvY,8398
|
|
8
8
|
snapctl/commands/snapend.py,sha256=Zq9lNp1NO5fHzlv2S4TrzBZUIxssOu4_ZEQFMO2Tfbc,34677
|
|
9
9
|
snapctl/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
-
snapctl/config/constants.py,sha256=
|
|
11
|
-
snapctl/config/endpoints.py,sha256=
|
|
10
|
+
snapctl/config/constants.py,sha256=pkeUd3EMtqF_uCRG1tYmHFdRkrv4iT0lqYD12UO7p8c,3274
|
|
11
|
+
snapctl/config/endpoints.py,sha256=9kllA79xn9G_aBLp1rohURZi93pwYzTEWZ8ObtZ6crw,338
|
|
12
12
|
snapctl/config/hashes.py,sha256=V5nvBB4beDFIRjhfcPu6eoljNj4JwNKCPku5dJWfF_Q,4220
|
|
13
|
-
snapctl/main.py,sha256
|
|
13
|
+
snapctl/main.py,sha256=-Mg95GBT4fiN3j_HFUCWRYZNhlcbDun-pLYBJd2EhKI,22055
|
|
14
14
|
snapctl/types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
15
|
snapctl/types/definitions.py,sha256=EQzLeiXkJ8ISRlCqHMviNVsWWpmhWjpKaOBLdlvOTmY,644
|
|
16
16
|
snapctl/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
snapctl/utils/echo.py,sha256=V0qgjqqGXRiueMkq31enmNmdqciC8S90qGRcK8UupXA,1090
|
|
18
18
|
snapctl/utils/helper.py,sha256=Mnxpaw2a6IHHv3_l5tfQhGJTICv-MbdnnroI8cCA9ZI,5404
|
|
19
|
-
snapctl-0.41.
|
|
20
|
-
snapctl-0.41.
|
|
21
|
-
snapctl-0.41.
|
|
22
|
-
snapctl-0.41.
|
|
23
|
-
snapctl-0.41.
|
|
19
|
+
snapctl-0.41.3.dist-info/LICENSE,sha256=6AcXm54KFSpmUI1ji9NIBd4Xl-DtjTqiyjBzfVb_CEk,2804
|
|
20
|
+
snapctl-0.41.3.dist-info/METADATA,sha256=iR9s2X40RAWvk6_KsvuIQoEeiougdO44hwF4brHjZ4I,26779
|
|
21
|
+
snapctl-0.41.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
22
|
+
snapctl-0.41.3.dist-info/entry_points.txt,sha256=tkKW9MzmFdRs6Bgkv29G78i9WEBK4WIOWunPfe3t2Wg,44
|
|
23
|
+
snapctl-0.41.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|