occystrap 0.3.0__py3-none-any.whl → 0.4.0__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.
@@ -5,6 +5,9 @@
5
5
  # format, noting that the response format you get back varies based on what you have
6
6
  # in your accept header for the request.
7
7
 
8
+ # https://github.com/opencontainers/image-spec/blob/main/media-types.md documents
9
+ # the new OCI mime types.
10
+
8
11
  import hashlib
9
12
  import io
10
13
  import logging
@@ -86,7 +89,9 @@ class Image(object):
86
89
  if r.headers['Content-Type'] == 'application/vnd.docker.distribution.manifest.v2+json':
87
90
  manifest = r.json()
88
91
  config_digest = manifest['config']['digest']
89
- elif r.headers['Content-Type'] == 'application/vnd.docker.distribution.manifest.list.v2+json':
92
+ elif r.headers['Content-Type'] in [
93
+ 'application/vnd.docker.distribution.manifest.list.v2+json',
94
+ 'application/vnd.oci.image.index.v1+json']:
90
95
  for m in r.json()['manifests']:
91
96
  if 'variant' in m['platform']:
92
97
  LOG.info('Found manifest for %s on %s %s'
@@ -109,7 +114,8 @@ class Image(object):
109
114
  'image': self.image,
110
115
  'tag': m['digest']
111
116
  },
112
- headers={'Accept': ('application/vnd.docker.distribution.manifest.v2+json')})
117
+ headers={'Accept': ('application/vnd.docker.distribution.manifest.v2+json, '
118
+ 'application/vnd.oci.image.manifest.v1+json')})
113
119
  manifest = r.json()
114
120
  config_digest = manifest['config']['digest']
115
121
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: occystrap
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Summary: occystrap: docker and OCI container tools
5
5
  Home-page: https://github.com/shakenfist/occystrap
6
6
  Author: Michael Still
@@ -2,7 +2,7 @@ occystrap/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  occystrap/common.py,sha256=Zm4hHpn8RgSXp0W86HhZzpyXq19QIsLJgp9SxK_1QQg,1300
3
3
  occystrap/constants.py,sha256=kmOt-12settGbDTW1efpT3UENRQouG9f0ZjgOqWdrIA,4399
4
4
  occystrap/docker_extract.py,sha256=j2GSIOShZZh0c5gckXeu-SO7201p4S1EJg3fi7WPQHk,1055
5
- occystrap/docker_registry.py,sha256=C-T1bY1UPJfBZB_Q5gqcZYODikxnrTQU2MfYyoux950,7658
5
+ occystrap/docker_registry.py,sha256=GRpBj1SCxRV_0wOuLIMjMyTRU3Uxinyofzfa2pnwXpo,7936
6
6
  occystrap/main.py,sha256=sevQkqAqgnZRrt61DMUPz9xzoE4AIcWYx2_ZurO_Lls,4059
7
7
  occystrap/output_directory.py,sha256=S-uL8NSHyHsVKeWsvPRT63E7wE1pWaluGHOFVsS09Xg,11408
8
8
  occystrap/output_mounts.py,sha256=AH4vouBF9PmhQ5oGfsSZyN1FhatWbs_20IDlI9psn_k,6381
@@ -10,11 +10,11 @@ occystrap/output_ocibundle.py,sha256=lsVW66ltL2Y-Mxh5Hp2KSCdh9bvsME1142CJ_Uh99oo
10
10
  occystrap/output_tarfile.py,sha256=Di8N_2TSo-gQz490D3XOsKCYiv5T_bxZzTRFbd4WGBA,1620
11
11
  occystrap/util.py,sha256=nrKfAxDUjb_v9ERDXTmMSSNdJSuLgjdtwOMWk46n0a0,2720
12
12
  occystrap/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- occystrap-0.3.0.dist-info/AUTHORS,sha256=toKLUaf9c-NkNow00B_akwMGcGtm-S_ihcC_eql9qWc,34
14
- occystrap-0.3.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
15
- occystrap-0.3.0.dist-info/METADATA,sha256=PaCk2BSIcly80vIV4LiPlpXoQ9CbYKtb7S5UpaAI5BQ,6308
16
- occystrap-0.3.0.dist-info/WHEEL,sha256=g4nMs7d-Xl9-xC9XovUrsDHGXt-FT0E17Yqo92DEfvY,92
17
- occystrap-0.3.0.dist-info/entry_points.txt,sha256=51kLRjAxFtC6GWCbTFGezSYMNk5t6xrBmS8Pf7gehiU,50
18
- occystrap-0.3.0.dist-info/pbr.json,sha256=2zD1Bsq8TK1jHn5K3MGWkgXT6TxdPUw9MsWVY-Pe89c,46
19
- occystrap-0.3.0.dist-info/top_level.txt,sha256=06nN7FHq2z_Jpp2PZNm3rGOGUA1cIGlUr6MEZrqgOlc,10
20
- occystrap-0.3.0.dist-info/RECORD,,
13
+ occystrap-0.4.0.dist-info/AUTHORS,sha256=toKLUaf9c-NkNow00B_akwMGcGtm-S_ihcC_eql9qWc,34
14
+ occystrap-0.4.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
15
+ occystrap-0.4.0.dist-info/METADATA,sha256=mpNFr7zm2FZcmHXnNTZYcsbiA-BqU0mrWQPLKDYYRX4,6308
16
+ occystrap-0.4.0.dist-info/WHEEL,sha256=g4nMs7d-Xl9-xC9XovUrsDHGXt-FT0E17Yqo92DEfvY,92
17
+ occystrap-0.4.0.dist-info/entry_points.txt,sha256=51kLRjAxFtC6GWCbTFGezSYMNk5t6xrBmS8Pf7gehiU,50
18
+ occystrap-0.4.0.dist-info/pbr.json,sha256=BKNfUPL0QseayDX9_Ko6PtOTlIdH1276JChGUVbKXk0,46
19
+ occystrap-0.4.0.dist-info/top_level.txt,sha256=06nN7FHq2z_Jpp2PZNm3rGOGUA1cIGlUr6MEZrqgOlc,10
20
+ occystrap-0.4.0.dist-info/RECORD,,
@@ -0,0 +1 @@
1
+ {"git_version": "c1cb09a", "is_release": true}
@@ -1 +0,0 @@
1
- {"git_version": "27e37dc", "is_release": true}