hammer_cli_katello 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/hammer_cli_katello.rb +9 -0
- data/lib/hammer_cli_katello/associating_commands.rb +20 -0
- data/lib/hammer_cli_katello/content_view_puppet_module.rb +24 -4
- data/lib/hammer_cli_katello/package.rb +39 -0
- data/lib/hammer_cli_katello/package_group.rb +33 -0
- data/lib/hammer_cli_katello/version.rb +1 -1
- data/locale/zanata.xml +2 -3
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWU2MDg5ZTA2Y2VhYWY5Njg4YTQ2OGVlZTVjMDQ3YTYzMjJiNWZkZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
N2EwZTY2Njc4OTU1ZDM5NmU2ZWQxMWFmM2M5YzgxODk0NjdmYWNlMg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjExNDJmY2ZmMDA1MmMwN2M2ODZhN2RjYTc0MDczZmUzMGFjMmZjYjY5MTU1
|
10
|
+
NTM0MDlhYjk3Y2YzNzU1NWRlMzk3Y2RjZjhmZWRmMTdmN2U2NGIzODA5YzQ0
|
11
|
+
Njc3OWVmNWNhZjliMjdmZjBmNDI2MmNkNmE0ZDA5MjdmYjA3ZGM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NGNlMDA1N2ViOTBiOGNjNzZmOGQ5OGY4YzQzY2Y5ZTc5NGIwMmUwMzhhZjk2
|
14
|
+
MTIwYzg5MTg5N2QwODUyNzkyNTMwZmY1NTNhOTQ5M2IzMDM2NmQ3NTBhNDk4
|
15
|
+
YzExMTBmMjU3OWM2YTA3ODFkZjE3ZWY0MjUwZDk3OTlhZThmMTc=
|
data/lib/hammer_cli_katello.rb
CHANGED
@@ -102,4 +102,13 @@ module HammerCLIKatello
|
|
102
102
|
'hammer_cli_katello/capsule'
|
103
103
|
)
|
104
104
|
|
105
|
+
HammerCLI::MainCommand.lazy_subcommand("package", _("Manipulate packages."),
|
106
|
+
'HammerCLIKatello::PackageCommand',
|
107
|
+
'hammer_cli_katello/package'
|
108
|
+
)
|
109
|
+
|
110
|
+
HammerCLI::MainCommand.lazy_subcommand("package-group", _("Manipulate package groups"),
|
111
|
+
'HammerCLIKatello::PackageGroupCommand',
|
112
|
+
'hammer_cli_katello/package_group'
|
113
|
+
)
|
105
114
|
end
|
@@ -2,9 +2,28 @@ module HammerCLIKatello
|
|
2
2
|
module AssociatingCommands
|
3
3
|
|
4
4
|
module Repository
|
5
|
+
module AddProductOptions
|
6
|
+
def dependencies
|
7
|
+
dependency_resolver.resource_dependencies(associated_resource,
|
8
|
+
:only_required => false,
|
9
|
+
:recursive => true)
|
10
|
+
end
|
11
|
+
|
12
|
+
def create_option_builder
|
13
|
+
super.tap do |option_builder|
|
14
|
+
products = dependencies.find { |r| r.name == :products }
|
15
|
+
if products
|
16
|
+
option_builder.builders << HammerCLIForeman::DependentSearchablesOptionBuilder.new(
|
17
|
+
products, searchables)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
5
23
|
extend HammerCLIForeman::AssociatingCommands::CommandExtension
|
6
24
|
|
7
25
|
class AddRepositoryCommand < HammerCLIKatello::AddAssociatedCommand
|
26
|
+
extend AddProductOptions
|
8
27
|
include RepositoryScopedToProduct
|
9
28
|
command_name 'add-repository'
|
10
29
|
associated_resource :repositories
|
@@ -14,6 +33,7 @@ module HammerCLIKatello
|
|
14
33
|
end
|
15
34
|
|
16
35
|
class RemoveRepositoryCommand < HammerCLIKatello::RemoveAssociatedCommand
|
36
|
+
extend AddProductOptions
|
17
37
|
include RepositoryScopedToProduct
|
18
38
|
command_name 'remove-repository'
|
19
39
|
associated_resource :repositories
|
@@ -8,8 +8,7 @@ module HammerCLIKatello
|
|
8
8
|
|
9
9
|
class ListCommand < HammerCLIKatello::ListCommand
|
10
10
|
output do
|
11
|
-
field :
|
12
|
-
field :uuid, _("UUID")
|
11
|
+
field :uuid, _("ID")
|
13
12
|
field :name, _("Name")
|
14
13
|
field :author, _("Author")
|
15
14
|
field :version, _("Version")
|
@@ -30,10 +29,16 @@ module HammerCLIKatello
|
|
30
29
|
class CreateCommand < HammerCLIKatello::CreateCommand
|
31
30
|
command_name "add"
|
32
31
|
|
32
|
+
option "--id", "ID", _("id of the puppet module to associate")
|
33
|
+
|
34
|
+
def request_params
|
35
|
+
super.tap { |params| params['uuid'] = params.delete('id') if params['id'] }
|
36
|
+
end
|
37
|
+
|
33
38
|
success_message _("Puppet module added to content view")
|
34
39
|
failure_message _("Could not add the puppet module")
|
35
40
|
|
36
|
-
build_options
|
41
|
+
build_options :without => :uuid
|
37
42
|
end
|
38
43
|
|
39
44
|
class DeleteCommand < HammerCLIKatello::DeleteCommand
|
@@ -42,7 +47,22 @@ module HammerCLIKatello
|
|
42
47
|
success_message _("Puppet module removed from content view")
|
43
48
|
failure_message _("Couldn't remove puppet module from the content view")
|
44
49
|
|
45
|
-
|
50
|
+
def resolve_puppet_module_id_from_uuid(options)
|
51
|
+
uuid = options.delete HammerCLI.option_accessor_name("id")
|
52
|
+
options[HammerCLI.option_accessor_name("uuid")] = uuid
|
53
|
+
resolver.content_view_puppet_module_id(options)
|
54
|
+
end
|
55
|
+
|
56
|
+
def all_options
|
57
|
+
if super['option_id']
|
58
|
+
super.merge(HammerCLI.option_accessor_name("id") =>
|
59
|
+
resolve_puppet_module_id_from_uuid(super))
|
60
|
+
else
|
61
|
+
super
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
build_options :without => :uuid
|
46
66
|
end
|
47
67
|
|
48
68
|
autoload_subcommands
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module HammerCLIKatello
|
2
|
+
|
3
|
+
class PackageCommand < HammerCLIKatello::Command
|
4
|
+
resource :packages
|
5
|
+
|
6
|
+
class ListCommand < HammerCLIKatello::ListCommand
|
7
|
+
output do
|
8
|
+
field :id, _("ID")
|
9
|
+
field :filename, _("Filename")
|
10
|
+
end
|
11
|
+
|
12
|
+
build_options do |o|
|
13
|
+
o.expand.including(:products, :organizations, :content_views)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
class InfoCommand < HammerCLIKatello::InfoCommand
|
18
|
+
output do
|
19
|
+
field :id, _("ID")
|
20
|
+
field :name, _("Name")
|
21
|
+
field :version, _("Version")
|
22
|
+
field :arch, _("Architecture")
|
23
|
+
field :epoch, _("Epoch")
|
24
|
+
field :release, _("Release")
|
25
|
+
field :author, _("Author")
|
26
|
+
field :filename, _("Filename")
|
27
|
+
field :buildhost, _("Build Host")
|
28
|
+
field :vendor, _("Vendor")
|
29
|
+
field :license, _("License")
|
30
|
+
field :relativepath, _("Relative Path")
|
31
|
+
field :description, _("Description")
|
32
|
+
end
|
33
|
+
|
34
|
+
build_options
|
35
|
+
end
|
36
|
+
|
37
|
+
autoload_subcommands
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module HammerCLIKatello
|
2
|
+
|
3
|
+
class PackageGroupCommand < HammerCLIKatello::Command
|
4
|
+
resource :package_groups
|
5
|
+
|
6
|
+
class ListCommand < HammerCLIKatello::ListCommand
|
7
|
+
output do
|
8
|
+
field :id, _("ID")
|
9
|
+
field :name, _("Name")
|
10
|
+
end
|
11
|
+
|
12
|
+
build_options do |o|
|
13
|
+
o.expand.including(:products, :organizations, :content_views)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
class InfoCommand < HammerCLIKatello::InfoCommand
|
18
|
+
output do
|
19
|
+
field :id, _("ID")
|
20
|
+
field :name, _("Name")
|
21
|
+
field :description, _("Description")
|
22
|
+
field :default_package_names, _("Default Packages"), Fields::List
|
23
|
+
field :mandatory_package_names, _("Mandatory Packages"), Fields::List
|
24
|
+
field :conditional_package_names, _("Conditional Packages"), Fields::List
|
25
|
+
field :optional_package_names, _("Optional Packages"), Fields::List
|
26
|
+
end
|
27
|
+
|
28
|
+
build_options
|
29
|
+
end
|
30
|
+
|
31
|
+
autoload_subcommands
|
32
|
+
end
|
33
|
+
end
|
data/locale/zanata.xml
CHANGED
@@ -17,9 +17,8 @@
|
|
17
17
|
<locale>te</locale>
|
18
18
|
<locale>pa</locale>
|
19
19
|
<locale>kn</locale>
|
20
|
-
<locale>de</locale>
|
21
|
-
<locale>es</locale>
|
22
|
-
<locale>gl</locale>
|
20
|
+
<locale map-from="de">de-DE</locale>
|
21
|
+
<locale map-from="es">es-ES</locale>
|
23
22
|
<locale map-from="pt_BR">pt-BR</locale>
|
24
23
|
<locale map-from="bn">bn-IN</locale>
|
25
24
|
<locale map-from="ta">ta-IN</locale>
|
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.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Price
|
@@ -23,7 +23,7 @@ authors:
|
|
23
23
|
autorequire:
|
24
24
|
bindir: bin
|
25
25
|
cert_chain: []
|
26
|
-
date: 2014-
|
26
|
+
date: 2014-09-12 00:00:00.000000000 Z
|
27
27
|
dependencies:
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: hammer_cli_foreman
|
@@ -31,14 +31,14 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - ~>
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0.1.
|
34
|
+
version: 0.1.3
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - ~>
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0.1.
|
41
|
+
version: 0.1.3
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: hammer_cli_foreman_tasks
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -211,6 +211,8 @@ files:
|
|
211
211
|
- lib/hammer_cli_katello/organization.rb
|
212
212
|
- lib/hammer_cli_katello/output/fields.rb
|
213
213
|
- lib/hammer_cli_katello/output/formatters.rb
|
214
|
+
- lib/hammer_cli_katello/package.rb
|
215
|
+
- lib/hammer_cli_katello/package_group.rb
|
214
216
|
- lib/hammer_cli_katello/ping.rb
|
215
217
|
- lib/hammer_cli_katello/product.rb
|
216
218
|
- lib/hammer_cli_katello/puppet_module.rb
|