fog-proxmox
fog-proxmox copied to clipboard
Implement `Storage#upload()` request
POST /api2/json/nodes/{node}/storage/{storage}/upload API allows to upload ISO images which can then be used for VM installation.
See https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/storage/{storage}/upload
This PR implements this API allowing to
storage = Fog::Storage.new(provider: :proxmox, **params)
isopath = 'my.iso'
file = File.open(isopath, 'rb')
storage.upload({
node: node,
storage: storage
},
{
content: 'iso',
file: file,
filename: File.basename(isopath)
}
)
Can you please fix the linting issue?
Now it should be fixed
I rebased this and test now passes but coverage step fails. I don't really understand that so maybe you could look into fixing that?
I rebased this and test now passes but coverage step fails. I don't really understand that so maybe you could look into fixing that?
Yes the coverage test failure is known issue and shouldn't affect PR merge.
ping?