hammer_cli_katello 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MmZhZjI1MGUyYzAwMzM1ZDIwOGE2ZjJiMDQwYzRlZTRmODVhMDdlMw==
5
- data.tar.gz: !binary |-
6
- NGExMzhlODg3YWZlZDBjMzM5ZTE1ZTQzMzI2ODliYTdkMzNiM2NmNA==
2
+ SHA1:
3
+ metadata.gz: d07011f57a995242f064fdac0ed256fe65bcd413
4
+ data.tar.gz: 8136089de18f21b788c95ca25dad367a9ebfe9a1
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- N2IxMjg0ODcxODkyMjkzMGVjZmY0NDU2M2Q1NTAwNjRjNDhlODQzYWYzODYy
10
- MDdjMTNhNTM4OTM3MmNiNGVhYWI5ZWU1MWVlM2E1YzYxMjkzNTQ3ZDkwMGQ1
11
- OGFhZWZkZGRmZjljZjZiY2NiYWVjMTBlNWM3MmNkMzYwNDI4NmM=
12
- data.tar.gz: !binary |-
13
- NTU5ZWQ5Zjg5MDc3MTg2NDc3YjhlMGM2ZjI1ODU2NWE5N2FjYzU5ZThjY2U3
14
- N2MzYTQwNDk3Y2M0ZjU1ODI1MjNhYzY0Y2QxYmMyMTU5OGE4ZTg5ZDhmN2Vi
15
- YzRhZDE5Y2FmZmNiMzUxM2FlZmNlNmFjODMwZmI5MDg3NGNlZTg=
6
+ metadata.gz: 7f1573edfc3351222bb5b4ea64c364f92d74610482086ded8bf9257b43231660b98d5f879de03483412462e06a9c6ed1111fbb9916ab105f1845eac64e333215
7
+ data.tar.gz: bf837632f9b091396796916d9adda4ecb44fb69ba44b8e63bd7389be1b3a82cf9d15320fd61b9e69fd9575661bea2562805d43c326a45cbe9deb94d0ff0b4998
@@ -18,7 +18,9 @@ module HammerCLIKatello
18
18
  version
19
19
  end
20
20
 
21
- build_options
21
+ build_options do |o|
22
+ o.expand(:all).including(:organizations)
23
+ end
22
24
  end
23
25
 
24
26
  class InfoCommand < HammerCLIKatello::InfoCommand
@@ -55,7 +57,7 @@ module HammerCLIKatello
55
57
  end
56
58
 
57
59
  build_options do |o|
58
- o.expand(:all).including(:environments)
60
+ o.expand(:all).including(:environments, :content_views, :organizations)
59
61
  end
60
62
  end
61
63
 
@@ -110,7 +112,7 @@ module HammerCLIKatello
110
112
  failure_message _("Could not delete the content view")
111
113
 
112
114
  build_options do |o|
113
- o.expand(:all).including(:environments)
115
+ o.expand(:all).including(:environments, :content_views, :organizations)
114
116
  end
115
117
  end
116
118
 
@@ -130,10 +132,10 @@ module HammerCLIKatello
130
132
  :format => HammerCLI::Options::Normalizers::List.new
131
133
  )
132
134
 
