fog-proxmox icon indicating copy to clipboard operation
fog-proxmox copied to clipboard

Implement `Storage#upload()` request

Open davispuh opened this issue 1 year ago • 5 comments

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)
    }
)

davispuh avatar Oct 09 '24 16:10 davispuh

Can you please fix the linting issue?

Manisha15 avatar Oct 17 '24 08:10 Manisha15

Now it should be fixed

davispuh avatar Oct 17 '24 12:10 davispuh

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?

davispuh avatar Oct 17 '24 13:10 davispuh

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.

Manisha15 avatar Oct 18 '24 08:10 Manisha15

ping?

davispuh avatar Jan 22 '25 19:01 davispuh