Re: [pve-devel] API Return Values

2017-10-27 Thread Fabian Grünbichler
On Tue, Oct 24, 2017 at 12:04:03PM -0500, Adam Krone wrote: > (resending, forgot to remove my signature again...) > > >I wonder how terraform handle other crontab like files? > > Terraform doesn't need to know about implementation details like crontab > files. If any Terraform providers

Re: [pve-devel] API Return Values

2017-10-24 Thread Adam Krone
(resending, forgot to remove my signature again...) >I wonder how terraform handle other crontab like files? Terraform doesn't need to know about implementation details like crontab files. If any Terraform providers currently handle crontab files, it's because the API abstracts that. All

Re: [pve-devel] API Return Values

2017-10-23 Thread Dietmar Maurer
> >But this kind of ID is not suitable to store in an external database. > > I understand your concern, however, it sounds like the API already handles > these potential discrepancies. If someone updates a backup, regardless of > if it's through the GUI, crontab file, etc., any API requests made

Re: [pve-devel] API Return Values

2017-10-23 Thread Adam Krone
>This work very well with the GUI, because it detect/throws errors as soon as >someone modified the file (digest changed). > >But this kind of ID is not suitable to store in an external database. I understand your concern, however, it sounds like the API already handles these potential

Re: [pve-devel] API Return Values

2017-10-22 Thread Dietmar Maurer
> > But if a user delete and recreates a resource the ID may get re-used. > > So we would have to make sure that this would not happen. > > But maybe this is not really a issue? > > Yeah, I'm not too concerned about that. Terraform doesn't make any > guarantees that your saved state is up to

Re: [pve-devel] API Return Values

2017-10-20 Thread Andreas Steinel
Hi Adam, Will you open source your GO library? Best, Andreas ___ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Re: [pve-devel] API Return Values

2017-10-20 Thread Adam Krone
> But if a user delete and recreates a resource the ID may get re-used. > So we would have to make sure that this would not happen. > But maybe this is not really a issue? Yeah, I'm not too concerned about that. Terraform doesn't make any guarantees that your saved state is up to date, but it

Re: [pve-devel] API Return Values

2017-10-20 Thread Dietmar Maurer
> I need the backup ID because I may need to make an update or delete call at > some point in the future. The problem is that we have absolute no guarantees about IDs - they are just unique at a specific point in time. But if a user delete and recreates a resource the ID may get re-used. So we

Re: [pve-devel] API Return Values

2017-10-20 Thread Adam Krone
(Re-sending as my first try was rejected. Forgot to remove my signature that contains an attachment) I need the backup ID because I may need to make an update or delete call at some point in the future. This may not be an issue if I were building something interactive like a CLI or web UI, where

Re: [pve-devel] API Return Values

2017-10-20 Thread Dietmar Maurer
> If I'm managing containers or groups, for example, this isn't a problem as > they both have user-defined ids (vmid, groupid). After a quick browse of > the API documentation, this appears to be the case for most of the > resources. If I'm managing backups, however, the API generates the id, and

[pve-devel] API Return Values

2017-10-20 Thread Adam Krone
Hi, I'm building an API client in Go, as well as a Terraform provider that consumes that client, and ran into an issue with the API that's preventing me from building out one particular feature. I've noticed that many (perhaps all?) non-GET methods return null, which is unusual compared to many