diplomatic_bag 2.3.0 → 2.4.1

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
  SHA256:
3
- metadata.gz: '09e948360a1c34b43a7c22b832a38324164ca4112ec47e66541e7a81b950b6b5'
4
- data.tar.gz: 5dd49cefbff73b3ba2f6ab377e3640cc1c79b232d4c0fbb1f1593af71df59789
3
+ metadata.gz: 75f7d8cf367e5a011019b11fdb6511f9245d77fe410223a42e408bd86ff8cdff
4
+ data.tar.gz: a548a96009522e2d4f87d7f7f16926a623d39255a6fea3268bb4910e82637ed9
5
5
  SHA512:
6
- metadata.gz: b9aed038af7957a5704d37affcd9bea83cecfd8948585ec3cb7e055d5953078810f1fb0b3a7bacc33a8ea5a7c9029fa6e470d183ea566b12b6b0f2fd01c1267e
7
- data.tar.gz: ebbb24102fc4e8e12685a963cd7af562d47753d6c5ae5c71f3ce90ba626f27fe71e015810b48352a1939dbf7c7eb20f67527102ce186cbe2da72103b4b89441f
6
+ metadata.gz: 486b780ad02481333ba9241c4414aaf8626ccfec192d126a477ac1ff6db56a4e9bf5b15aff15d7fb9f4043ebdc2dd8ebf13ae3272d936c4aac85ccfc32c53606
7
+ data.tar.gz: 94808a786374431b4e118072b4ace527e04fb7246d94fbda877d6321d190db1d296f4ddb4d4620399064732877ec33a513b1ccd9e12283969132cfcfc257a558
@@ -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.0
4
+ version: 2.4.1
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-18 00:00:00.000000000 Z
12
+ date: 2020-08-16 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.0
20
+ version: 2.4.1
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.0
27
+ version: 2.4.1
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