canonicalwebteam.store-api 4.12.2__py3-none-any.whl → 4.13.2__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.
- canonicalwebteam/store_api/stores/charmstore.py +17 -2
- canonicalwebteam/store_api/stores/snapstore.py +21 -3
- {canonicalwebteam_store_api-4.12.2.dist-info → canonicalwebteam_store_api-4.13.2.dist-info}/METADATA +1 -1
- {canonicalwebteam_store_api-4.12.2.dist-info → canonicalwebteam_store_api-4.13.2.dist-info}/RECORD +6 -6
- {canonicalwebteam_store_api-4.12.2.dist-info → canonicalwebteam_store_api-4.13.2.dist-info}/LICENSE +0 -0
- {canonicalwebteam_store_api-4.12.2.dist-info → canonicalwebteam_store_api-4.13.2.dist-info}/WHEEL +0 -0
|
@@ -490,7 +490,14 @@ class CharmPublisher(Publisher):
|
|
|
490
490
|
)
|
|
491
491
|
return response
|
|
492
492
|
|
|
493
|
-
def create_track(
|
|
493
|
+
def create_track(
|
|
494
|
+
self,
|
|
495
|
+
publisher_auth,
|
|
496
|
+
charm_name,
|
|
497
|
+
track_name,
|
|
498
|
+
version_pattern=None,
|
|
499
|
+
auto_phasing_percentage=None,
|
|
500
|
+
):
|
|
494
501
|
"""
|
|
495
502
|
Create a track for a charm base on the charm's guardrail pattern.
|
|
496
503
|
Documentation: https://api.charmhub.io/docs/default.html#create_tracks
|
|
@@ -501,10 +508,18 @@ class CharmPublisher(Publisher):
|
|
|
501
508
|
publisher_auth: Serialized macaroon to consume the API.
|
|
502
509
|
charm_name: Name of the charm
|
|
503
510
|
track_name: Name of the track
|
|
511
|
+
version_pattern: Version pattern for the track (optional)
|
|
512
|
+
auto_phasing_percentage: phasing percentage for track (optional)
|
|
504
513
|
"""
|
|
514
|
+
|
|
515
|
+
payload = {
|
|
516
|
+
"name": track_name,
|
|
517
|
+
"version-pattern": version_pattern,
|
|
518
|
+
"automatic-phasing-percentage": auto_phasing_percentage,
|
|
519
|
+
}
|
|
505
520
|
response = self.session.post(
|
|
506
521
|
url=self.get_endpoint_url(f"charm/{charm_name}/tracks"),
|
|
507
522
|
headers=self._get_authorization_header(publisher_auth),
|
|
508
|
-
json=[
|
|
523
|
+
json=[payload],
|
|
509
524
|
)
|
|
510
525
|
return response
|
|
@@ -256,16 +256,34 @@ class SnapPublisher(Publisher):
|
|
|
256
256
|
)
|
|
257
257
|
return self.process_response(response)
|
|
258
258
|
|
|
259
|
-
def create_track(
|
|
259
|
+
def create_track(
|
|
260
|
+
self,
|
|
261
|
+
session,
|
|
262
|
+
snap_name,
|
|
263
|
+
track_name,
|
|
264
|
+
version_pattern=None,
|
|
265
|
+
auto_phasing_percentage=None,
|
|
266
|
+
):
|
|
260
267
|
"""
|
|
261
268
|
Create a track for a snap base on the snap's guardrail pattern.
|
|
262
269
|
Documentation: https://api.charmhub.io/docs/default.html#create_tracks
|
|
263
270
|
Endpoint: [POST] https://api.charmhub.io/v1/snap/{snap_name}/tracks
|
|
264
|
-
|
|
271
|
+
Args:
|
|
272
|
+
publisher_auth: Serialized macaroon to consume the API.
|
|
273
|
+
snap_name: Name of the snap
|
|
274
|
+
track_name: Name of the track
|
|
275
|
+
version_pattern: Version pattern for the track (optional)
|
|
276
|
+
auto_phasing_percentage: phasing percentage for track (optional)
|
|
277
|
+
"""
|
|
278
|
+
payload = {
|
|
279
|
+
"name": track_name,
|
|
280
|
+
"version-pattern": version_pattern,
|
|
281
|
+
"automatic-phasing-percentage": auto_phasing_percentage,
|
|
282
|
+
}
|
|
265
283
|
response = self.session.post(
|
|
266
284
|
url=self.get_publisherwg_endpoint_url(f"snap/{snap_name}/tracks"),
|
|
267
285
|
headers=self._get_publisherwg_authorization_header(session),
|
|
268
|
-
json=[
|
|
286
|
+
json=[payload],
|
|
269
287
|
)
|
|
270
288
|
return response
|
|
271
289
|
|
{canonicalwebteam_store_api-4.12.2.dist-info → canonicalwebteam_store_api-4.13.2.dist-info}/RECORD
RENAMED
|
@@ -4,9 +4,9 @@ canonicalwebteam/store_api/exceptions.py,sha256=A49LRhiEIfXNB2zC-zNcZEcdh0ugw6G7
|
|
|
4
4
|
canonicalwebteam/store_api/publisher.py,sha256=4gSCJOtpEfK0luYal5xOEa0XF7DzOrdGMwMIUN4X8_o,15111
|
|
5
5
|
canonicalwebteam/store_api/store.py,sha256=Uk1BMGM4S8uVXepuUiF2FNqw3MCnqtd3EGbrlwzod7Y,7826
|
|
6
6
|
canonicalwebteam/store_api/stores/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
canonicalwebteam/store_api/stores/charmstore.py,sha256=
|
|
8
|
-
canonicalwebteam/store_api/stores/snapstore.py,sha256=
|
|
9
|
-
canonicalwebteam_store_api-4.
|
|
10
|
-
canonicalwebteam_store_api-4.
|
|
11
|
-
canonicalwebteam_store_api-4.
|
|
12
|
-
canonicalwebteam_store_api-4.
|
|
7
|
+
canonicalwebteam/store_api/stores/charmstore.py,sha256=1eovt1EkwUmxzCx_oR7Jf6b0xDHRRHlHUVGHhKQnKjw,17505
|
|
8
|
+
canonicalwebteam/store_api/stores/snapstore.py,sha256=QOzYS1sEyz3JyUUvk3qExPP-DcDsHZorBeq-0WN4nMQ,26002
|
|
9
|
+
canonicalwebteam_store_api-4.13.2.dist-info/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
|
|
10
|
+
canonicalwebteam_store_api-4.13.2.dist-info/METADATA,sha256=Azo69EA3Z9NC3cga12LnjNRglrW6-LQnrcHUjFPmkpY,2265
|
|
11
|
+
canonicalwebteam_store_api-4.13.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
12
|
+
canonicalwebteam_store_api-4.13.2.dist-info/RECORD,,
|
{canonicalwebteam_store_api-4.12.2.dist-info → canonicalwebteam_store_api-4.13.2.dist-info}/LICENSE
RENAMED
|
File without changes
|
{canonicalwebteam_store_api-4.12.2.dist-info → canonicalwebteam_store_api-4.13.2.dist-info}/WHEEL
RENAMED
|
File without changes
|