Class: Facts::Solaris::Hypervisors::Zone
- Inherits:
 - 
      Object
      
        
- Object
 - Facts::Solaris::Hypervisors::Zone
 
 
- Defined in:
 - lib/facter/facts/solaris/hypervisors/zone.rb
 
Constant Summary collapse
- FACT_NAME =
 'hypervisors.zone'
Instance Method Summary collapse
- #call_the_resolver ⇒ Object
 - #current_zone ⇒ Object
 - 
  
    
      #initialize  ⇒ Zone 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Zone.
 
Constructor Details
Instance Method Details
#call_the_resolver ⇒ Object
      13 14 15 16 17  | 
    
      # File 'lib/facter/facts/solaris/hypervisors/zone.rb', line 13 def call_the_resolver fact_value = current_zone Facter::ResolvedFact.new(FACT_NAME, fact_value) end  | 
  
#current_zone ⇒ Object
      19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35  | 
    
      # File 'lib/facter/facts/solaris/hypervisors/zone.rb', line 19 def current_zone current_zone_name = Facter::Resolvers::Solaris::ZoneName.resolve(:current_zone_name) return unless current_zone_name zones = Facter::Resolvers::Solaris::Zone.resolve(:zone) return nil unless zones current_zone = zones.find { |r| r[:name] == current_zone_name } { brand: current_zone[:brand], id: Facter::Utils.try_to_int(current_zone[:id]), ip_type: current_zone[:iptype], name: current_zone[:name], uuid: current_zone[:uuid] } end  |