class Fog::Compute::Ecloud::Groups

Public Instance Methods

all() click to toggle source
# File lib/fog/compute/ecloud/models/groups.rb, line 11
def all
  data = service.get_groups(href).body
  data = if data == ""
           ""
         else
           data[:Groups] ? data[:Groups][:Group] : data
         end
  if data == "" || !data.is_a?(Array) && data[:type] == "application/vnd.tmrk.cloud.layoutRow"
    nil
  else
    load(data)
  end
end
get(uri) click to toggle source
# File lib/fog/compute/ecloud/models/groups.rb, line 25
def get(uri)
  data = service.get_group(uri).body
  if data == ""
    nil
  else
    new(data)
  end
rescue ServiceError => e
  raise e unless e.status_code == 404
  nil
end