hammer_cli_katello 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NThiOTU1NWE2NGRkODNjYTVhYWYyNTc4YjUwMGFlYjMxMGY1NjI0MA==
4
+ NjA1ZDc0MTdiMzZmMjIxOWYxNmYzZGQyZDc1NjlkM2YxNjgwZTcyNA==
5
5
  data.tar.gz: !binary |-
6
- NmM1YjJhZDEwZDYzNmZmNDEzYzA1Y2M2OWRjMzg2ZTkyYmUyNGU5MQ==
6
+ NjgzZTczZWIxMzRmYTc0NmViNTAxODUzYWVjMTUyMzViMzAyYWVjYQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjQ1MzAwZTc1Y2Y3NGFlZjdlODM3ZTJiODc4MTgxNzllMzJjZjBiZjUyYTli
10
- NjBiYzg1ZmQ5MzUzZmM2ZjU1YjMzMmRiNzljZGQ5Y2E4NTFhZjE2YjNjNmE4
11
- ODE2YTIzNTg2YWM0MDk5NWRhZjNmN2FmNDZiZTQ3NDIwOTVlOTM=
9
+ YTk4MmEyNWQ3YTVjMDI3NTExNjUyMDUxNTU0ZTBkM2E2ZDhiYmUxOTkwYmMx
10
+ MTIyZTM2MzlhYjIxZWY5Y2Q0NDg5ZGU1MzIzMmU0MTc1ODQ5OWMzYjJiMDY0
11
+ MDc2NGVjZmY3M2I1OTk2OWZlNTdkMzcyZWU2OWI2NDI0ZTNjY2E=
12
12
  data.tar.gz: !binary |-
13
- NTM1MjQwMTllMDIzMGI4ZmNkYzc4Yjc3OWU5ZWI4MjA5NDQzOTQ5MDUxNjYz
14
- NDNlODI1NDk5MDRjMmVhZGU5YzM1NDc5MzE3MWY2NDU3NzZiNTU0YWE5Mjkz
15
- MzlhODgxMDI1ZDZhMTJmMWM0NGY4YTU4MGJlMGNkZDdjZDkxYTQ=
13
+ M2MwYTk2Y2EyYTQzMzY1OGQ4ZDA4NWRlN2U4N2Q2NTA0MGI0NGI0MDQ1MmNi
14
+ YjM3MTYxYmVkNTdjZDYyODY5Mjg5MzNjNDkxMjcwNTc2ZGUxMjY4MTYxMzM2
15
+ ZGRkZmE0MTNlNWZlMWQ3Nzk1NzIwMzg2YjgzYWRhZWM5ZWRhMzU=
@@ -12,7 +12,8 @@ module HammerCLIKatello
12
12
  'ERRATA',
13
13
  _("List of Errata to install"),
14
14
  :required => true,
15
- :format => HammerCLI::Options::Normalizers::List.new)
15
+ :format => HammerCLI::Options::Normalizers::List.new,
16
+ :attribute_name => :content)
16
17
 
17
18
  def content_type
18
19
  'errata'
@@ -4,11 +4,24 @@ module HammerCLIKatello
4
4
  resource :lifecycle_environments
5
5
 
6
6
  module PriorIdResolvable
7
+
8
+ def self.included(base)
9
+ base.option(
10
+ "--prior",
11
+ "PRIOR",
12
+ _("Name of the prior enviroment")
13
+ )
14
+ base.validate_options do
15
+ any(:option_prior, :option_prior_id).required
16
+ end
17
+ end
18
+
7
19
  def request_params
8
20
  params = super
9
- if params["prior"]
10
- params["prior"] = resolver.lifecycle_environment_id(
11
- HammerCLI.option_accessor_name("name") => params["prior"],
21
+ prior = options.delete(HammerCLI.option_accessor_name("prior"))
22
+ if prior
23
+ params["prior_id"] = resolver.lifecycle_environment_id(
24
+ HammerCLI.option_accessor_name("name") => prior,
12
25
  HammerCLI.option_accessor_name("organization_id") => params["organization_id"]
13
26
  )
14
27
  end
@@ -68,7 +81,9 @@ module HammerCLIKatello
68
81
  success_message _("Environment created")
69
82
  failure_message _("Could not create environment")
70
83
 
71
- build_options
84
+ build_options do |o|
85
+ o.without(:prior)
86
+ end
72
87
  end
73
88
 
74
89
  class UpdateCommand < HammerCLIKatello::UpdateCommand
@@ -77,7 +92,9 @@ module HammerCLIKatello
77
92
  success_message _("Environment updated")
78
93
  failure_message _("Could not update environment")
79
94
 
80
- build_options
95
+ build_options do |o|
96
+ o.without(:prior)
97
+ end
81
98
  end
82
99
 
83
100
  class DeleteCommand < HammerCLIKatello::DeleteCommand
@@ -1,5 +1,5 @@
1
1
  module HammerCLIKatello
2
2
  def self.version
3
- @version ||= Gem::Version.new('0.0.9')
3
+ @version ||= Gem::Version.new('0.0.10')
4
4
  end
5
5
  end
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.9
4
+ version: 0.0.10
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: 2015-03-23 00:00:00.000000000 Z
26
+ date: 2015-03-24 00:00:00.000000000 Z
27
27
  dependencies:
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: hammer_cli_foreman