Module: PuppetX::IntechWIFI::Declare_Environment_Resources::ZoneHelpers

Defined in:
lib/puppet_x/intechwifi/declare_environment_resources.rb

Class Method Summary collapse

Class Method Details

.DefaltZoneValuesObject



780
781
782
783
784
785
786
787
788
# File 'lib/puppet_x/intechwifi/declare_environment_resources.rb', line 780

def self.DefaltZoneValues
  {
      'ipaddr_weighting' => 1,
      'format' => "%{vpc}%{zone}%{az}",
      'ipaddr_weighting' => 1,
      'routes' => [],
      'extra_routes' => [],
  }
end

.GetDefaultZoneValue(value) ⇒ Object



790
791
792
# File 'lib/puppet_x/intechwifi/declare_environment_resources.rb', line 790

def self.GetDefaultZoneValue(value)
  self.DefaltZoneValues[value]
end

.ZoneValue(zone, value, default = nil) ⇒ Object



775
776
777
778
# File 'lib/puppet_x/intechwifi/declare_environment_resources.rb', line 775

def self.ZoneValue(zone, value, default=nil)
  #  If the zone has a value, return it, if not - return the default value.
  zone.has_key?(value) ? zone[value] : default.nil? ? GetDefaultZoneValue(value) : default
end