runcible 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -4
- data/README.md +1 -1
- data/lib/runcible/base.rb +10 -4
- data/lib/runcible/extensions/docker_manifest.rb +9 -0
- data/lib/runcible/extensions/repository.rb +20 -0
- data/lib/runcible/models/docker_importer.rb +1 -1
- data/lib/runcible/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32c1e5f5bc23de91c10c59331deb1c68e705b5b6
|
4
|
+
data.tar.gz: 0c86db9abe10dd8389f383a85a1e1abf09e99719
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25d467a8e634c31665228fdee5d8238703953b72a2e2d2974492afce856643fa954e6b562002284333f8a8b989626bf066c9a5557a44c20e2f15b553c92fcbcb
|
7
|
+
data.tar.gz: dff8d30039657c4e73913643b998bd2ac727acdb6965e0762ed21168fd9ac3cc607fdada94fefcc6872f9071426d94ae6408a16688098b8acfdcc7cda4211b6e
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Exposing Pulp's juiciest parts. http://www.pulpproject.org/
|
6
6
|
|
7
|
-
Latest Live Tested Version: **pulp-server-2.
|
7
|
+
Latest Live Tested Version: **pulp-server-2.8.0-0.4.beta.el7.noarch**
|
8
8
|
|
9
9
|
Current stable Runcible: https://github.com/Katello/runcible/tree/0.3
|
10
10
|
|
data/lib/runcible/base.rb
CHANGED
@@ -43,15 +43,22 @@ module Runcible
|
|
43
43
|
client_options[:verify_ssl] = clone_config[:verify_ssl] unless clone_config[:verify_ssl].nil?
|
44
44
|
|
45
45
|
if clone_config[:oauth]
|
46
|
-
headers = add_oauth_header(method, path, headers)
|
46
|
+
headers = add_oauth_header(method, path, headers)
|
47
47
|
headers['pulp-user'] = clone_config[:user]
|
48
|
-
|
48
|
+
elsif clone_config[:cert_auth]
|
49
|
+
if !clone_config[:cert_auth][:ssl_client_cert] || !clone_config[:cert_auth][:ssl_client_key]
|
50
|
+
fail Runcible::ConfigurationUndefinedError, "Missing SSL certificate or key configuration."
|
51
|
+
end
|
52
|
+
client_options[:ssl_client_cert] = clone_config[:cert_auth][:ssl_client_cert]
|
53
|
+
client_options[:ssl_client_key] = clone_config[:cert_auth][:ssl_client_key]
|
49
54
|
else
|
50
55
|
client_options[:user] = clone_config[:user]
|
51
56
|
client_options[:password] = config[:http_auth][:password]
|
52
|
-
client = RestClient::Resource.new(clone_config[:url], client_options)
|
53
57
|
end
|
54
58
|
|
59
|
+
client_options[:ca_file] = config[:ca_cert_file] unless config[:ca_cert_file].nil?
|
60
|
+
client = RestClient::Resource.new(clone_config[:url], client_options)
|
61
|
+
|
55
62
|
args = [method]
|
56
63
|
args << generate_payload(options) if [:post, :put].include?(method)
|
57
64
|
args << headers
|
@@ -164,7 +171,6 @@ module Runcible
|
|
164
171
|
:authorize_path => '',
|
165
172
|
:access_token_path => '' }
|
166
173
|
|
167
|
-
default_options[:ca_file] = config[:ca_cert_file] unless config[:ca_cert_file].nil?
|
168
174
|
consumer = OAuth::Consumer.new(config[:oauth][:oauth_key], config[:oauth][:oauth_secret], default_options)
|
169
175
|
|
170
176
|
method_to_http_request = { :get => Net::HTTP::Get,
|
@@ -240,6 +240,26 @@ module Runcible
|
|
240
240
|
unit_search(id, criteria).map { |i| i['metadata'].with_indifferent_access }
|
241
241
|
end
|
242
242
|
|
243
|
+
# Retrieves the docker manifest IDs for a single repository
|
244
|
+
#
|
245
|
+
# @param [String] id the ID of the repository
|
246
|
+
# @return [RestClient::Response] the set of repository docker manifest IDs
|
247
|
+
def docker_manifest_ids(id)
|
248
|
+
criteria = {:type_ids => [Runcible::Extensions::DockerManifest.content_type],
|
249
|
+
:fields => {:unit => [], :association => ['unit_id']}}
|
250
|
+
|
251
|
+
unit_search(id, criteria).map { |i| i['unit_id'] }
|
252
|
+
end
|
253
|
+
|
254
|
+
# Retrieves the docker manifests for a single repository
|
255
|
+
#
|
256
|
+
# @param [String] id the ID of the repository
|
257
|
+
# @return [RestClient::Response] the set of repository docker manifests
|
258
|
+
def docker_manifests(id)
|
259
|
+
criteria = {:type_ids => [Runcible::Extensions::DockerManifest.content_type]}
|
260
|
+
unit_search(id, criteria).map { |i| i['metadata'].with_indifferent_access }
|
261
|
+
end
|
262
|
+
|
243
263
|
# Retrieves the docker image IDs for a single repository
|
244
264
|
#
|
245
265
|
# @param [String] id the ID of the repository
|
data/lib/runcible/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runcible
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric D Helms, Justin Sherrill
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -132,6 +132,7 @@ files:
|
|
132
132
|
- lib/runcible/extensions/consumer_group.rb
|
133
133
|
- lib/runcible/extensions/distribution.rb
|
134
134
|
- lib/runcible/extensions/docker_image.rb
|
135
|
+
- lib/runcible/extensions/docker_manifest.rb
|
135
136
|
- lib/runcible/extensions/errata.rb
|
136
137
|
- lib/runcible/extensions/ostree_branch.rb
|
137
138
|
- lib/runcible/extensions/package_category.rb
|
@@ -192,8 +193,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
193
|
version: '0'
|
193
194
|
requirements: []
|
194
195
|
rubyforge_project:
|
195
|
-
rubygems_version: 2.
|
196
|
+
rubygems_version: 2.4.6
|
196
197
|
signing_key:
|
197
198
|
specification_version: 4
|
198
199
|
summary: ''
|
199
200
|
test_files: []
|
201
|
+
has_rdoc:
|