diplomatic_bag 2.3.1 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c0d0a90ff8115270cdbf3ffe7656196869e6d6c5577dca20c76c24c8f6056f04
4
- data.tar.gz: 901d6c2a82e702ae1f93872b96839146f52082338546c20705027379e4001ab4
3
+ metadata.gz: 9078362cc8f3e4f3867e082349f00391542a072d85894ed65e4e1d5d0c329c95
4
+ data.tar.gz: b2107d9d94eed72a6142c04249475af76824a6b8b3fdcd58a69b9b91bcc26178
5
5
  SHA512:
6
- metadata.gz: f8e306be60da6a7c2de0d8da418ca3f5e1cc43c7b58948a3481cbf3ac60a53bb8dc66e3b506ec281ed1aac0ab2ddbf199e8589a81ce46b8c7184fee5a9e8e316
7
- data.tar.gz: 5f51f0e1119cc2199393acf43fba004e740cbcf08677da7b0a85229a0c2e334c946496bc3d78df239501edf78de4308a131b892562480b6b4e3d4af3f59433b0
6
+ metadata.gz: cfce99d54835163b8a8dc2eea03b02c8aa2e0465cb0b91db314750aa11bccaf5ab4b12fb1c78cf535c0dfab5702d3f9013dc6ac7a0ab0228e777c513f485b8e0
7
+ data.tar.gz: 7e929d626191401b925e1bfcf46995b22da4d1beec21c574957a33e6110398f415bdb51145f2a42e31e8407d456587cf5ab776e1a5523616511c72e4731bbf0c
@@ -2,6 +2,8 @@
2
2
 
3
3
  # Usefull usage of Diplomat lib: Datacenter functions
4
4
  module DiplomaticBag
5
+ # Return the list of datacenters matching given regexp
6
+ # @return [Array[string]] an array of DC matching given regexp
5
7
  def self.get_datacenters_list(dc, options = {})
6
8
  dcs = []
7
9
  datacenters = Diplomat::Datacenter.get(nil, options)
@@ -2,6 +2,9 @@
2
2
 
3
3
  # Usefull usage of Diplomat lib: Nodes functions
4
4
  module DiplomaticBag
5
+ # Get the list of nodes having duplicate node ids
6
+ # @param options options to query with
7
+ # @return [Array[Object]] an array of objects with {name: node_name, status: status}
5
8
  def self.get_duplicate_node_id(options = {})
6
9
  status = {
7
10
  1 => 'Alive',
@@ -2,12 +2,18 @@
2
2
 
3
3
  # Usefull usage of Diplomat lib: Services functions
4
4
  module DiplomaticBag
5
+ # Get sevice name or empty string
6
+ # @param s service information
7
+ # @return [string] the name of service
5
8
  def self.compute_service_name(s)
6
9
  return '/node::health/' if s.nil? || s == ''
7
10
 
8
11
  s
9
12
  end
10
13
 
14
+ # Get the full list of services with their status
15
+ # @param options to query list
16
+ # @return #[Hash[string]] A hash of statuses (passing|warning|critical) per service
11
17
  def self.get_all_services_status(options = {})
12
18
  result = {}
13
19
  services = Diplomat::Health.state('any', options)
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diplomatic_bag
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Benoit
8
+ - Pierre Souchay
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2020-02-19 00:00:00.000000000 Z
12
+ date: 2020-10-19 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: diplomat
@@ -16,17 +17,18 @@ dependencies:
16
17
  requirements:
17
18
  - - '='
18
19
  - !ruby/object:Gem::Version
19
- version: 2.3.1
20
+ version: 2.4.2
20
21
  type: :runtime
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
25
  - - '='
25
26
  - !ruby/object:Gem::Version
26
- version: 2.3.1
27
+ version: 2.4.2
27
28
  description: Toolbox for Consul
28
29
  email:
29
30
  - n.benoit@criteo.com
31
+ - p.souchay@criteo.com
30
32
  executables:
31
33
  - consul-cli
32
34
  extensions: []
@@ -52,15 +54,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
52
54
  requirements:
53
55
  - - ">="
54
56
  - !ruby/object:Gem::Version
55
- version: '0'
57
+ version: '2.0'
56
58
  required_rubygems_version: !ruby/object:Gem::Requirement
57
59
  requirements:
58
60
  - - ">="
59
61
  - !ruby/object:Gem::Version
60
62
  version: '0'
61
63
  requirements: []
62
- rubyforge_project:
63
- rubygems_version: 2.7.7
64
+ rubygems_version: 3.0.8
64
65
  signing_key:
65
66
  specification_version: 4
66
67
  summary: Toolbox for Consul