Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Storage#upload() request #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

davispuh
Copy link
Contributor

@davispuh davispuh commented Oct 9, 2024

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

@Manisha15
Copy link
Contributor

Can you please fix the linting issue?

@davispuh
Copy link
Contributor Author

Now it should be fixed

@davispuh
Copy link
Contributor Author

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?

@Manisha15
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants