hammer_cli_katello 0.13.2 → 0.13.3
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/activation_key.rb +2 -0
- data/lib/hammer_cli_katello/host_extensions.rb +3 -0
- data/lib/hammer_cli_katello/hostgroup_extensions.rb +1 -23
- data/lib/hammer_cli_katello/puppet_environment_name_resolvable.rb +24 -0
- data/lib/hammer_cli_katello/search_options_creators.rb +5 -2
- data/lib/hammer_cli_katello/version.rb +1 -1
- data/test/data/3.7/foreman_api.json +1 -1
- data/test/functional/content_view/create_test.rb +6 -2
- data/test/unit/search_options_creators_test.rb +6 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c986520c7269bb372ae951449583bb5a9ecdc176
|
4
|
+
data.tar.gz: e907badfbd1b54a1d210de801c1c6109a1725e50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cf1fa2ba30493f3df29ffb603d799ed22707bc4531984a98435dbc032656fe917e28b8aeecd82c45b6f5e76b456620bd20f1e18c425a5a660add29ac18b00cb
|
7
|
+
data.tar.gz: 51e0bb6f6a08bce5b49f03d0101fa605bba935fc7fdae225685bb421c38a83302d12642f3a62aa0a8936f3c0eb61811e46113c5ad481455d9ec29fb23b8739b2
|
@@ -57,6 +57,8 @@ module HammerCLIKatello
|
|
57
57
|
field :description, _("Description")
|
58
58
|
field :format_limit, _("Host Limit")
|
59
59
|
field :auto_attach, _("Auto Attach")
|
60
|
+
field :service_level, _("Service Level")
|
61
|
+
field :release_version, _("Release Version")
|
60
62
|
from :environment do
|
61
63
|
field :name, _("Lifecycle Environment")
|
62
64
|
end
|
@@ -5,16 +5,19 @@ require 'hammer_cli_katello/host_package'
|
|
5
5
|
require 'hammer_cli_katello/host_package_group'
|
6
6
|
require 'hammer_cli_katello/host_kickstart_repository_options'
|
7
7
|
require 'hammer_cli_katello/host_content_source_options'
|
8
|
+
require 'hammer_cli_katello/puppet_environment_name_resolvable'
|
8
9
|
|
9
10
|
module HammerCLIKatello
|
10
11
|
module HostExtensions
|
11
12
|
::HammerCLIForeman::Host::CreateCommand.instance_eval do
|
13
|
+
include HammerCLIKatello::PuppetEnvironmentNameResolvable
|
12
14
|
include HammerCLIKatello::ResolverCommons
|
13
15
|
include HammerCLIKatello::HostContentSourceOptions
|
14
16
|
include ::HammerCLIKatello::HostKickstartRepositoryOptions
|
15
17
|
end
|
16
18
|
|
17
19
|
::HammerCLIForeman::Host::UpdateCommand.instance_eval do
|
20
|
+
include HammerCLIKatello::PuppetEnvironmentNameResolvable
|
18
21
|
include HammerCLIKatello::ResolverCommons
|
19
22
|
include HammerCLIKatello::HostContentSourceOptions
|
20
23
|
include ::HammerCLIKatello::HostKickstartRepositoryOptions
|
@@ -1,31 +1,9 @@
|
|
1
1
|
require 'hammer_cli_foreman/hostgroup'
|
2
|
+
require 'hammer_cli_katello/puppet_environment_name_resolvable'
|
2
3
|
require 'hammer_cli_katello/host_kickstart_repository_options'
|
3
4
|
require 'hammer_cli_katello/host_content_source_options'
|
4
5
|
|
5
6
|
module HammerCLIKatello
|
6
|
-
module PuppetEnvironmentNameResolvable
|
7
|
-
class PuppetEnvParamSource
|
8
|
-
def initialize(command)
|
9
|
-
@command = command
|
10
|
-
end
|
11
|
-
|
12
|
-
def get_options(_defined_options, result)
|
13
|
-
if result['option_environment_id'].nil? && result['option_environment_name']
|
14
|
-
result['option_environment_id'] = @command.resolver.puppet_environment_id(
|
15
|
-
@command.resolver.scoped_options('environment', result, :single))
|
16
|
-
end
|
17
|
-
result
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def option_sources
|
22
|
-
sources = super
|
23
|
-
idx = sources.index { |s| s.class == HammerCLIForeman::OptionSources::IdParams }
|
24
|
-
sources.insert(idx, PuppetEnvParamSource.new(self))
|
25
|
-
sources
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
7
|
module QueryOrganizationOptions
|
30
8
|
def self.included(base)
|
31
9
|
base.option '--query-organization-id', 'ORGANIZATION_ID',
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module HammerCLIKatello
|
2
|
+
module PuppetEnvironmentNameResolvable
|
3
|
+
class PuppetEnvParamSource
|
4
|
+
def initialize(command)
|
5
|
+
@command = command
|
6
|
+
end
|
7
|
+
|
8
|
+
def get_options(_defined_options, result)
|
9
|
+
if result['option_environment_id'].nil? && result['option_environment_name']
|
10
|
+
result['option_environment_id'] = @command.resolver.puppet_environment_id(
|
11
|
+
@command.resolver.scoped_options('environment', result, :single))
|
12
|
+
end
|
13
|
+
result
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def option_sources
|
18
|
+
sources = super
|
19
|
+
idx = sources.index { |s| s.class == HammerCLIForeman::OptionSources::IdParams }
|
20
|
+
sources.insert(idx, PuppetEnvParamSource.new(self))
|
21
|
+
sources
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -20,8 +20,11 @@ module HammerCLIKatello
|
|
20
20
|
product_id = options[HammerCLI.option_accessor_name("product_id")]
|
21
21
|
|
22
22
|
search_options = {}
|
23
|
-
|
24
|
-
|
23
|
+
if names
|
24
|
+
search_options['names'] = names
|
25
|
+
elsif name
|
26
|
+
search_options['name'] = name
|
27
|
+
end
|
25
28
|
search_options['product_id'] = product_id if product_id
|
26
29
|
search_options
|
27
30
|
end
|