mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
clean-up
This commit is contained in:
parent
e837f0596f
commit
81f8911fc7
1 changed files with 0 additions and 29 deletions
|
@ -10,31 +10,9 @@ module Fog
|
||||||
|
|
||||||
attribute :vm
|
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)
|
def create(size)
|
||||||
item_list unless @disks
|
item_list unless @disks
|
||||||
data = Fog::Generators::Compute::VcloudDirector::Disks.new(@disks)
|
data = Fog::Generators::Compute::VcloudDirector::Disks.new(@disks)
|
||||||
puts data
|
|
||||||
puts data.disks
|
|
||||||
data.add_hard_disk(size)
|
data.add_hard_disk(size)
|
||||||
response = service.put_vm_disks(vm.id, data.disks)
|
response = service.put_vm_disks(vm.id, data.disks)
|
||||||
service.process_task(response.body)
|
service.process_task(response.body)
|
||||||
|
@ -56,13 +34,6 @@ module Fog
|
||||||
items
|
items
|
||||||
end
|
end
|
||||||
|
|
||||||
# private
|
|
||||||
|
|
||||||
# def disks
|
|
||||||
# @disks = service.get_vm_disks(vm_id).body
|
|
||||||
# @disks['disks']
|
|
||||||
# end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue