Skip to content

Implement Storage#upload() request#97

Open
davispuh wants to merge 1 commit into
fog:masterfrom
davispuh:upload
Open

Implement Storage#upload() request#97
davispuh wants to merge 1 commit into
fog:masterfrom
davispuh:upload

Conversation

@davispuh

@davispuh davispuh commented Oct 9, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

Can you please fix the linting issue?

@davispuh

Copy link
Copy Markdown
Contributor Author

Now it should be fixed

@davispuh

Copy link
Copy Markdown
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
Copy Markdown
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.

@davispuh

Copy link
Copy Markdown
Contributor Author

ping?

@tristanrobert tristanrobert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage github action is simply old, you should upgrade it.

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.

3 participants