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 +4 -4
- data/lib/diplomatic_bag/datacenters.rb +2 -0
- data/lib/diplomatic_bag/nodes.rb +3 -0
- data/lib/diplomatic_bag/services.rb +6 -0
- metadata +8 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b8ffd4d174dd52335734700e0377ea522ce45576ea5eb8098e07a836dd6ac06
|
4
|
+
data.tar.gz: 88d01649af970b52f109a748d161daeadf88a1fbea4fd5c13b72a3c4992beb90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
data/lib/diplomatic_bag/nodes.rb
CHANGED
@@ -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.
|
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:
|
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.
|
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.
|
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
|
-
|
65
|
-
|
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: []
|