cloud66_agent 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjNmOWJiODVlYjQ3NzE1NGQ2ZGI4ODY2YzBiMjBjYTM4ODVlZDhjZQ==
4
+ NGE3ZDc4YjdjMjM0ZDI4MDI4OTI1NGY1NTA5ZWEwYTg3MzFiZGFhMg==
5
5
  data.tar.gz: !binary |-
6
- ZDM1YTU2ODYwZmQzMDRhODVmM2IxYzljODEyOGUzNzhmNTE2OTUxMg==
6
+ NzdlOGVmNTRmMjljNzI5NDFiZDEwMWE2Y2NlOTUxNWIzM2UwMGY5ZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Yzk1ZWEyMTQ3ZDdkZTJiN2JmNmQwYTZjYTRmYzIyN2U5YjliZjUwYjM4ZjZj
10
- MTllOTViYTc2ZDllNzdmMGFmYzFiZTFkZjVhYTA4YWMzZTBlN2Y2NmYxYWVk
11
- N2M0Y2M0YTlhODgxYWNmODM0MGIzODk0N2I3MDMxYzAxN2IwMDk=
9
+ MzJmNzJmOTg1YzQxNTJlODQyNzA0NzZjYzA4ODJjMDNkZjhiNTQwNWY2Y2Vk
10
+ Nzc0NWJhZDc4NDdlN2NjZTNkZTg2ZDMxYzI5ZjcxNTFiOTYzYzRjMWJmNzhk
11
+ MGZhYjU4MWY0MDlmOWFmMTg1ZTFjNTgxNTk0MTM2NTg1MjFkNmU=
12
12
  data.tar.gz: !binary |-
13
- MTJkY2VhNWZkMDE3MDdjNWQxZWY5ZDI2YzAxYzFlYTgyNGE1M2EwMDkxMDIw
14
- MmJmMjc0OWI1N2U5YjNmNTcyMDg3MzM0OWY0YWE4MTY3ODc5YmY1YTY2NjFl
15
- NGRhZWExNTJjODEzMmUyZTY1YWE5ZmZiNTAwMjU1YzBjMjVmN2U=
13
+ NGJkNjY3YzAwZDBhNjY3MjdkODBhMzdiMWM5MWU5Yjc0NGMzMWZiYTJmMTA3
14
+ MzQ2NjQ4OTc2MzUzNmZkYWZjMGIxMzJjMDIwY2M5NTllZmFiZTA4Njk5ZmQy
15
+ YmU3NzJjZmYzNDJlYzBkNmQzMTNjYjRjNjk2ZGJiODRmNDU5ZjQ=
@@ -13,7 +13,7 @@ module Cloud66
13
13
  # Defines the minor version
14
14
  # PATCH:
15
15
  # Defines the patch version
16
- MAJOR, MINOR, PATCH = 1, 2, 2
16
+ MAJOR, MINOR, PATCH = 1, 2, 3
17
17
 
18
18
  #ie. PRERELEASE_MODIFIER = 'beta1' or nil
19
19
  PRERELEASE_MODIFIER = nil
@@ -8,19 +8,22 @@ module Cloud66
8
8
  end
9
9
 
10
10
  def self.address_info
11
- result = {}
12
11
  # AWS special case
13
12
  if $config.is_aws
13
+ result = {}
14
14
  reported_ip = `/usr/bin/curl -s http://169.254.169.254/latest/meta-data/public-ipv4`
15
15
  result[:ext_ipv4] = reported_ip if reported_ip =~ /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/
16
16
  reported_ip = `/usr/bin/curl -s http://169.254.169.254/latest/meta-data/local-ipv4`
17
17
  result[:int_ipv4] = reported_ip if reported_ip =~ /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/
18
+ return result
18
19
  # GC special case
19
20
  elsif $config.is_gc
21
+ result = {}
20
22
  external_ip = `/usr/bin/curl -s -H "Metadata-Flavor: Google" http://metadata/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip`
21
23
  result[:ext_ipv4] = external_ip if external_ip =~ /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/
22
24
  internal_ip = `/usr/bin/curl -s -H "Metadata-Flavor: Google" http://metadata/computeMetadata/v1/instance/network-interfaces/0/ip`
23
25
  result[:int_ipv4] = internal_ip if internal_ip =~ /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/
26
+ return result
24
27
  else
25
28
  interfaces_raw = `facter interfaces`
26
29
  interfaces = interfaces_raw.split(',').select { |interface| interface =~ /^eth/ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloud66_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloud 66