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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 84928577a648bc814fc24c6342f4d010a7508b3d
4
- data.tar.gz: ae2adcd75d521db7666a29beae26eae2ad4be5f0
3
+ metadata.gz: c986520c7269bb372ae951449583bb5a9ecdc176
4
+ data.tar.gz: e907badfbd1b54a1d210de801c1c6109a1725e50
5
5
  SHA512:
6
- metadata.gz: bdc2df3aa42a7ff7d0cb3b6e5d251b352f79e6625c6fc501603e7c71084b8f0abac791733412c71be5c57662c21a0306deb51cc75d0effa36941ee5fd516a9c2
7
- data.tar.gz: dc753d50f16b25912466ca7b66b21b51708aacf22ff90d79e31b69dfb9aca5f52a4511cc22a267bb46c5b6f223dc80d9a516ca1f62e1b71391cdc0b918e66379
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
- search_options['name'] = name if name
24
- search_options['names'] = names if names
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
@@ -1,5 +1,5 @@
1
1
  module HammerCLIKatello
2
2
  def self.version
3
- @version ||= Gem::Version.new('0.13.2')
3
+ @version ||= Gem::Version.new('0.13.3')
4
4
  end
5
5
  end