killbill-client 0.28.0 → 0.29.0

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: 24d79717bdfdce7cb7b3b91ff83405cff0695c1b
4
- data.tar.gz: 20cda0a4d54728a6ef3c01eacdab24dc480b91c1
3
+ metadata.gz: bc0cb0821172a8b139995e9ce22d57c2e349ea5c
4
+ data.tar.gz: 28cfe0861830615b3a03219191054047e10680e6
5
5
  SHA512:
6
- metadata.gz: a5934cc70e770fbbf965f1a4c1e839a5254e3cce41254aea835de37634e4dcf705ec662d5d31f459eea95eff2bb8a1234d1fc160ab82c300619bb807f08ae468
7
- data.tar.gz: 7946963faa0b28e8526c11a79da9a4fadb28d4a990d0948bd37867da47d372e0fc87039d20b8cd8ef4ed2181ca3a9618aa06c6d3cb5cf926e3705a419cc31b8a
6
+ metadata.gz: d54c5903d5a5bf5a157d6798223d00d4b02aebd0d84be8121cd54898e13353cc290c4247613a44c1deed9b9dc8983f4703e222627dcd58401e68f101fdf1fd9d
7
+ data.tar.gz: 7ffde046dcaf4f470b605cde726d583c0cb0fca9873a52d22f7f09f5a95cf399e7f20593fd19656e66c843a171b269d9da240386657b9a370c4a77f9d91fde9e
@@ -17,34 +17,34 @@ module KillBillClient
17
17
  end
18
18
 
19
19
 
20
- def start_plugin(plugin_key, plugin_version=nil, local_node_only=false, user = nil, reason = nil, comment = nil, options = {}, timeout_sec=10, sleep_sec=1)
20
+ def start_plugin(plugin_key, plugin_version=nil, plugin_props=[], local_node_only=false, user = nil, reason = nil, comment = nil, options = {}, timeout_sec=15, sleep_sec=1)
21
21
 
22
22
  proc_condition = create_proc_condition_for_wait_for_plugin_command_completion(options, plugin_key, plugin_version, "RUNNING")
23
23
 
24
- trigger_node_command_wait_for_plugin_command_completion(:START_PLUGIN, plugin_key, plugin_version, local_node_only, user, reason, comment, options, timeout_sec, sleep_sec, &proc_condition)
24
+ trigger_node_command_wait_for_plugin_command_completion(:START_PLUGIN, plugin_key, plugin_version, plugin_props, local_node_only, user, reason, comment, options, timeout_sec, sleep_sec, &proc_condition)
25
25
  end
26
26
 
27
- def stop_plugin(plugin_key, plugin_version=nil, local_node_only=false, user = nil, reason = nil, comment = nil, options = {}, timeout_sec=10, sleep_sec=1)
27
+ def stop_plugin(plugin_key, plugin_version=nil, plugin_props=[], local_node_only=false, user = nil, reason = nil, comment = nil, options = {}, timeout_sec=15, sleep_sec=1)
28
28
 
29
29
  proc_condition = create_proc_condition_for_wait_for_plugin_command_completion(options, plugin_key, plugin_version, "STOPPED")
30
30
 
31
- trigger_node_command_wait_for_plugin_command_completion(:STOP_PLUGIN, plugin_key, plugin_version, local_node_only, user, reason, comment, options, timeout_sec, sleep_sec, &proc_condition)
31
+ trigger_node_command_wait_for_plugin_command_completion(:STOP_PLUGIN, plugin_key, plugin_version, plugin_props, local_node_only, user, reason, comment, options, timeout_sec, sleep_sec, &proc_condition)
32
32
  end
33
33
 
34
34
 
35
- def install_plugin(plugin_key, plugin_version=nil, local_node_only=false, user = nil, reason = nil, comment = nil, options = {}, timeout_sec=20, sleep_sec=1)
35
+ def install_plugin(plugin_key, plugin_version=nil, plugin_props=[], local_node_only=false, user = nil, reason = nil, comment = nil, options = {}, timeout_sec=30, sleep_sec=1)
36
36
 
