hammer_cli_katello 0.1.0 → 0.1.1
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.
- checksums.yaml +4 -4
- data/lib/hammer_cli_katello/host_collection.rb +10 -5
- data/lib/hammer_cli_katello/version.rb +1 -1
- data/test/data/3.2/foreman_api.json +1 -1
- data/test/functional/host_collection/content_install_test.rb +37 -0
- data/test/functional/host_collection/content_remove_test.rb +27 -0
- data/test/functional/host_collection/content_update_test.rb +27 -0
- data/test/functional/host_collection/list_test.rb +21 -0
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a05df3aa9c87671b9a09e58400063e73c983074
|
4
|
+
data.tar.gz: 9a8972600cac00f5ac586171eb824e065b940171
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a123fe169d342fa4c7a781ec2d3269cb98387cc0a426a651c090cd97bb2fff9cc65b0afd1d7d3d6f0e4a56e78ba13828c00004936607c87aed66634c791acc1
|
7
|
+
data.tar.gz: 96f2fc32799220946383e73a758833b23eac68dae168cd6dea2e6e9ea5b090f7143a1288cff070b8a721a07ad4cd1bc3a2a88f905227b9a0e2d9c6b5d1292e49
|
@@ -150,18 +150,23 @@ module HammerCLIKatello
|
|
150
150
|
|
151
151
|
autoload_subcommands
|
152
152
|
|
153
|
-
class ContentBaseCommand <
|
154
|
-
resource :
|
153
|
+
class ContentBaseCommand < Command
|
154
|
+
resource :hosts_bulk_actions
|
155
|
+
|
156
|
+
option "--id", "HOST_COLLECTION_ID", _("Host Collection ID"),
|
157
|
+
:attribute_name => :option_host_collection_id
|
158
|
+
option "--name", "HOST_COLLECTION_NAME", _("Host Collection Name"),
|
159
|
+
:attribute_name => :option_host_collection_name
|
155
160
|
|
156
161
|
build_options do |o|
|
157
|
-
o.
|
162
|
+
o.expand(:all).including(:organizations)
|
158
163
|
end
|
159
164
|
|
160
165
|
def request_params
|
161
166
|
params = super
|
162
167
|
params['content'] = content
|
163
168
|
params['content_type'] = content_type
|
164
|
-
params['included'] = { :
|
169
|
+
params['included'] = { search: "host_collection_id=\"#{option_host_collection_id}\"" }
|
165
170
|
params.delete('id')
|
166
171
|
params
|
167
172
|
end
|
@@ -169,7 +174,7 @@ module HammerCLIKatello
|
|
169
174
|
def resolver
|
170
175
|
api = HammerCLI::Connection.get("foreman").api
|
171
176
|
custom_resolver = Class.new(HammerCLIKatello::IdResolver) do
|
172
|
-
def
|
177
|
+
def hosts_bulk_action_id(options)
|
173
178
|
host_collection_id(options)
|
174
179
|
end
|
175
180
|
end
|