smart_proxy_container_gateway 1.0.6 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95ed3584f3ef8379b2abbaef70031e5add4d0f0a364acbc8d938284329c45aff
|
4
|
+
data.tar.gz: bd7eb01e1ad8d4cb58ffd0c9a356cef25d5004db93c66f14f58bc8fb0051cb90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 512516a03a9eaaa34f39dc9e8fdf0260efbcbbc2077971c4f0dfc8872e32310bcf14bf180d73be481c6ebcb6ad94fba753f6cc4d206e528c27a463bbb28c8899
|
7
|
+
data.tar.gz: 774fa2b2bc4ea74808a0d50668675f88a3d962b343ffd056c4f66fb597bdbb124e019e5bff7e26d52f12f2015eaa170683aebc0b30cb4f6647e6f3156cc21611
|
@@ -41,6 +41,20 @@ module Proxy
|
|
41
41
|
redirect to(redirection_location)
|
42
42
|
end
|
43
43
|
|
44
|
+
get '/v2/*/tags/list/?' do
|
45
|
+
repository = params[:splat][0]
|
46
|
+
handle_repo_auth(repository, auth_header, request)
|
47
|
+
pulp_response = Proxy::ContainerGateway.tags(repository, params)
|
48
|
+
# "link"=>["<http://pulpcore-api/v2/container-image-name/tags/list?n=100&last=last-tag-name>; rel=\"next\""],
|
49
|
+
# https://docs.docker.com/registry/spec/api/#pagination-1
|
50
|
+
if pulp_response['link'].nil?
|
51
|
+
headers['link'] = ""
|
52
|
+
else
|
53
|
+
headers['link'] = pulp_response['link']
|
54
|
+
end
|
55
|
+
pulp_response.body
|
56
|
+
end
|
57
|
+
|
44
58
|
get '/v1/search/?' do
|
45
59
|
# Checks for podman client and issues a 404 in that case. Podman
|
46
60
|
# examines the response from a /v1/search request. If the result
|
@@ -41,6 +41,20 @@ module Proxy
|
|
41
41
|
pulp_registry_request(uri)['location']
|
42
42
|
end
|
43
43
|
|
44
|
+
def tags(repository, params = {})
|
45
|
+
query = "?"
|
46
|
+
unless params[:n].nil? || params[:n] == ""
|
47
|
+
query = "#{query}n=#{params[:n]}"
|
48
|
+
query = "#{query}&" unless params[:last].nil?
|
49
|
+
end
|
50
|
+
query = "#{query}last=#{params[:last]}" unless params[:last].nil? || params[:last] == ""
|
51
|
+
|
52
|
+
uri = URI.parse(
|
53
|
+
"#{Proxy::ContainerGateway::Plugin.settings.pulp_endpoint}/pulpcore_registry/v2/#{repository}/tags/list#{query}"
|
54
|
+
)
|
55
|
+
pulp_registry_request(uri)
|
56
|
+
end
|
57
|
+
|
44
58
|
def v1_search(params = {})
|
45
59
|
if params[:n].nil? || params[:n] == ""
|
46
60
|
params[:n] = 25
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_proxy_container_gateway
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian Ballou
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sequel
|
@@ -60,11 +60,11 @@ files:
|
|
60
60
|
- lib/smart_proxy_container_gateway/sequel_migrations/003_authorization_reorg.rb
|
61
61
|
- lib/smart_proxy_container_gateway/version.rb
|
62
62
|
- settings.d/container_gateway.yml.example
|
63
|
-
homepage:
|
63
|
+
homepage: https://github.com/Katello/smart_proxy_container_gateway
|
64
64
|
licenses:
|
65
65
|
- GPLv3
|
66
66
|
metadata: {}
|
67
|
-
post_install_message:
|
67
|
+
post_install_message:
|
68
68
|
rdoc_options: []
|
69
69
|
require_paths:
|
70
70
|
- lib
|
@@ -79,8 +79,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
|
-
rubygems_version: 3.
|
83
|
-
signing_key:
|
82
|
+
rubygems_version: 3.4.10
|
83
|
+
signing_key:
|
84
84
|
specification_version: 4
|
85
85
|
summary: Pulp 3 container registry support for Foreman/Katello Smart-Proxy
|
86
86
|
test_files: []
|