133
- option('--id',
134
- 'ID',
135
- _("ID of a content view version to incrementally update"),
136
- :required => true
135
+ option('--content-host-ids',
136
+ 'CONTENT_HOST_IDS',
137
+ _("IDs of content hosts to update"),
138
+ :format => HammerCLI::Options::Normalizers::List.new
137
139
  )
138
140
 
139
141
  def request_params
@@ -157,13 +159,20 @@ module HammerCLIKatello
157
159
  add_content[key] = value if options.key?(HammerCLI.option_accessor_name(key))
158
160
  end
159
161
 
162
+ if option_content_host_ids
163
+ params['update_systems'] = {'included' => {'ids' => option_content_host_ids}}
164
+ end
165
+
160
166
  params['add_content'] = add_content
161
167
 
162
168
  params.delete('id')
163
169
  params
164
170
  end
165
171
 
166
- build_options
172
+ build_options do |opt|
173
+ opt.expand(:all)
174
+ opt.without(:content_view_version_environments, :ids)
175
+ end
167
176
  end
168
177
 
169
178
  autoload_subcommands
@@ -19,13 +19,21 @@ module HammerCLIKatello
19
19
  end
20
20
  end
21
21
 
22
+ module LimitFieldDataExtension
23
+ def extend_data(data)
24
+ data['_limit'] = data['unlimited_content_hosts'] ? 'None' : data['max_content_hosts']
25
+ data
26
+ end
27
+ end
28
+
22
29
  class ListCommand < HammerCLIKatello::ListCommand
30
+ include LimitFieldDataExtension
23
31
  resource :host_collections, :index
24
32
 
25
33
  output do
26
34
  field :id, _("ID")
27
35
  field :name, _("Name")
28
- field :max_content_hosts, _("Limit")
36
+ field :_limit, _("Limit")
29
37
  field :description, _("Description")
30
38
  end
31
39
 
@@ -49,11 +57,11 @@ module HammerCLIKatello
49
57
  end
50
58
 
51
59
  class InfoCommand < HammerCLIKatello::InfoCommand
60
+ include LimitFieldDataExtension
52
61
  resource :host_collections, :show
53
62
 
54
63
  output ListCommand.output_definition do
55
64
  field :total_content_hosts, _("Total Content Hosts")
56
- field :max_content_hosts, _("Max Content Hosts")
57
65
  end
58
66
 
59
67
  build_options
@@ -11,7 +11,9 @@ module HammerCLIKatello
11
11
  field :version, _("Version")
12
12
  end
13
13
 
14
- build_options
14
+ build_options do |o|
15
+ o.expand(:all).including(:organizations, :content_views)
16
+ end
15
17
  end
16
18
 
17
19
  class InfoCommand < HammerCLIKatello::InfoCommand
@@ -42,7 +44,9 @@ module HammerCLIKatello
42
44
  end
43
45
  end
44
46
 
45
- build_options
47
+ build_options do |o|
48
+ o.expand(:all).including(:organizations)
49
+ end
46
50
  end
47
51
 
48
52
  autoload_subcommands
@@ -180,9 +180,9 @@ module HammerCLIKatello
180
180
  fullpath = ::File.expand_path(path)
181
181
 
182
182
  if File.directory?(fullpath)
183
- Dir["#{fullpath}/*"].map { |file| ::File.new(file, 'rb') }
183
+ Dir["#{fullpath}/*"]
184
184
  else
185
- [::File.new(fullpath, 'rb')]
185
+ [fullpath]
186
186
  end
187
187
  end
188
188
  end
@@ -193,7 +193,9 @@ module HammerCLIKatello
193
193
 
194
194
  def execute
195
195
  @failure = false
196
- option_content.each { |file| upload_file(file) }
196
+ option_content.each do |file_path|
197
+ File.open(file_path, 'rb') { |file| upload_file file }
198
+ end
197
199
 
198
200
  @failure ? HammerCLI::EX_DATAERR : HammerCLI::EX_OK
199
201
  end
@@ -1,5 +1,5 @@
1
1
  module HammerCLIKatello
2
2
  def self.version
3
- @version ||= Gem::Version.new('0.0.14')
3
+ @version ||= Gem::Version.new('0.0.15')
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hammer_cli_katello
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Price
@@ -23,96 +23,96 @@ authors:
23
23
  autorequire:
24
24
  bindir: bin
25
25
  cert_chain: []
26
- date: 2015-05-26 00:00:00.000000000 Z
26
+ date: 2015-07-07 00:00:00.000000000 Z
27
27
  dependencies:
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: hammer_cli_foreman
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ! '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: 0.1.3
35
- - - <
35
+ - - "<"
36
36
  - !ruby/object:Gem::Version
37
37
  version: 0.3.0
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  requirements:
42
- - - ! '>='
42
+ - - ">="
43
43
  - !ruby/object:Gem::Version
44
44
  version: 0.1.3
45
- - - <
45
+ - - "<"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.3.0
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: hammer_cli_foreman_tasks
50
50
  requirement: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.0.3
55
55
  type: :runtime
56
56
  prerelease: false
57
57
  version_requirements: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 0.0.3
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: hammer_cli_foreman_bootdisk
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ! '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  type: :runtime
70
70
  prerelease: false
71
71
  version_requirements: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ! '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  - !ruby/object:Gem::Dependency
77
77
  name: hammer_cli_foreman_docker
78
78
  requirement: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ! '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  type: :runtime
84
84
  prerelease: false
85
85
  version_requirements: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ! '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  - !ruby/object:Gem::Dependency
91
91
  name: rake
92
92
  requirement: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ! '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  type: :development
98
98
  prerelease: false
99
99
  version_requirements: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ! '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  - !ruby/object:Gem::Dependency
105
105
  name: thor
106
106
  requirement: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ! '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  type: :development
112
112
  prerelease: false
113
113
  version_requirements: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ! '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  - !ruby/object:Gem::Dependency
@@ -133,56 +133,56 @@ dependencies:
133
133
  name: minitest-spec-context
134
134
  requirement: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ! '>='
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  type: :development
140
140
  prerelease: false
141
141
  version_requirements: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ! '>='
143
+ - - ">="
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: simplecov
148
148
  requirement: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ! '>='
150
+ - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  type: :development
154
154
  prerelease: false
155
155
  version_requirements: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ! '>='
157
+ - - ">="
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0'
160
160
  - !ruby/object:Gem::Dependency
161
161
  name: mocha
162
162
  requirement: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ! '>='
164
+ - - ">="
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  type: :development
168
168
  prerelease: false
169
169
  version_requirements: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ! '>='
171
+ - - ">="
172
172
  - !ruby/object:Gem::Version
173
173
  version: '0'
174
174
  - !ruby/object:Gem::Dependency
175
175
  name: ci_reporter
176
176
  requirement: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ! '>='
178
+ - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
181
  type: :development
182
182
  prerelease: false
183
183
  version_requirements: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ! '>='
185
+ - - ">="
186
186
  - !ruby/object:Gem::Version
187
187
  version: '0'
188
188
  - !ruby/object:Gem::Dependency
@@ -203,14 +203,14 @@ dependencies:
203
203
  name: rubocop-checkstyle_formatter
204
204
  requirement: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - ! '>='
206
+ - - ">="
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
209
  type: :development
210
210
  prerelease: false
211
211
  version_requirements: !ruby/object:Gem::Requirement
212
212
  requirements:
213
- - - ! '>='
213
+ - - ">="
214
214
  - !ruby/object:Gem::Version
215
215
  version: '0'
216
216
  description: Hammer-CLI-Katello is a plugin for Hammer to provide connectivity to
@@ -276,17 +276,17 @@ require_paths:
276
276
  - lib
277
277
  required_ruby_version: !ruby/object:Gem::Requirement
278
278
  requirements:
279
- - - ! '>='
279
+ - - ">="
280
280
  - !ruby/object:Gem::Version
281
281
  version: '0'
282
282
  required_rubygems_version: !ruby/object:Gem::Requirement
283
283
  requirements:
284
- - - ! '>='
284
+ - - ">="
285
285
  - !ruby/object:Gem::Version
286
286
  version: '0'
287
287
  requirements: []
288
288
  rubyforge_project:
289
- rubygems_version: 2.4.3
289
+ rubygems_version: 2.4.5
290
290
  signing_key:
291
291
  specification_version: 4
292
292
  summary: Katello commands for Hammer