1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/vcloudng/models/compute/vms.rb
2013-07-09 15:48:44 +02:00

29 lines
No EOL
570 B
Ruby

require 'fog/core/collection'
require 'fog/vcloudng/models/compute/vm'
module Fog
module Compute
class Vcloudng
class Vms < Collection
model Fog::Compute::Vcloudng::Vm
attribute :vapp
private
def get_by_id(item_id)
item = item_list.detect{ |vm| vm[:id] == item_id}
item
end
def item_list
data = service.get_vms(vapp.id).body
items = data[:vms]
items
end
end
end
end
end