diplomatic_bag 2.3.3 → 2.4.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
  SHA256:
3
- metadata.gz: 1763525c41a15045a83dd02df05b1f4873f2aa28a2fa4e0922b8dd6904d9da79
4
- data.tar.gz: be71933bcb1a9236e1d7b73c076c2ee27687e64b8b20f139c8619ea2d2517c83
3
+ metadata.gz: 62d48a22830eb9a6fd2957e043579f2132facb8f044e3f7c79c783cbdba6f581
4
+ data.tar.gz: 54b2a5a144f887998f02c71e36ab0b214c65cf86fd40e35a443fa953e65ceb53
5
5
  SHA512:
6
- metadata.gz: 2b2f1bf032173f13abf1a925744c43b6df5e06cf942e99a54ec94ade8d7b428e6accf98aab8940fde812845ae0b5ce2a2edfecc83807d619971e1b00ba10458b
7
- data.tar.gz: 459f5ab7c26449014d12b0c5f88f04125ab5758c2dc6d6a610904ecde1db5eb29c0629510ce747b7d1688106eacb9cff40bda7fd3f0ed1133fe59cbef5d61ef9
6
+ metadata.gz: e68d07b7bc090877e96dd0bd7cbd83b2618957e36cc2a7fa96c4562e145eda3779bcd43074175313ea1086f5e57e43481e28e9fe699531af970dc09bf51c8b3c
7
+ data.tar.gz: 6868593c59dc2f81f85e5e3cc142182a0752941e0bd4929e8d801b89c37695863c101c09c9681d014041d3d74ff273333edaf6707ddc971f9098f5888e8eb217
@@ -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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diplomatic_bag
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.3
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Benoit
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-02-29 00:00:00.000000000 Z
12
+ date: 2020-05-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: diplomat
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - '='
19
19
  - !ruby/object:Gem::Version
20
- version: 2.3.3
20
+ version: 2.4.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '='
26
26
  - !ruby/object:Gem::Version
27
- version: 2.3.3
27
+ version: 2.4.0
28
28
  description: Toolbox for Consul
29
29
  email:
30
30
  - n.benoit@criteo.com