snapctl 0.49.4__tar.gz → 0.49.5__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.49.4 → snapctl-0.49.5}/PKG-INFO +1 -1
- {snapctl-0.49.4 → snapctl-0.49.5}/pyproject.toml +1 -1
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/commands/snapend.py +23 -8
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/config/constants.py +1 -1
- snapctl-0.49.5/snapctl/data/releases/beta-0.49.5.mdx +8 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/LICENSE +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/README.md +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/__init__.py +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/__main__.py +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/commands/__init__.py +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/commands/byogs.py +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/commands/byosnap.py +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/commands/byows.py +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/commands/game.py +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/commands/generate.py +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/commands/release_notes.py +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/config/__init__.py +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/config/endpoints.py +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/config/hashes.py +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/data/__init__.py +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/data/profiles/__init__.py +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/data/profiles/snapser-byosnap-profile.json +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/data/profiles/snapser-byosnap-profile.yaml +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/data/profiles/snapser-byosnap-profile.yml +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/data/releases/__init__.py +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/data/releases/beta-0.46.0.mdx +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/data/releases/beta-0.46.4.mdx +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/data/releases/beta-0.47.0.mdx +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/data/releases/beta-0.47.1.mdx +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/data/releases/beta-0.47.2.mdx +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/data/releases/beta-0.48.0.mdx +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/data/releases/beta-0.49.0.mdx +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/data/releases/beta-0.49.1.mdx +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/data/releases/beta-0.49.2.mdx +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/data/releases/beta-0.49.3.mdx +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/data/releases/beta-0.49.4.mdx +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/main.py +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/types/__init__.py +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/types/definitions.py +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/utils/__init__.py +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/utils/echo.py +0 -0
- {snapctl-0.49.4 → snapctl-0.49.5}/snapctl/utils/helper.py +0 -0
|
@@ -22,7 +22,7 @@ from snapctl.config.constants import SERVER_CALL_TIMEOUT, SNAPCTL_INPUT_ERROR, \
|
|
|
22
22
|
SNAPCTL_SNAPEND_APPLY_MANIFEST_MISMATCH_ERROR
|
|
23
23
|
from snapctl.config.hashes import PROTOS_TYPES, CLIENT_SDK_TYPES, SERVER_SDK_TYPES, \
|
|
24
24
|
SNAPEND_MANIFEST_TYPES, SDK_TYPES, SDK_ACCESS_AUTH_TYPE_LOOKUP
|
|
25
|
-
from snapctl.utils.echo import error, success, info
|
|
25
|
+
from snapctl.utils.echo import error, success, info, warning
|
|
26
26
|
from snapctl.utils.helper import snapctl_error, snapctl_success
|
|
27
27
|
|
|
28
28
|
|
|
@@ -84,17 +84,21 @@ class Snapend:
|
|
|
84
84
|
self.manifest_path_filename: Union[str, None] = manifest_path_filename
|
|
85
85
|
self.force: bool = force
|
|
86
86
|
self.category: str = category
|
|
87
|
-
self.portal_category: Union[str, None] = Snapend._make_portal_category(
|
|
88
|
-
category_format)
|
|
89
87
|
self.category_format: str = category_format
|
|
90
88
|
self.category_type: Union[str, None] = category_type
|
|
91
89
|
self.category_http_lib: Union[str, None] = category_http_lib
|
|
92
|
-
self.download_types: Union[
|
|
93
|
-
Dict[str, Dict[str, str]], None
|
|
94
|
-
] = Snapend._make_download_type(category)
|
|
95
90
|
self.out_path: Union[str, None] = out_path
|
|
96
91
|
self.snaps: Union[str, None] = snaps
|
|
92
|
+
self.blocking: bool = blocking
|
|
97
93
|
# Values below are derived values
|
|
94
|
+
# portal_category: This is purely because we have simplified the input for the user
|
|
95
|
+
# Only used for a reverse lookup to pass the category to the portal server
|
|
96
|
+
self.portal_category: Union[str, None] = Snapend._make_portal_category(
|
|
97
|
+
category_format)
|
|
98
|
+
# download_types: This stores our own internal mapping of the category to the type
|
|
99
|
+
self.download_types: Union[
|
|
100
|
+
Dict[str, Dict[str, str]], None
|
|
101
|
+
] = Snapend._make_download_type(category)
|
|
98
102
|
self.manifest_file_name: Union[str, None] = Snapend._get_manifest_file_name(
|
|
99
103
|
manifest_path_filename
|
|
100
104
|
)
|
|
@@ -102,7 +106,6 @@ class Snapend:
|
|
|
102
106
|
byosnaps) if byosnaps else None
|
|
103
107
|
self.byogs_list: Union[str, None] = Snapend._make_byogs_list(
|
|
104
108
|
byogs) if byogs else None
|
|
105
|
-
self.blocking: bool = blocking
|
|
106
109
|
# Validate input
|
|
107
110
|
self.validate_input()
|
|
108
111
|
|
|
@@ -127,6 +130,10 @@ class Snapend:
|
|
|
127
130
|
return 'client-sdk'
|
|
128
131
|
if category_format in SERVER_SDK_TYPES:
|
|
129
132
|
return 'server-sdk'
|
|
133
|
+
if category_format in PROTOS_TYPES:
|
|
134
|
+
return 'protos'
|
|
135
|
+
if category_format in SNAPEND_MANIFEST_TYPES:
|
|
136
|
+
return 'snapend-manifest'
|
|
130
137
|
return None
|
|
131
138
|
|
|
132
139
|
@staticmethod
|
|
@@ -240,6 +247,8 @@ class Snapend:
|
|
|
240
247
|
# Customize snaps
|
|
241
248
|
if self.snaps:
|
|
242
249
|
url += f"&snaps={self.snaps}"
|
|
250
|
+
if "None" in url:
|
|
251
|
+
warning('Detecting a potential issue in the download URL.')
|
|
243
252
|
res = requests.get(
|
|
244
253
|
url, headers={'api-key': self.api_key}, timeout=SERVER_CALL_TIMEOUT
|
|
245
254
|
)
|
|
@@ -391,8 +400,14 @@ class Snapend:
|
|
|
391
400
|
code=SNAPCTL_INPUT_ERROR)
|
|
392
401
|
if self.category not in Snapend.DOWNLOAD_TYPE_NOT_REQUIRED and \
|
|
393
402
|
(self.download_types is None or self.category_format not in self.download_types):
|
|
403
|
+
message = "Invalid format. Valid formats are " + \
|
|
404
|
+
"(req: --category sdk|protos|snapend-manifest --format " + \
|
|
405
|
+
"sdk(" + ", ".join(SDK_TYPES.keys()) + \
|
|
406
|
+
") | protos(" + ", ".join(PROTOS_TYPES.keys()) + ")" + \
|
|
407
|
+
") | snapend-manifest(" + \
|
|
408
|
+
", ".join(SNAPEND_MANIFEST_TYPES.keys()) + ")"
|
|
394
409
|
snapctl_error(
|
|
395
|
-
message=
|
|
410
|
+
message=message, code=SNAPCTL_INPUT_ERROR)
|
|
396
411
|
# Check the Protos category
|
|
397
412
|
if self.category == 'protos' and self.category_type not in Snapend.CATEGORY_TYPE_PROTOS:
|
|
398
413
|
snapctl_error(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|