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

Support for latest Proxmox API #79

Open
romantomjak opened this issue Jul 1, 2020 · 7 comments
Open

Support for latest Proxmox API #79

romantomjak opened this issue Jul 1, 2020 · 7 comments

Comments

@romantomjak
Copy link
Contributor

Hey, I'd like to help to add the vast majority of options available through the Proxmox API. I do have some concerns about client compatibility as I am certain not all options are supported by all versions of Proxmox's API, but unfortunately I have no experience building clients that support multiple versions of APIs.

Couple of questions to get the ball rolling:

  • What would be the best approach to get started on this?
  • What API versions does this client supports?
  • How can the latest version be supported?

Thanks!

@romantomjak
Copy link
Contributor Author

Hey @V-Paranoiaque, @carlpett and @aabouzaid from the looks of it you are the top contributors of this repository. Thought I'll ping you guys to get the ball rolling.

@aabouzaid
Copy link
Contributor

Hi @romantomjak I don't use Proxmox anymore and unfortunately cannot help with that.
I hope you all the best, it looks a very useful contribution 🚀

@romantomjak
Copy link
Contributor Author

Thank you @aabouzaid. Hopefully I'll hear some good news from others :)

@carlpett
Copy link
Contributor

Hey @romantomjak,
I'm not actually a maintainer on the repo, I just submitted some patches that I needed. I think you want @ggongaware :)
But while I'm here, some thoughts on your general questions:

  • You can use /api2/json/version to get the Proxmox version. However, you'll end up having to maintain a large mapping of what functions/parameters are supported for each version, and I do not believe there's great documentation of this. So quite a lot of work.
  • I believe (and here @ggongaware probably knows better) that the client currently aims to support more or less the latest version, modulo what someone is actually using and thus have written support for.
  • As for where to begin, I'd suggest starting with setting some aims. Maybe making error handling robuster (to deal with unknown parameters/functions) so it is somewhat clear when something isn't supported by Proxmox would be the best spent time rather than trying to solve the general problem of version compatibility?

@romantomjak
Copy link
Contributor Author

Thank you @carlpett, that actually makes a lot of sense! I think the last point ties in nicely with test coverage as well which I think is a must!

So maybe I could first start with adding some test coverage and making things more robust along the way?

@carlpett
Copy link
Contributor

Sounds like a reasonable start!
Although it'll require some setup work, I'd personally suggest aiming for more integration-style tests over than unit tests that mock out Proxmox. Maybe a Vagrant box per Proxmox version, or something similar. The tests will defintely take longer to run, but the confidence will be much higher.

@romantomjak
Copy link
Contributor Author

That is a brilliant idea! I'll look into how to setup a proxmox vagrant box as I'm not entirely sure how proxmox virtualization will work inside a VM. Thanks for being so responsive @carlpett ❤️

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

No branches or pull requests

3 participants