runcible 0.3.3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -94,6 +94,24 @@ module Runcible
|
|
94
94
|
content
|
95
95
|
end
|
96
96
|
|
97
|
+
# Retrieve the set of errata that is applicable to a consumer(s)
|
98
|
+
#
|
99
|
+
# @param [String, Array] ids hash of uninstall options
|
100
|
+
# @return [RestClient::Response] content applicability hash with details of errata availabel to consumer(s)
|
101
|
+
def self.applicable_errata(ids)
|
102
|
+
ids = [ids] if ids.is_a? String
|
103
|
+
criteria = {
|
104
|
+
'consumer_criteria' => {
|
105
|
+
'filters' => {'id' => {'$in' => ids}}
|
106
|
+
},
|
107
|
+
'units' => {
|
108
|
+
'erratum' => []
|
109
|
+
}
|
110
|
+
}
|
111
|
+
|
112
|
+
self.applicability(criteria)
|
113
|
+
end
|
114
|
+
|
97
115
|
end
|
98
116
|
end
|
99
117
|
end
|
@@ -104,7 +104,8 @@ module Runcible
|
|
104
104
|
# @param [String] id the ID of the repository
|
105
105
|
# @return [RestClient::Response] the set of repository RPM IDs
|
106
106
|
def self.rpm_ids(id)
|
107
|
-
criteria = {:type_ids=>[Runcible::Extensions::Rpm.content_type]
|
107
|
+
criteria = {:type_ids=>[Runcible::Extensions::Rpm.content_type],
|
108
|
+
:fields=>{:unit=>[], :association=>['unit_id']}}
|
108
109
|
self.unit_search(id, criteria).collect{|i| i['unit_id']}
|
109
110
|
end
|
110
111
|
|
@@ -149,7 +150,8 @@ module Runcible
|
|
149
150
|
# @param [String] id the ID of the repository
|
150
151
|
# @return [RestClient::Response] the set of repository errata IDs
|
151
152
|
def self.errata_ids(id)
|
152
|
-
criteria = {:type_ids=>[Runcible::Extensions::Errata.content_type]
|
153
|
+
criteria = {:type_ids=>[Runcible::Extensions::Errata.content_type],
|
154
|
+
:fields=>{:unit=>[], :association=>['unit_id']}}
|
153
155
|
|
154
156
|
self.unit_search(id, criteria).collect{|i| i['unit_id']}
|
155
157
|
end
|
@@ -162,6 +162,14 @@ module Runcible
|
|
162
162
|
call(:post, path("#{id}/actions/content/uninstall/"), :payload => { :required => required })
|
163
163
|
end
|
164
164
|
|
165
|
+
# Determine if a set of content is applicable to a consumer
|
166
|
+
#
|
167
|
+
# @param [Hash] options hash of uninstall options
|
168
|
+
# @return [RestClient::Response]
|
169
|
+
def self.applicability(options={})
|
170
|
+
call(:post, path("actions/content/applicability/"), :payload => { :required => options })
|
171
|
+
end
|
172
|
+
|
165
173
|
end
|
166
174
|
end
|
167
175
|
end
|
@@ -89,7 +89,7 @@ module Runcible
|
|
89
89
|
# @return [RestClient::Response]
|
90
90
|
def self.install_units(id, units, options={})
|
91
91
|
required = required_params(binding.send(:local_variables), binding, ["id"])
|
92
|
-
call(:post, path("#{id}/actions/content/install
|
92
|
+
call(:post, path("#{id}/actions/content/install"), :payload => { :required => required })
|
93
93
|
end
|
94
94
|
|
95
95
|
# Update a set of units on a Consumer Group
|
@@ -100,7 +100,7 @@ module Runcible
|
|
100
100
|
# @return [RestClient::Response]
|
101
101
|
def self.update_units(id, units, options={})
|
102
102
|
required = required_params(binding.send(:local_variables), binding, ["id"])
|
103
|
-
call(:post, path("#{id}/actions/content/update
|
103
|
+
call(:post, path("#{id}/actions/content/update"), :payload => { :required => required })
|
104
104
|
end
|
105
105
|
|
106
106
|
# Uninstall a set of units from a Consumer Group
|
@@ -111,7 +111,7 @@ module Runcible
|
|
111
111
|
# @return [RestClient::Response]
|
112
112
|
def self.uninstall_units(id, units, options={})
|
113
113
|
required = required_params(binding.send(:local_variables), binding, ["id"])
|
114
|
-
call(:post, path("#{id}/actions/content/uninstall
|
114
|
+
call(:post, path("#{id}/actions/content/uninstall"), :payload => { :required => required })
|
115
115
|
end
|
116
116
|
|
117
117
|
end
|
data/lib/runcible/version.rb
CHANGED
metadata
CHANGED
@@ -1,166 +1,151 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: runcible
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.4.0
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 3
|
9
|
-
- 3
|
10
|
-
version: 0.3.3
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Eric D Helms, Justin Sherrill
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2013-03-22 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: json
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
segments:
|
30
|
-
- 0
|
31
|
-
version: "0"
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
32
22
|
type: :runtime
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: rest-client
|
36
23
|
prerelease: false
|
37
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rest-client
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
38
33
|
none: false
|
39
|
-
requirements:
|
40
|
-
- -
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
hash: 13
|
43
|
-
segments:
|
44
|
-
- 1
|
45
|
-
- 6
|
46
|
-
- 1
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
47
37
|
version: 1.6.1
|
48
38
|
type: :runtime
|
49
|
-
version_requirements: *id002
|
50
|
-
- !ruby/object:Gem::Dependency
|
51
|
-
name: oauth
|
52
39
|
prerelease: false
|
53
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
54
41
|
none: false
|
55
|
-
requirements:
|
56
|
-
- -
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.6.1
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: oauth
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
62
54
|
type: :runtime
|
63
|
-
version_requirements: *id003
|
64
|
-
- !ruby/object:Gem::Dependency
|
65
|
-
name: activesupport
|
66
55
|
prerelease: false
|
67
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: activesupport
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
68
65
|
none: false
|
69
|
-
requirements:
|
70
|
-
- -
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
hash: 19
|
73
|
-
segments:
|
74
|
-
- 3
|
75
|
-
- 0
|
76
|
-
- 10
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
77
69
|
version: 3.0.10
|
78
70
|
type: :runtime
|
79
|
-
version_requirements: *id004
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
|
-
name: i18n
|
82
71
|
prerelease: false
|
83
|
-
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 3.0.10
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: i18n
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
84
81
|
none: false
|
85
|
-
requirements:
|
86
|
-
- -
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
hash: 11
|
89
|
-
segments:
|
90
|
-
- 0
|
91
|
-
- 5
|
92
|
-
- 0
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
93
85
|
version: 0.5.0
|
94
86
|
type: :runtime
|
95
|
-
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 0.5.0
|
96
94
|
description: Exposing Pulp's juiciest components to the Ruby world.
|
97
|
-
email:
|
95
|
+
email:
|
98
96
|
- ehelms@redhat.com, jsherril@redhat.com
|
99
97
|
executables: []
|
100
|
-
|
101
98
|
extensions: []
|
102
|
-
|
103
99
|
extra_rdoc_files: []
|
104
|
-
|
105
|
-
files:
|
106
|
-
- lib/runcible.rb
|
107
|
-
- lib/runcible/resources/role.rb
|
108
|
-
- lib/runcible/resources/unit.rb
|
109
|
-
- lib/runcible/resources/consumer_group.rb
|
100
|
+
files:
|
110
101
|
- lib/runcible/resources/user.rb
|
102
|
+
- lib/runcible/resources/consumer.rb
|
103
|
+
- lib/runcible/resources/repository_schedule.rb
|
104
|
+
- lib/runcible/resources/consumer_group.rb
|
105
|
+
- lib/runcible/resources/unit.rb
|
111
106
|
- lib/runcible/resources/task.rb
|
112
107
|
- lib/runcible/resources/repository.rb
|
108
|
+
- lib/runcible/resources/role.rb
|
113
109
|
- lib/runcible/resources/event_notifier.rb
|
114
|
-
- lib/runcible/resources/consumer.rb
|
115
|
-
- lib/runcible/resources/repository_schedule.rb
|
116
110
|
- lib/runcible/base.rb
|
117
111
|
- lib/runcible/version.rb
|
118
|
-
- lib/runcible/extensions/unit.rb
|
119
|
-
- lib/runcible/extensions/consumer_group.rb
|
120
|
-
- lib/runcible/extensions/repository.rb
|
121
112
|
- lib/runcible/extensions/package_category.rb
|
122
|
-
- lib/runcible/extensions/yum_importer.rb
|
123
113
|
- lib/runcible/extensions/consumer.rb
|
124
|
-
- lib/runcible/extensions/package_group.rb
|
125
|
-
- lib/runcible/extensions/yum_distributor.rb
|
126
114
|
- lib/runcible/extensions/importer.rb
|
127
|
-
- lib/runcible/extensions/
|
115
|
+
- lib/runcible/extensions/yum_distributor.rb
|
116
|
+
- lib/runcible/extensions/yum_importer.rb
|
117
|
+
- lib/runcible/extensions/package_group.rb
|
128
118
|
- lib/runcible/extensions/rpm.rb
|
119
|
+
- lib/runcible/extensions/consumer_group.rb
|
120
|
+
- lib/runcible/extensions/unit.rb
|
121
|
+
- lib/runcible/extensions/repository.rb
|
129
122
|
- lib/runcible/extensions/distribution.rb
|
123
|
+
- lib/runcible/extensions/distributor.rb
|
130
124
|
- lib/runcible/extensions/errata.rb
|
125
|
+
- lib/runcible.rb
|
131
126
|
homepage: https://github.com/Katello/runcible
|
132
127
|
licenses: []
|
133
|
-
|
134
128
|
post_install_message:
|
135
129
|
rdoc_options: []
|
136
|
-
|
137
|
-
require_paths:
|
130
|
+
require_paths:
|
138
131
|
- lib
|
139
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
132
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
140
133
|
none: false
|
141
|
-
requirements:
|
142
|
-
- -
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
|
145
|
-
|
146
|
-
- 0
|
147
|
-
version: "0"
|
148
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ! '>='
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
139
|
none: false
|
150
|
-
requirements:
|
151
|
-
- -
|
152
|
-
- !ruby/object:Gem::Version
|
153
|
-
|
154
|
-
segments:
|
155
|
-
- 0
|
156
|
-
version: "0"
|
140
|
+
requirements:
|
141
|
+
- - ! '>='
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
157
144
|
requirements: []
|
158
|
-
|
159
145
|
rubyforge_project:
|
160
|
-
rubygems_version: 1.8.
|
146
|
+
rubygems_version: 1.8.25
|
161
147
|
signing_key:
|
162
148
|
specification_version: 3
|
163
|
-
summary:
|
149
|
+
summary: ''
|
164
150
|
test_files: []
|
165
|
-
|
166
151
|
has_rdoc:
|