Class: AutomateIt::PlatformManager::SunOS

Inherits:
Uname show all
Defined in:
lib/automateit/platform_manager/sunos.rb

Overview

PlatformManager::SunOS

A PlatformManager driver for SunOS.

Constant Summary

Constants inherited from AutomateIt::Plugin::Driver

AutomateIt::Plugin::Driver::BASE_DRIVER_NAME

Constants included from Constants

Constants::HELPERS_DIR, Constants::INSTALL_DIR, Constants::PERROR, Constants::PEXEC, Constants::PNOTE, Constants::WARNING_BOILERPLATE

Instance Attribute Summary

Attributes inherited from Struct

#key_aliases

Attributes inherited from AutomateIt::Plugin::Driver

#manager

Attributes inherited from Common

#interpreter

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Uname

#setup

Methods inherited from Struct

#setup, #tags

Methods inherited from AutomateIt::Plugin::Driver

abstract_driver, #available?, base_driver, base_driver?, depends_on, inherited, manager_token, #setup

Methods inherited from AutomateIt::Plugin::Base

#setup, #token

Methods inherited from Common

#initialize, #log, #nitpick, #noop, #noop=, #noop?, #preview, #preview=, #preview?, #preview_for, #setup, #superuser?, #writing, #writing=, #writing?

Constructor Details

This class inherits a constructor from AutomateIt::Common

Class Method Details

.tokenObject



5
6
7
# File 'lib/automateit/platform_manager/sunos.rb', line 5

def self.token
  :sunos
end

Instance Method Details

#_prepareObject



24
25
26
27
28
29
# File 'lib/automateit/platform_manager/sunos.rb', line 24

def _prepare
  return if @struct[:release]
  @struct[:distro] = "sun"
  @struct[:release] = `uname -r`.strip.downcase
  @struct
end

#query(search) ⇒ Object



31
32
33
34
# File 'lib/automateit/platform_manager/sunos.rb', line 31

def query(search)
  _prepare
  super(search)
end

#single_vendor?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/automateit/platform_manager/sunos.rb', line 36

def single_vendor?
  return true
end

#suitability(method, *args) ⇒ Object

:nodoc:



19
20
21
22
# File 'lib/automateit/platform_manager/sunos.rb', line 19

def suitability(method, *args) # :nodoc:
  # Must be higher than PlatformManager::Struct and Uname
  return available? ? 3 : 0
end