lib/fog/vsphere/requests/compute/upload_iso.rb in fog-vsphere-0.5.0 vs lib/fog/vsphere/requests/compute/upload_iso.rb in fog-vsphere-0.6.0
- old
+ new
@@ -17,17 +17,18 @@
end
def upload_iso(options = {})
options = upload_iso_check_options(options)
datastore = get_raw_datastore(options['datastore'], options['datacenter'])
- datacenter = get_datacenter(options['datacenter'])
+ datacenter = get_raw_datacenter(options['datacenter'])
filename = options['filename'] || File.basename(options['local_path'])
unless datastore.exists? options['upload_directory']+'/'
- @connection.serviceContent.fileManager.MakeDirectory :name => "[#{options['datastore']}] #{options['directory']}",
+ @connection.serviceContent.fileManager.MakeDirectory :name => "[#{options['datastore']}] #{options['upload_directory']}",
:datacenter => datacenter,
:createParentDirectories => false
end
datastore.upload options['upload_directory']+'/'+filename, options['local_path']
+ datastore.exists? options['upload_directory']+'/'+filename
end
end
end
end
end