Class: HostDefinition
- Inherits:
-
Object
- Object
- HostDefinition
- Defined in:
- lib/sshotgun.rb
Overview
Class to contain information about each server
Instance Attribute Summary collapse
-
#category ⇒ Object
category is a freeform identifier for the type of the host.
-
#desc ⇒ Object
desc is a one sentence string describing main purpose of the host (optional).
-
#hostname ⇒ Object
hostname is the primary hostname or fqdn (NOT an alias).
-
#os ⇒ Object
os is a freeform string indicating os name + server/workstation + version.
-
#status ⇒ Object
status is freeform text field that the script programmer can set.
Instance Method Summary collapse
-
#initialize(hostname, category = "", os = "", desc = "") ⇒ HostDefinition
constructor
A new instance of HostDefinition.
Constructor Details
#initialize(hostname, category = "", os = "", desc = "") ⇒ HostDefinition
Returns a new instance of HostDefinition.
40 41 42 43 44 45 46 |
# File 'lib/sshotgun.rb', line 40 def initialize(hostname, category = "", os = "", desc = "") @hostname = hostname @category = category @os = os @desc = desc @status = "" end |
Instance Attribute Details
#category ⇒ Object
category is a freeform identifier for the type of the host. e.g. “production”, “devint”, “qaint”, “staging” (optional)
29 30 31 |
# File 'lib/sshotgun.rb', line 29 def category @category end |
#desc ⇒ Object
desc is a one sentence string describing main purpose of the host (optional)
35 36 37 |
# File 'lib/sshotgun.rb', line 35 def desc @desc end |
#hostname ⇒ Object
hostname is the primary hostname or fqdn (NOT an alias). It is better to only refer to the primary DNS entry for a machine or VM.
26 27 28 |
# File 'lib/sshotgun.rb', line 26 def hostname @hostname end |
#os ⇒ Object
os is a freeform string indicating os name + server/workstation + version. e.g. ubuntu_server_7.10 (optional)
32 33 34 |
# File 'lib/sshotgun.rb', line 32 def os @os end |
#status ⇒ Object
status is freeform text field that the script programmer can set. Generally set to “started”, “finished”, “aborted”, etc.
38 39 40 |
# File 'lib/sshotgun.rb', line 38 def status @status end |