diplomatic_bag 2.3.3 → 2.4.4

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: 5b8ffd4d174dd52335734700e0377ea522ce45576ea5eb8098e07a836dd6ac06
4
+ data.tar.gz: 88d01649af970b52f109a748d161daeadf88a1fbea4fd5c13b72a3c4992beb90
5
5
  SHA512:
6
- metadata.gz: 2b2f1bf032173f13abf1a925744c43b6df5e06cf942e99a54ec94ade8d7b428e6accf98aab8940fde812845ae0b5ce2a2edfecc83807d619971e1b00ba10458b
7
- data.tar.gz: 459f5ab7c26449014d12b0c5f88f04125ab5758c2dc6d6a610904ecde1db5eb29c0629510ce747b7d1688106eacb9cff40bda7fd3f0ed1133fe59cbef5d61ef9
6
+ metadata.gz: aa42ae92451d49fc393a8cd6703f65008326f5ec4a7ad08bef919af6ae173b33c26aa2a22508dec34ac6746833b22039736eccc9ff70c83f64c1cdfd97d58692
7
+ data.tar.gz: 1254c374505ca587f1d465af94f55946db31a08f912126943fbde85ebefdd29762854ec01ce8a3488f58dc490fdc154dbf6a6a9816d2b500745c1016150927dc
@@ -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,15 +1,15 @@
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.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Benoit
8
8
  - Pierre Souchay
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-02-29 00:00:00.000000000 Z
12
+ date: 2021-01-28 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.4
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.4
28
28
  description: Toolbox for Consul
29
29
  email:
30
30
  - n.benoit@criteo.com
@@ -46,7 +46,7 @@ homepage: https://github.com/WeAreFarmGeek/diplomat
46
46
  licenses:
47
47
  - BSD-3-Clause
48
48
  metadata: {}
49
- post_install_message:
49
+ post_install_message:
50
50
  rdoc_options: []
51
51
  require_paths:
52
52
  - lib
@@ -61,9 +61,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  requirements: []
64
- rubyforge_project:
65
- rubygems_version: 2.7.7
66
- signing_key:
64
+ rubygems_version: 3.1.2
65
+ signing_key:
67
66
  specification_version: 4
68
67
  summary: Toolbox for Consul
69
68
  test_files: []