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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1829fb78be42701872cbbc6e8960ab3e3ebcd8c20b4b5983a32111e5ee2a7b1c
4
- data.tar.gz: 551dfec7ca2c9f64d1f975b6c202882de69b8e09f4cd06d66a50e55623a5d680
3
+ metadata.gz: 12632be13fdd03beaa837d72ea01a0ba7fff08494a79ed4f839070debfc35e89
4
+ data.tar.gz: d9ca928fc876f292aca393aa4b1071508797b4883e3e64797a2ff75fb436f12e
5
5
  SHA512:
6
- metadata.gz: 5300396a677ea5076639329b4d7fc5cf5ec07c267ad59c840d782f4f997484a704b0e4cfdccfb1b64c1c6ef1937a58d287ce1832936ed6cfeb71d5403e0a335b
7
- data.tar.gz: 91aec17eede5c0241b47e96653556580d476ebe17bdd8d0caae7df0b8f51094917b484f5b3e8c504b8b6669929da333f4bbdde7c1c3c9809965c487d3bce446b
6
+ metadata.gz: ec8bc4eedba90e8457588265add5cdf55924f4583f65b9da4e5e1404771d009b1cfb5cbf09abcb8376ff7eeeb5cdf65b8f96d63ad5643fcaf11dcae9663489d1
7
+ data.tar.gz: 3fa22d4d9a06edae1e6bf5db430b9b383f36549666c59056dfb5a87adc754b652da76af3ed0c1dd35f1222e8ca4f486d6298ce6951fff2cf7f580a122f2d8a8d
@@ -12,7 +12,7 @@ class Floaty
12
12
  },
13
13
  'vmpooler' => {
14
14
  'type' => 'vm',
15
- 'url' => 'http://vmpooler.delivery.puppetlabs.net',
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.
@@ -1,3 +1,3 @@
1
1
  module FloatyhelperVersion
2
- VERSION = '2.0.5'.freeze
2
+ VERSION = '2.0.6'.freeze
3
3
  end
@@ -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('https://vmpooler.delivery.puppetlabs.net/status')
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 'Error looking up pooled platforms from vmpooler.delivery.puppetlabs.net. Using default pooled platform list instead.'.yellow
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.5
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-07-29 00:00:00.000000000 Z
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.2
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.