Class: Fog::Compute::ProfitBricks::Groups

Inherits:
Fog::Collection
  • Object
show all
Includes:
Helpers::ProfitBricks::DataHelper
Defined in:
lib/fog/profitbricks/models/compute/groups.rb

Instance Method Summary collapse

Methods included from Helpers::ProfitBricks::DataHelper

#flatten

Instance Method Details

#allObject



11
12
13
14
15
# File 'lib/fog/profitbricks/models/compute/groups.rb', line 11

def all()
  result = service.get_all_groups()

  load(result.body['items'].each { |group| flatten(group) })
end

#get(group_id) ⇒ Object



17
18
19
20
21
22
# File 'lib/fog/profitbricks/models/compute/groups.rb', line 17

def get(group_id)
  response = service.get_group(group_id)
  group = response.body

  new(flatten(group))
end