Class: Fog::Compute::OpenNebula::Groups
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::OpenNebula::Groups
- Defined in:
- lib/fog/opennebula/models/compute/groups.rb
Instance Method Summary collapse
Instance Method Details
permalink #all(filter = {}) ⇒ Object
[View source]
12 13 14 |
# File 'lib/fog/opennebula/models/compute/groups.rb', line 12 def all(filter={}) load(service.list_groups(filter)) end |
permalink #get(id) ⇒ Object
[View source]
16 17 18 19 20 21 22 23 24 |
# File 'lib/fog/opennebula/models/compute/groups.rb', line 16 def get(id) group = self.all({:id => id}) if group.length > 1 raise Fog::Errors::Error.new("groups.get should return only one group, not #{group.length}!") end group.first end |
permalink #get_by_name(str) ⇒ Object
[View source]
26 27 28 |
# File 'lib/fog/opennebula/models/compute/groups.rb', line 26 def get_by_name(str) self.all({:name => str}) end |