class Fog::Compute::OpenNebula::Groups

Public Instance Methods

all(filter={}) click to toggle source
# File lib/fog/opennebula/models/compute/groups.rb, line 12
def all(filter={})
  load(service.list_groups(filter))
end
get(id) click to toggle source
# 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
get_by_name(str) click to toggle source
# File lib/fog/opennebula/models/compute/groups.rb, line 26
def get_by_name(str)
  self.all({:name => str})
end