hammer_cli_katello 1.9.1 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hammer_cli_katello/acs.rb +7 -0
- data/lib/hammer_cli_katello/acs_bulk_actions.rb +38 -0
- data/lib/hammer_cli_katello/content_view_version.rb +21 -0
- data/lib/hammer_cli_katello/host_collection.rb +0 -15
- data/lib/hammer_cli_katello/host_collection_erratum.rb +8 -24
- data/lib/hammer_cli_katello/host_collection_package.rb +20 -57
- data/lib/hammer_cli_katello/host_collection_package_group.rb +20 -57
- data/lib/hammer_cli_katello/host_errata.rb +4 -12
- data/lib/hammer_cli_katello/host_package.rb +18 -59
- data/lib/hammer_cli_katello/host_package_group.rb +8 -33
- data/lib/hammer_cli_katello/unsupported_katello_agent_command_helper.rb +25 -0
- data/lib/hammer_cli_katello/version.rb +1 -1
- data/lib/hammer_cli_katello.rb +1 -1
- data/locale/bn/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/bn/hammer-cli-katello.edit.po +3255 -0
- data/locale/bn/hammer-cli-katello.po +643 -221
- data/locale/bn_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/bn_IN/hammer-cli-katello.edit.po +3255 -0
- data/locale/bn_IN/hammer-cli-katello.po +645 -223
- data/locale/bqi/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/bqi/hammer-cli-katello.edit.po +3251 -0
- data/locale/ca/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ca/hammer-cli-katello.edit.po +3255 -0
- data/locale/ca/hammer-cli-katello.po +651 -229
- data/locale/cs_CZ/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/cs_CZ/hammer-cli-katello.edit.po +3256 -0
- data/locale/cs_CZ/hammer-cli-katello.po +676 -254
- data/locale/de/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/de/hammer-cli-katello.edit.po +3329 -0
- data/locale/de/hammer-cli-katello.po +1017 -761
- data/locale/de_AT/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/de_AT/hammer-cli-katello.edit.po +3251 -0
- data/locale/de_AT/hammer-cli-katello.po +643 -221
- data/locale/de_DE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/de_DE/hammer-cli-katello.edit.po +3257 -0
- data/locale/de_DE/hammer-cli-katello.po +643 -221
- data/locale/el/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/el/hammer-cli-katello.edit.po +3255 -0
- data/locale/el/hammer-cli-katello.po +664 -242
- data/locale/en/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/en/hammer-cli-katello.po +645 -222
- data/locale/en_GB/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/en_GB/hammer-cli-katello.edit.po +3256 -0
- data/locale/en_GB/hammer-cli-katello.po +647 -225
- data/locale/en_US/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/en_US/hammer-cli-katello.edit.po +3251 -0
- data/locale/en_US/hammer-cli-katello.po +643 -221
- data/locale/es/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/es/hammer-cli-katello.edit.po +3322 -0
- data/locale/es/hammer-cli-katello.po +1040 -956
- data/locale/et_EE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/et_EE/hammer-cli-katello.edit.po +3251 -0
- data/locale/et_EE/hammer-cli-katello.po +643 -221
- data/locale/fr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/fr/hammer-cli-katello.edit.po +3347 -0
- data/locale/fr/hammer-cli-katello.po +1062 -971
- data/locale/gl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/gl/hammer-cli-katello.edit.po +3255 -0
- data/locale/gl/hammer-cli-katello.po +643 -221
- data/locale/gu/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/gu/hammer-cli-katello.edit.po +3255 -0
- data/locale/gu/hammer-cli-katello.po +645 -223
- data/locale/hammer-cli-katello.pot +1630 -992
- data/locale/he_IL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/he_IL/hammer-cli-katello.edit.po +3255 -0
- data/locale/he_IL/hammer-cli-katello.po +643 -221
- data/locale/hi/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/hi/hammer-cli-katello.edit.po +3255 -0
- data/locale/hi/hammer-cli-katello.po +645 -223
- data/locale/id/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/id/hammer-cli-katello.edit.po +3251 -0
- data/locale/id/hammer-cli-katello.po +643 -221
- data/locale/it/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/it/hammer-cli-katello.edit.po +3261 -0
- data/locale/it/hammer-cli-katello.po +901 -872
- data/locale/ja/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ja/hammer-cli-katello.edit.po +3273 -0
- data/locale/ja/hammer-cli-katello.po +1008 -982
- data/locale/ka/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ka/hammer-cli-katello.edit.po +3351 -0
- data/locale/ka/hammer-cli-katello.po +700 -287
- data/locale/kn/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/kn/hammer-cli-katello.edit.po +3255 -0
- data/locale/kn/hammer-cli-katello.po +645 -223
- data/locale/ko/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ko/hammer-cli-katello.edit.po +3258 -0
- data/locale/ko/hammer-cli-katello.po +907 -874
- data/locale/ml_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ml_IN/hammer-cli-katello.edit.po +3251 -0
- data/locale/ml_IN/hammer-cli-katello.po +643 -221
- data/locale/mr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/mr/hammer-cli-katello.edit.po +3255 -0
- data/locale/mr/hammer-cli-katello.po +645 -223
- data/locale/nl_NL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/nl_NL/hammer-cli-katello.edit.po +3259 -0
- data/locale/nl_NL/hammer-cli-katello.po +648 -224
- data/locale/or/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/or/hammer-cli-katello.edit.po +3255 -0
- data/locale/or/hammer-cli-katello.po +645 -223
- data/locale/pa/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/pa/hammer-cli-katello.edit.po +3255 -0
- data/locale/pa/hammer-cli-katello.po +645 -223
- data/locale/pl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/pl/hammer-cli-katello.edit.po +3256 -0
- data/locale/pl/hammer-cli-katello.po +647 -225
- data/locale/pl_PL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/pl_PL/hammer-cli-katello.edit.po +3251 -0
- data/locale/pl_PL/hammer-cli-katello.po +643 -221
- data/locale/pt/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/pt/hammer-cli-katello.edit.po +3255 -0
- data/locale/pt/hammer-cli-katello.po +643 -221
- data/locale/pt_BR/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/pt_BR/hammer-cli-katello.edit.po +3314 -0
- data/locale/pt_BR/hammer-cli-katello.po +1042 -977
- data/locale/ro/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ro/hammer-cli-katello.edit.po +3251 -0
- data/locale/ro/hammer-cli-katello.po +643 -221
- data/locale/ro_RO/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ro_RO/hammer-cli-katello.edit.po +3251 -0
- data/locale/ro_RO/hammer-cli-katello.po +643 -221
- data/locale/ru/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ru/hammer-cli-katello.edit.po +3260 -0
- data/locale/ru/hammer-cli-katello.po +936 -909
- data/locale/sl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/sl/hammer-cli-katello.edit.po +3255 -0
- data/locale/sl/hammer-cli-katello.po +645 -223
- data/locale/sv_SE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/sv_SE/hammer-cli-katello.edit.po +3256 -0
- data/locale/sv_SE/hammer-cli-katello.po +645 -223
- data/locale/ta/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ta/hammer-cli-katello.edit.po +3255 -0
- data/locale/ta/hammer-cli-katello.po +643 -221
- data/locale/ta_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ta_IN/hammer-cli-katello.edit.po +3255 -0
- data/locale/ta_IN/hammer-cli-katello.po +644 -222
- data/locale/te/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/te/hammer-cli-katello.edit.po +3255 -0
- data/locale/te/hammer-cli-katello.po +645 -223
- data/locale/tr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/tr/hammer-cli-katello.edit.po +3255 -0
- data/locale/tr/hammer-cli-katello.po +643 -221
- data/locale/vi/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/vi/hammer-cli-katello.edit.po +3251 -0
- data/locale/vi/hammer-cli-katello.po +643 -221
- data/locale/vi_VN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/vi_VN/hammer-cli-katello.edit.po +3251 -0
- data/locale/vi_VN/hammer-cli-katello.po +643 -221
- data/locale/zh/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/zh/hammer-cli-katello.edit.po +3251 -0
- data/locale/zh/hammer-cli-katello.po +643 -221
- data/locale/zh_CN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/zh_CN/hammer-cli-katello.edit.po +3268 -0
- data/locale/zh_CN/hammer-cli-katello.po +1069 -1018
- data/locale/zh_TW/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/zh_TW/hammer-cli-katello.edit.po +3257 -0
- data/locale/zh_TW/hammer-cli-katello.po +721 -665
- data/test/data/4.10/foreman_api.json +1 -0
- data/test/functional/host/errata/apply_test.rb +7 -37
- data/test/functional/host_collection/content_install_test.rb +14 -55
- data/test/functional/host_collection/content_remove_test.rb +13 -30
- data/test/functional/host_collection/content_update_test.rb +13 -30
- data/test/test_helper.rb +1 -1
- metadata +54 -4
- data/test/functional/host_collection/content_api_expectations.rb +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f66bd7ae12181e8cd2afcacc8f4075041ce8c3e1eb54143c2aa101ab05c1d382
|
4
|
+
data.tar.gz: ff5f5beec4477a942ae4f9c6e57fd9093af0521796b1c01263cfbb88b320a192
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ec444e6f8e7673f60223a2c1c65296d7d3b66fa55df4a5eab8718e52be1989db8645e180a4bd95b61780c0850027f027acfdc5d15d7f7afb659dfc2611c040b
|
7
|
+
data.tar.gz: 68caae7795b8cc7d23aff003847ad0e62f0b798d35b819bd3bc5cde27a2963143515771755c92758d5fea9184ada8ca5bbe127e2764b92c89254ed32fb24a8d6
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'hammer_cli_katello/acs_bulk_actions'
|
2
|
+
|
1
3
|
module HammerCLIKatello
|
2
4
|
class AcsCommand < HammerCLIKatello::Command
|
3
5
|
resource :alternate_content_sources
|
@@ -95,6 +97,11 @@ module HammerCLIKatello
|
|
95
97
|
|
96
98
|
build_options
|
97
99
|
end
|
100
|
+
|
98
101
|
autoload_subcommands
|
102
|
+
|
103
|
+
self.subcommand "bulk",
|
104
|
+
HammerCLIKatello::AcsBulkActionsCommand.desc,
|
105
|
+
HammerCLIKatello::AcsBulkActionsCommand
|
99
106
|
end
|
100
107
|
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module HammerCLIKatello
|
2
|
+
class AcsBulkActionsCommand < HammerCLIKatello::Command
|
3
|
+
desc 'Modify alternate content sources in bulk'
|
4
|
+
resource :alternate_content_sources_bulk_actions
|
5
|
+
|
6
|
+
class RefreshAllCommand < HammerCLIKatello::SingleResourceCommand
|
7
|
+
action :refresh_all_alternate_content_sources
|
8
|
+
command_name 'refresh-all'
|
9
|
+
desc _("Refresh all alternate content sources")
|
10
|
+
success_message _("Successfully refreshed all alternate content sources")
|
11
|
+
failure_message _("Could not refresh all alternate content sources")
|
12
|
+
|
13
|
+
build_options
|
14
|
+
end
|
15
|
+
|
16
|
+
class RefreshCommand < HammerCLIKatello::SingleResourceCommand
|
17
|
+
action :refresh_alternate_content_sources
|
18
|
+
command_name 'refresh'
|
19
|
+
desc _("Refresh alternate content sources")
|
20
|
+
success_message _("Successfully refreshed specified alternate content sources")
|
21
|
+
failure_message _("Could not refresh the specified alternate content sources")
|
22
|
+
|
23
|
+
build_options
|
24
|
+
end
|
25
|
+
|
26
|
+
class DestroyCommand < HammerCLIKatello::SingleResourceCommand
|
27
|
+
action :destroy_alternate_content_sources
|
28
|
+
command_name 'destroy'
|
29
|
+
desc _("Destroy alternate content sources")
|
30
|
+
success_message _("Sucessfully destroyed specified alternate content sources")
|
31
|
+
failure_message _("Could not destroy the specified alternate content sources")
|
32
|
+
|
33
|
+
build_options
|
34
|
+
end
|
35
|
+
|
36
|
+
autoload_subcommands
|
37
|
+
end
|
38
|
+
end
|
@@ -62,6 +62,27 @@ module HammerCLIKatello
|
|
62
62
|
from :filter do
|
63
63
|
field :id, _("Id")
|
64
64
|
field :name, _("Name")
|
65
|
+
field :content, _('Type')
|
66
|
+
field :inclusion, _('Inclusion'), Fields::Boolean
|
67
|
+
field :original_packages, _('Original packages'), Fields::Boolean, hide_blank: true
|
68
|
+
# rubocop:disable Layout/LineLength
|
69
|
+
field :original_module_streams, _('Original module streams'), Fields::Boolean, hide_blank: true
|
70
|
+
# rubocop:enable Layout/LineLength
|
71
|
+
end
|
72
|
+
collection :rules, _("Rules"), hide_blank: true, hide_empty: true do
|
73
|
+
field :id, _('Id')
|
74
|
+
field :name, _('Name'), Fields::Field, hide_blank: true
|
75
|
+
field :uuid, _('UUID'), Fields::Field, hide_blank: true
|
76
|
+
field :module_stream_id, _('Module stream Id'), Fields::Field, hide_blank: true
|
77
|
+
collection :types, _('Types'), hide_blank: true, hide_empty: true do
|
78
|
+
field nil, _('')
|
79
|
+
end
|
80
|
+
field :architecture, _('Architecture'), Fields::Field, :hide_blank => true
|
81
|
+
field :content_view_filter_id, _('Content view filter Id')
|
82
|
+
field :errata_id, _('Errata Id'), Fields::Field, :hide_blank => true
|
83
|
+
field :date_type, _('Date type'), Fields::Field, :hide_blank => true
|
84
|
+
field :start_date, _('Start date'), Fields::Field, :hide_blank => true
|
85
|
+
field :end_date, _('End date'), Fields::Field, :hide_blank => true
|
65
86
|
end
|
66
87
|
end
|
67
88
|
field :dependency_solving, _("Dependency Solving"), Fields::Field, :hide_blank => true
|
@@ -220,21 +220,6 @@ module HammerCLIKatello
|
|
220
220
|
end
|
221
221
|
end
|
222
222
|
|
223
|
-
class InstallContentBaseCommand < ContentBaseCommand
|
224
|
-
action :install_content
|
225
|
-
command_name "install"
|
226
|
-
end
|
227
|
-
|
228
|
-
class UpdateContentBaseCommand < ContentBaseCommand
|
229
|
-
action :update_content
|
230
|
-
command_name "update"
|
231
|
-
end
|
232
|
-
|
233
|
-
class RemoveContentBaseCommand < ContentBaseCommand
|
234
|
-
action :remove_content
|
235
|
-
command_name "remove"
|
236
|
-
end
|
237
|
-
|
238
223
|
require 'hammer_cli_katello/host_collection_package'
|
239
224
|
subcommand HammerCLIKatello::HostCollectionPackageCommand.command_name,
|
240
225
|
HammerCLIKatello::HostCollectionPackageCommand.desc,
|
@@ -1,33 +1,17 @@
|
|
1
1
|
module HammerCLIKatello
|
2
2
|
class HostCollectionErratumCommand < HammerCLIKatello::Command
|
3
3
|
command_name "erratum"
|
4
|
-
desc
|
4
|
+
desc "Manage errata on your host collections. "\
|
5
|
+
"These commands are no longer available. "\
|
6
|
+
"Use the remote execution equivalent"
|
5
7
|
|
6
|
-
class InstallCommand < HammerCLIKatello::
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
option('--errata',
|
12
|
-
'ERRATA',
|
13
|
-
_("List of Errata to install"),
|
14
|
-
:required => true,
|
15
|
-
:format => HammerCLI::Options::Normalizers::List.new,
|
16
|
-
:attribute_name => :content)
|
17
|
-
|
18
|
-
def execute
|
19
|
-
warn "This command uses katello agent and will be removed in favor of remote execution " \
|
20
|
-
"in a future release."
|
21
|
-
warn "The remote execution equivalent is `hammer job-invocation create --feature " \
|
22
|
-
"katello_errata_install`. Specify the host collection with the --search-query " \
|
23
|
-
"parameter, e.g. `--search-query \"host_collection = MyCollection\"` or " \
|
24
|
-
"`--search-query \"host_collection_id=6\"`."
|
25
|
-
super
|
8
|
+
class InstallCommand < HammerCLIKatello::Command
|
9
|
+
command_name "install"
|
10
|
+
def self.rex_feature
|
11
|
+
"katello_errata_install"
|
26
12
|
end
|
27
13
|
|
28
|
-
|
29
|
-
'errata'
|
30
|
-
end
|
14
|
+
include UnsupportedKatelloAgentCommandHelper
|
31
15
|
end
|
32
16
|
|
33
17
|
autoload_subcommands
|
@@ -1,72 +1,35 @@
|
|
1
1
|
module HammerCLIKatello
|
2
2
|
class HostCollectionPackageCommand < HammerCLIKatello::Command
|
3
3
|
command_name "package"
|
4
|
-
desc
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
:format => HammerCLI::Options::Normalizers::List.new,
|
13
|
-
:attribute_name => :content)
|
4
|
+
desc "Manage packages on your host collections. "\
|
5
|
+
"These commands are no longer available. "\
|
6
|
+
"Use the remote execution equivalent"
|
7
|
+
|
8
|
+
class InstallCommand < HammerCLIKatello::Command
|
9
|
+
command_name "install"
|
10
|
+
def self.rex_feature
|
11
|
+
"katello_package_install"
|
14
12
|
end
|
15
13
|
|
16
|
-
|
17
|
-
'package'
|
18
|
-
end
|
14
|
+
include UnsupportedKatelloAgentCommandHelper
|
19
15
|
end
|
20
16
|
|
21
|
-
class
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
failure_message _("Could not schedule installation of package(s)")
|
26
|
-
|
27
|
-
def execute
|
28
|
-
warn "This command uses katello agent and will be removed in favor of remote execution " \
|
29
|
-
"in a future release."
|
30
|
-
warn "The remote execution equivalent is `hammer job-invocation create --feature " \
|
31
|
-
"katello_package_install`. Specify the host collection with the --search-query " \
|
32
|
-
"parameter, e.g. `--search-query \"host_collection = MyCollection\"` or " \
|
33
|
-
"`--search-query \"host_collection_id=6\"`."
|
34
|
-
super
|
17
|
+
class UpdateCommand < HammerCLIKatello::Command
|
18
|
+
command_name "update"
|
19
|
+
def self.rex_feature
|
20
|
+
"katello_package_update"
|
35
21
|
end
|
36
|
-
end
|
37
22
|
|
38
|
-
|
39
|
-
include PackageContentType
|
40
|
-
desc _("Update packages on content hosts contained within a host collection")
|
41
|
-
success_message _("Successfully scheduled update of package(s).")
|
42
|
-
failure_message _("Could not schedule update of package(s)")
|
43
|
-
|
44
|
-
def execute
|
45
|
-
warn "This command uses katello agent and will be removed in favor of remote execution " \
|
46
|
-
"in a future release."
|
47
|
-
warn "The remote execution equivalent is `hammer job-invocation create --feature " \
|
48
|
-
"katello_package_update`. Specify the host collection with the --search-query " \
|
49
|
-
"parameter, e.g. `--search-query \"host_collection = MyCollection\"` or " \
|
50
|
-
"`--search-query \"host_collection_id=6\"`."
|
51
|
-
super
|
52
|
-
end
|
23
|
+
include UnsupportedKatelloAgentCommandHelper
|
53
24
|
end
|
54
25
|
|
55
|
-
class RemoveCommand < HammerCLIKatello::
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
failure_message _("Could not schedule removal of package(s)")
|
60
|
-
|
61
|
-
def execute
|
62
|
-
warn "This command uses katello agent and will be removed in favor of remote execution " \
|
63
|
-
"in a future release."
|
64
|
-
warn "The remote execution equivalent is `hammer job-invocation create --feature " \
|
65
|
-
"katello_package_remove`. Specify the host collection with the --search-query " \
|
66
|
-
"parameter, e.g. `--search-query \"host_collection = MyCollection\"` or " \
|
67
|
-
"`--search-query \"host_collection_id=6\"`."
|
68
|
-
super
|
26
|
+
class RemoveCommand < HammerCLIKatello::Command
|
27
|
+
command_name "remove"
|
28
|
+
def self.rex_feature
|
29
|
+
"katello_package_remove"
|
69
30
|
end
|
31
|
+
|
32
|
+
include UnsupportedKatelloAgentCommandHelper
|
70
33
|
end
|
71
34
|
|
72
35
|
autoload_subcommands
|
@@ -1,72 +1,35 @@
|
|
1
1
|
module HammerCLIKatello
|
2
2
|
class HostCollectionPackageGroupCommand < HammerCLIKatello::Command
|
3
3
|
command_name "package-group"
|
4
|
-
desc
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
:format => HammerCLI::Options::Normalizers::List.new,
|
13
|
-
:attribute_name => :content)
|
4
|
+
desc "Manage package-groups on your host collections. "\
|
5
|
+
"These commands are no longer available. "\
|
6
|
+
"Use the remote execution equivalent"
|
7
|
+
|
8
|
+
class InstallCommand < HammerCLIKatello::Command
|
9
|
+
command_name "install"
|
10
|
+
def self.rex_feature
|
11
|
+
"katello_group_install"
|
14
12
|
end
|
15
13
|
|
16
|
-
|
17
|
-
'package_group'
|
18
|
-
end
|
14
|
+
include UnsupportedKatelloAgentCommandHelper
|
19
15
|
end
|
20
16
|
|
21
|
-
class
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
failure_message _("Could not schedule installation of package-group(s)")
|
26
|
-
|
27
|
-
def execute
|
28
|
-
warn "This command uses katello agent and will be removed in favor of remote execution " \
|
29
|
-
"in a future release."
|
30
|
-
warn "The remote execution equivalent is `hammer job-invocation create --feature " \
|
31
|
-
"katello_group_install`. Specify the host collection with the --search-query " \
|
32
|
-
"parameter, e.g. `--search-query \"host_collection = MyCollection\"` or " \
|
33
|
-
"`--search-query \"host_collection_id=6\"`."
|
34
|
-
super
|
17
|
+
class UpdateCommand < HammerCLIKatello::Command
|
18
|
+
command_name "update"
|
19
|
+
def self.rex_feature
|
20
|
+
"katello_group_update"
|
35
21
|
end
|
36
|
-
end
|
37
22
|
|
38
|
-
|
39
|
-
include PackageGroupContentType
|
40
|
-
desc _("Update package-groups on content hosts contained within a host collection")
|
41
|
-
success_message _("Successfully scheduled update of package-groups(s).")
|
42
|
-
failure_message _("Could not schedule update of package-group(s)")
|
43
|
-
|
44
|
-
def execute
|
45
|
-
warn "This command uses katello agent and will be removed in favor of remote execution " \
|
46
|
-
"in a future release."
|
47
|
-
warn "The remote execution equivalent is `hammer job-invocation create --feature " \
|
48
|
-
"katello_group_update`. Specify the host collection with the --search-query " \
|
49
|
-
"parameter, e.g. `--search-query \"host_collection = MyCollection\"` or " \
|
50
|
-
"`--search-query \"host_collection_id=6\"`."
|
51
|
-
super
|
52
|
-
end
|
23
|
+
include UnsupportedKatelloAgentCommandHelper
|
53
24
|
end
|
54
25
|
|
55
|
-
class RemoveCommand < HammerCLIKatello::
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
failure_message _("Could not schedule removal of package-group(s)")
|
60
|
-
|
61
|
-
def execute
|
62
|
-
warn "This command uses katello agent and will be removed in favor of remote execution " \
|
63
|
-
"in a future release."
|
64
|
-
warn "The remote execution equivalent is `hammer job-invocation create --feature " \
|
65
|
-
"katello_group_remove`. Specify the host collection with the --search-query " \
|
66
|
-
"parameter, e.g. `--search-query \"host_collection = MyCollection\"` or " \
|
67
|
-
"`--search-query \"host_collection_id=6\"`."
|
68
|
-
super
|
26
|
+
class RemoveCommand < HammerCLIKatello::Command
|
27
|
+
command_name "remove"
|
28
|
+
def self.rex_feature
|
29
|
+
"katello_group_remove"
|
69
30
|
end
|
31
|
+
|
32
|
+
include UnsupportedKatelloAgentCommandHelper
|
70
33
|
end
|
71
34
|
|
72
35
|
autoload_subcommands
|
@@ -5,21 +5,13 @@ module HammerCLIKatello
|
|
5
5
|
desc "Manage errata on your hosts"
|
6
6
|
|
7
7
|
class ApplyCommand < HammerCLIKatello::SingleResourceCommand
|
8
|
-
include HammerCLIForemanTasks::Async
|
9
|
-
resource :host_errata, :apply
|
10
8
|
command_name "apply"
|
11
|
-
success_message _("Errata is being applied with task %{id}.")
|
12
|
-
failure_message _("Could not apply errata")
|
13
9
|
|
14
|
-
|
15
|
-
|
16
|
-
def execute
|
17
|
-
warn "This command uses katello agent and will be removed in favor of remote execution " \
|
18
|
-
"in a future release."
|
19
|
-
warn "The remote execution equivalent is `hammer job-invocation create --feature " \
|
20
|
-
"katello_errata_install`."
|
21
|
-
super
|
10
|
+
def self.rex_feature
|
11
|
+
"katello_errata_install"
|
22
12
|
end
|
13
|
+
|
14
|
+
include UnsupportedKatelloAgentCommandHelper
|
23
15
|
end
|
24
16
|
|
25
17
|
class ListCommand < HammerCLIKatello::ListCommand
|
@@ -12,84 +12,43 @@ module HammerCLIKatello
|
|
12
12
|
build_options
|
13
13
|
end
|
14
14
|
|
15
|
-
class InstallCommand < HammerCLIKatello::
|
16
|
-
include HammerCLIForemanTasks::Async
|
17
|
-
resource :host_packages, :install
|
15
|
+
class InstallCommand < HammerCLIKatello::Command
|
18
16
|
command_name "install"
|
19
|
-
success_message "Packages install successfully."
|
20
|
-
failure_message "Could not install packages"
|
21
17
|
|
22
|
-
|
23
|
-
|
18
|
+
def self.rex_feature
|
19
|
+
"katello_package_install"
|
24
20
|
end
|
25
21
|
|
26
|
-
|
27
|
-
|
28
|
-
def execute
|
29
|
-
warn "This command uses katello agent and will be removed in favor of remote execution " \
|
30
|
-
"in a future release."
|
31
|
-
warn "The remote execution equivalent is `hammer job-invocation create --feature " \
|
32
|
-
"katello_package_install`."
|
33
|
-
super
|
34
|
-
end
|
22
|
+
include UnsupportedKatelloAgentCommandHelper
|
35
23
|
end
|
36
24
|
|
37
|
-
class UpgradeCommand < HammerCLIKatello::
|
38
|
-
include HammerCLIForemanTasks::Async
|
39
|
-
resource :host_packages, :upgrade
|
25
|
+
class UpgradeCommand < HammerCLIKatello::Command
|
40
26
|
command_name "upgrade"
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
build_options
|
45
|
-
|
46
|
-
def execute
|
47
|
-
warn "This command uses katello agent and will be removed in favor of remote execution " \
|
48
|
-
"in a future release."
|
49
|
-
warn "The remote execution equivalent is `hammer job-invocation create --feature " \
|
50
|
-
"katello_package_update`."
|
51
|
-
super
|
27
|
+
def self.rex_feature
|
28
|
+
"katello_package_update"
|
52
29
|
end
|
30
|
+
|
31
|
+
include UnsupportedKatelloAgentCommandHelper
|
53
32
|
end
|
54
33
|
|
55
|
-
class UpgradeAllCommand < HammerCLIKatello::
|
56
|
-
include HammerCLIForemanTasks::Async
|
57
|
-
resource :host_packages, :upgrade_all
|
34
|
+
class UpgradeAllCommand < HammerCLIKatello::Command
|
58
35
|
command_name "upgrade-all"
|
59
|
-
success_message "All packages upgraded successfully."
|
60
|
-
failure_message "Could not upgrade all packages"
|
61
36
|
|
62
|
-
|
63
|
-
|
64
|
-
def execute
|
65
|
-
warn "This command uses katello agent and will be removed in favor of remote execution " \
|
66
|
-
"in a future release."
|
67
|
-
warn "The remote execution equivalent is `hammer job-invocation create --feature " \
|
68
|
-
"katello_package_update`."
|
69
|
-
super
|
37
|
+
def self.rex_feature
|
38
|
+
"katello_package_update"
|
70
39
|
end
|
40
|
+
|
41
|
+
include UnsupportedKatelloAgentCommandHelper
|
71
42
|
end
|
72
43
|
|
73
|
-
class RemoveCommand < HammerCLIKatello::
|
74
|
-
include HammerCLIForemanTasks::Async
|
75
|
-
resource :host_packages, :remove
|
44
|
+
class RemoveCommand < HammerCLIKatello::Command
|
76
45
|
command_name "remove"
|
77
|
-
success_message "Packages removed successfully."
|
78
|
-
failure_message "Could not remove packages"
|
79
46
|
|
80
|
-
|
81
|
-
|
47
|
+
def self.rex_feature
|
48
|
+
"katello_package_remove"
|
82
49
|
end
|
83
50
|
|
84
|
-
|
85
|
-
|
86
|
-
def execute
|
87
|
-
warn "This command uses katello agent and will be removed in favor of remote execution " \
|
88
|
-
"in a future release."
|
89
|
-
warn "The remote execution equivalent is `hammer job-invocation create --feature " \
|
90
|
-
"katello_package_remove`."
|
91
|
-
super
|
92
|
-
end
|
51
|
+
include UnsupportedKatelloAgentCommandHelper
|
93
52
|
end
|
94
53
|
|
95
54
|
autoload_subcommands
|
@@ -1,49 +1,24 @@
|
|
1
1
|
module HammerCLIKatello
|
2
2
|
class HostPackageGroup < HammerCLIKatello::Command
|
3
|
-
desc "Manage package-groups on your hosts"
|
3
|
+
desc "Manage package-groups on your hosts. These commands are no longer available"\
|
4
|
+
"\n Use the remote execution equivalent"
|
4
5
|
|
5
6
|
class InstallCommand < HammerCLIKatello::SingleResourceCommand
|
6
|
-
include HammerCLIForemanTasks::Async
|
7
|
-
resource :host_packages, :install
|
8
7
|
command_name "install"
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
validate_options do
|
13
|
-
option(:option_groups).required
|
8
|
+
def self.rex_feature
|
9
|
+
"katello_group_install"
|
14
10
|
end
|
15
11
|
|
16
|
-
|
17
|
-
|
18
|
-
def execute
|
19
|
-
warn "This command uses katello agent and will be removed in favor of remote execution " \
|
20
|
-
"in a future release."
|
21
|
-
warn "The remote execution equivalent is `hammer job-invocation create --feature " \
|
22
|
-
"katello_group_install`."
|
23
|
-
super
|
24
|
-
end
|
12
|
+
include UnsupportedKatelloAgentCommandHelper
|
25
13
|
end
|
26
14
|
|
27
15
|
class RemoveCommand < HammerCLIKatello::SingleResourceCommand
|
28
|
-
include HammerCLIForemanTasks::Async
|
29
|
-
resource :host_packages, :remove
|
30
16
|
command_name "remove"
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
validate_options do
|
35
|
-
option(:option_groups).required
|
17
|
+
def self.rex_feature
|
18
|
+
"katello_group_remove"
|
36
19
|
end
|
37
20
|
|
38
|
-
|
39
|
-
|
40
|
-
def execute
|
41
|
-
warn "This command uses katello agent and will be removed in favor of remote execution " \
|
42
|
-
"in a future release."
|
43
|
-
warn "The remote execution equivalent is `hammer job-invocation create --feature " \
|
44
|
-
"katello_group_remove`."
|
45
|
-
super
|
46
|
-
end
|
21
|
+
include UnsupportedKatelloAgentCommandHelper
|
47
22
|
end
|
48
23
|
|
49
24
|
autoload_subcommands
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module HammerCLIKatello
|
2
|
+
module UnsupportedKatelloAgentCommandHelper
|
3
|
+
def execute
|
4
|
+
print_message(failure_message)
|
5
|
+
HammerCLI::EX_UNAVAILABLE
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.host_collection_help_text
|
9
|
+
"Specify the host collection with the --search-query " \
|
10
|
+
"parameter, e.g. `--search-query \"host_collection = MyCollection\"` or " \
|
11
|
+
"`--search-query \"host_collection_id=6\"`"
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.included(base)
|
15
|
+
alternate_command = "hammer job-invocation create --feature #{base.rex_feature}"
|
16
|
+
message = "Use the remote execution equivalent `#{alternate_command}`."
|
17
|
+
if base.name =~ /HostCollection/
|
18
|
+
message = "#{message} #{host_collection_help_text}"
|
19
|
+
end
|
20
|
+
base.desc "Not supported. #{message}"
|
21
|
+
base.failure_message "Not supported. #{message}"
|
22
|
+
base.option ["-h", "--help"], :flag, "Unsupported Operation - #{message}"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/hammer_cli_katello.rb
CHANGED
@@ -31,7 +31,7 @@ module HammerCLIKatello
|
|
31
31
|
require 'hammer_cli_katello/local_helper'
|
32
32
|
require 'hammer_cli_katello/apipie_helper'
|
33
33
|
require 'hammer_cli_katello/content_export_helper'
|
34
|
-
|
34
|
+
require 'hammer_cli_katello/unsupported_katello_agent_command_helper'
|
35
35
|
# commands
|
36
36
|
HammerCLI::MainCommand.lazy_subcommand("activation-key", _("Manipulate activation keys"),
|
37
37
|
'HammerCLIKatello::ActivationKeyCommand',
|
Binary file
|