Class: OffTheGrid::HostGroup
- Inherits:
-
NamedResource
- Object
- NamedResource
- OffTheGrid::HostGroup
- Defined in:
- lib/off_the_grid/host_group.rb
Overview
A class to represent SGE Host Groups
Instance Attribute Summary
Attributes inherited from NamedResource
Class Method Summary collapse
-
.list ⇒ Object
Get the list of SGE host groups.
Instance Method Summary collapse
Methods inherited from NamedResource
Methods included from GridResource
#<=>, #delete, #extract_detail, #new?, #save, #validate_before_delete, #validate_before_save
Constructor Details
This class inherits a constructor from OffTheGrid::NamedResource
Class Method Details
.list ⇒ Object
Get the list of SGE host groups
5 6 7 |
# File 'lib/off_the_grid/host_group.rb', line 5 def self.list `qconf -shgrpl`.chomp.split("\n").sort.collect { |name| new(name) } end |
Instance Method Details
#as_tree ⇒ Object
13 14 15 |
# File 'lib/off_the_grid/host_group.rb', line 13 def as_tree `qconf -shgrp_tree #{name}`.chomp end |
#details ⇒ Object
9 10 11 |
# File 'lib/off_the_grid/host_group.rb', line 9 def details `qconf -shgrp #{name}`.chomp end |
#hosts ⇒ Object
17 18 19 |
# File 'lib/off_the_grid/host_group.rb', line 17 def hosts extract_detail(:hostlist).map { |host| ExecuteHost.new(host) } end |