37
37
  proc_condition = create_proc_condition_for_wait_for_plugin_command_completion(options, plugin_key, plugin_version, nil)
38
38
 
39
- trigger_node_command_wait_for_plugin_command_completion(:INSTALL_PLUGIN, plugin_key, plugin_version, local_node_only, user, reason, comment, options, timeout_sec, sleep_sec, &proc_condition)
39
+ trigger_node_command_wait_for_plugin_command_completion(:INSTALL_PLUGIN, plugin_key, plugin_version, plugin_props, local_node_only, user, reason, comment, options, timeout_sec, sleep_sec, &proc_condition)
40
40
  end
41
41
 
42
- def uninstall_plugin(plugin_key, plugin_version=nil, local_node_only=false, user = nil, reason = nil, comment = nil, options = {}, timeout_sec=10, sleep_sec=1)
42
+ def uninstall_plugin(plugin_key, plugin_version=nil, plugin_props=[], local_node_only=false, user = nil, reason = nil, comment = nil, options = {}, timeout_sec=15, sleep_sec=1)
43
43
 
44
44
  is_negate = true # We are looking for absence of plugin_info from result (after plugin got successfully uninstalled)
45
45
  proc_condition = create_proc_condition_for_wait_for_plugin_command_completion(options, plugin_key, plugin_version, nil, is_negate)
46
46
 
47
- trigger_node_command_wait_for_plugin_command_completion(:UNINSTALL_PLUGIN, plugin_key, plugin_version, local_node_only, user, reason, comment, options, timeout_sec, sleep_sec, &proc_condition)
47
+ trigger_node_command_wait_for_plugin_command_completion(:UNINSTALL_PLUGIN, plugin_key, plugin_version, plugin_props, local_node_only, user, reason, comment, options, timeout_sec, sleep_sec, &proc_condition)
48
48
  end
49
49
 
50
50
 
@@ -61,7 +61,7 @@ module KillBillClient
61
61
 
62
62
  private
63
63
 
64
- def trigger_node_command_wait_for_plugin_command_completion(node_command_type, plugin_key, plugin_version, local_node_only, user, reason, comment, options, timeout_sec, sleep_sec, &proc_condition)
64
+ def trigger_node_command_wait_for_plugin_command_completion(node_command_type, plugin_key, plugin_version, plugin_props, local_node_only, user, reason, comment, options, timeout_sec, sleep_sec, &proc_condition)
65
65
  # Idempotency : Check if already installed
66
66
  res = proc_condition.call
67
67
  return res if res
@@ -72,6 +72,9 @@ module KillBillClient
72
72
  node_command.node_command_properties = []
73
73
  node_command.node_command_properties << {:key => 'pluginKey', :value => plugin_key} if plugin_key
74
74
  node_command.node_command_properties << {:key => 'pluginVersion', :value => plugin_version} if plugin_version
75
+ plugin_props.each do |e|
76
+ node_command.node_command_properties << e
77
+ end
75
78
 
76
79
  KillBillClient::Model::NodesInfo.trigger_node_command(node_command, local_node_only, user, reason, comment, options)
77
80
 
@@ -85,6 +88,11 @@ module KillBillClient
85
88
  res = true
86
89
  node_infos.each do |info|
87
90
  raw_node_res = info.plugins_info.find do |e|
91
+ if e.plugin_key == plugin_key
92
+ if KillBillClient.logger
93
+ KillBillClient.log :info, 'NodesInfo -> check for plugin command completion version_check=%s, state_check=%s' % [(plugin_version.nil? && e.is_selected_for_start) || plugin_version == e.plugin_version, state.nil? || e.state == state]
94
+ end
95
+ end
88
96
  e.plugin_key == plugin_key && ((plugin_version.nil? && e.is_selected_for_start) || plugin_version == e.plugin_version) && (state.nil? || e.state == state)
89
97
  end
90
98
  node_res = is_negate ? !raw_node_res : raw_node_res
