Sha256: fd2d0d8dd65116a2ef0178ed4ad7abfc160b2bbdaff2ecc22c4430511eaee791
Contents?: true
Size: 1.05 KB
Versions: 3
Compression:
Stored size: 1.05 KB
Contents
# # Configuration for a 'node' (a server in the provider's infrastructure) # require 'ipaddr' module LeapCli; module Config class Node < Object attr_accessor :file_paths def initialize(manager=nil) super(manager) @node = self @file_paths = [] end # # returns true if this node has an ip address in the range of the vagrant network # def vagrant? begin vagrant_range = IPAddr.new LeapCli.leapfile.vagrant_network rescue ArgumentError => exc Util::bail! { Util::log :invalid, "ip address '#{@node.ip_address}' vagrant.network" } end begin ip_address = IPAddr.new @node.get('ip_address') rescue ArgumentError => exc Util::log :warning, "invalid ip address '#{@node.get('ip_address')}' for node '#{@node.name}'" end return vagrant_range.include?(ip_address) end # # can be overridden by the platform. # returns a list of node names that should be tested before this node # def test_dependencies [] end end end; end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
leap_cli-1.5.6 | lib/leap_cli/config/node.rb |
leap_cli-1.5.1 | lib/leap_cli/config/node.rb |
leap_cli-1.5.0 | lib/leap_cli/config/node.rb |