1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
This commit is contained in:
Rodrigo Estebanez 2013-09-03 13:17:13 +02:00
parent e837f0596f
commit 81f8911fc7

View file

@ -10,31 +10,9 @@ module Fog
attribute :vm
# def index
# disks.map{ |disk| new(disk.merge(all_disks: @disks, vm_id: vm_id))}
# end
#
# def all
# index
# end
#
# def get(instance_id)
# disk = disks.detect{ |disk| disk['InstanceID'] == instance_id }
# return nil unless disk
# new(disk.merge(all_disks: @disks, vm_id: vm_id))
# end
#
# def get_by_name(disk_name)
# disk = disks.detect{ |disk| disk['element_name'] == disk_name }
# return nil unless disk
# new(disk.merge(all_disks: @disks, vm_id: vm_id))
# end
def create(size)
item_list unless @disks
data = Fog::Generators::Compute::VcloudDirector::Disks.new(@disks)
puts data
puts data.disks
data.add_hard_disk(size)
response = service.put_vm_disks(vm.id, data.disks)
service.process_task(response.body)
@ -56,13 +34,6 @@ module Fog
items
end
# private
# def disks
# @disks = service.get_vm_disks(vm_id).body
# @disks['disks']
# end
end
end
end