@@ -96,6 +104,9 @@ module KillBillClient
96
104
  end
97
105
 
98
106
  def wait_for_plugin_command_completion(command, plugin, timeout_sec, sleep_sec)
107
+ if KillBillClient.logger
108
+ KillBillClient.log :info, 'NodesInfo wait for plugin command %s, plugin =%s' % [command, plugin]
109
+ end
99
110
  begin
100
111
  Timeout::timeout(timeout_sec) do
101
112
  while true do
@@ -1,7 +1,7 @@
1
1
  module KillBillClient
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 28
4
+ MINOR = 29
5
5
  PATCH = 0
6
6
  PRE = nil
7
7
 
metadata CHANGED
@@ -1,65 +1,65 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.28.0
4
+ version: 0.29.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Killbill core team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-18 00:00:00.000000000 Z
11
+ date: 2015-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
15
- version_requirements: !ruby/object:Gem::Requirement
15
+ requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.2.0
20
- requirement: !ruby/object:Gem::Requirement
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
21
23
  requirements:
22
- - - '>='
24
+ - - ">="
23
25
  - !ruby/object:Gem::Version
24
26
  version: 1.2.0
25
- prerelease: false
26
- type: :runtime
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
- version_requirements: !ruby/object:Gem::Requirement
29
+ requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 10.0.0
34
- requirement: !ruby/object:Gem::Requirement
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
35
37
  requirements:
36
- - - '>='
38
+ - - ">="
37
39
  - !ruby/object:Gem::Version
38
40
  version: 10.0.0
39
- prerelease: false
40
- type: :development
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
- version_requirements: !ruby/object:Gem::Requirement
43
+ requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 2.12.0
48
- requirement: !ruby/object:Gem::Requirement
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
49
51
  requirements:
50
- - - ~>
52
+ - - "~>"
51
53
  - !ruby/object:Gem::Version
52
54
  version: 2.12.0
53
- prerelease: false
54
- type: :development
55
55
  description: An API client library for Kill Bill.
56
56
  email: killbilling-users@googlegroups.com
57
57
  executables: []
58
58
  extensions: []
59
59
  extra_rdoc_files: []
60
60
  files:
61
- - .gitignore
62
- - .travis.yml
61
+ - ".gitignore"
62
+ - ".travis.yml"
63
63
  - Gemfile
64
64
  - README.md
65
65
  - Rakefile
@@ -185,26 +185,33 @@ homepage: http://www.killbilling.org
185
185
  licenses:
186
186
  - Apache License (2.0)
187
187
  metadata: {}
188
- post_install_message:
188
+ post_install_message:
189
189
  rdoc_options:
190
- - --exclude
191
- - .
190
+ - "--exclude"
191
+ - "."
192
192
  require_paths:
193
193
  - lib
194
194
  required_ruby_version: !ruby/object:Gem::Requirement
195
195
  requirements:
196
- - - '>='
196
+ - - ">="
197
197
  - !ruby/object:Gem::Version
198
198
  version: 1.8.6
199
199
  required_rubygems_version: !ruby/object:Gem::Requirement
200
200
  requirements:
201
- - - '>='
201
+ - - ">="
202
202
  - !ruby/object:Gem::Version
203
203
  version: '0'
204
204
  requirements: []
205
- rubyforge_project:
206
- rubygems_version: 2.1.9
207
- signing_key:
205
+ rubyforge_project:
206
+ rubygems_version: 2.2.2
207
+ signing_key:
208
208
  specification_version: 4
209
209
  summary: Kill Bill client library.
210
- test_files: []
210
+ test_files:
211
+ - spec/killbill_client/base_uri_spec.rb
212
+ - spec/killbill_client/model_relation_spec.rb
213
+ - spec/killbill_client/remote/api_spec.rb
214
+ - spec/killbill_client/remote/model_spec.rb
215
+ - spec/killbill_client/resource_spec.rb
216
+ - spec/killbill_client/resources_spec.rb
217
+ - spec/spec_helper.rb