floatyhelper 2.0.5 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/floatyhelper/floaty.rb +7 -1
- data/lib/floatyhelper/version.rb +1 -1
- data/lib/floatyhelper/vm.rb +3 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12632be13fdd03beaa837d72ea01a0ba7fff08494a79ed4f839070debfc35e89
|
4
|
+
data.tar.gz: d9ca928fc876f292aca393aa4b1071508797b4883e3e64797a2ff75fb436f12e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec8bc4eedba90e8457588265add5cdf55924f4583f65b9da4e5e1404771d009b1cfb5cbf09abcb8376ff7eeeb5cdf65b8f96d63ad5643fcaf11dcae9663489d1
|
7
|
+
data.tar.gz: 3fa22d4d9a06edae1e6bf5db430b9b383f36549666c59056dfb5a87adc754b652da76af3ed0c1dd35f1222e8ca4f486d6298ce6951fff2cf7f580a122f2d8a8d
|
data/lib/floatyhelper/floaty.rb
CHANGED
@@ -12,7 +12,7 @@ class Floaty
|
|
12
12
|
},
|
13
13
|
'vmpooler' => {
|
14
14
|
'type' => 'vm',
|
15
|
-
'url' => '
|
15
|
+
'url' => 'https://vmpooler-prod.k8s.infracore.puppet.net',
|
16
16
|
},
|
17
17
|
'nspooler' => {
|
18
18
|
'type' => 'nonstandard',
|
@@ -32,6 +32,12 @@ class Floaty
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
+
def self.vmpooler_url
|
36
|
+
data = load_vmfloaty_config
|
37
|
+
url = data['services'] && data['services']['vmpooler'] ? data['services']['vmpooler']['url'] : nil
|
38
|
+
url || FLOATY_SERVICES['vmpooler']['url']
|
39
|
+
end
|
40
|
+
|
35
41
|
# This adds some stdout printing here which I was trying to avoid, but
|
36
42
|
# I think it makes sense to put it here rather than the main floatyhelper
|
37
43
|
# somewhere.
|
data/lib/floatyhelper/version.rb
CHANGED
data/lib/floatyhelper/vm.rb
CHANGED
@@ -24,8 +24,9 @@ class VM
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def self.find_pooled_platforms
|
27
|
+
vmpooler_url = Floaty.vmpooler_url
|
27
28
|
begin # rubocop:disable Style/RedundantBegin
|
28
|
-
uri = URI.parse(
|
29
|
+
uri = URI.parse("#{vmpooler_url}/status")
|
29
30
|
http = Net::HTTP.new(uri.host, uri.port)
|
30
31
|
http.use_ssl = true
|
31
32
|
result = http.get(uri.request_uri)
|
@@ -36,7 +37,7 @@ class VM
|
|
36
37
|
rescue StandardError
|
37
38
|
# Not a great practice to swallow all errors, but this list is probably
|
38
39
|
# pretty stable, so let's just pass along the default.
|
39
|
-
puts
|
40
|
+
puts "Error looking up pooled platforms from #{vmpooler_url}/status. Using default pooled platform list instead.".yellow
|
40
41
|
pooled_platforms_default
|
41
42
|
end
|
42
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: floatyhelper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Burgan-Illig
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -203,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
203
203
|
- !ruby/object:Gem::Version
|
204
204
|
version: '0'
|
205
205
|
requirements: []
|
206
|
-
rubygems_version: 3.1.
|
206
|
+
rubygems_version: 3.1.6
|
207
207
|
signing_key:
|
208
208
|
specification_version: 4
|
209
209
|
summary: CLI tool for manipulating Puppet's vmpooler VMs with Vmfloaty.
|