Skip to content

Commit

Permalink
Update struct to last proxmox-api-go API
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-sector authored and lbajolet-hashicorp committed Jan 16, 2023
1 parent 7aabeaf commit ad7c88b
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 11 deletions.
4 changes: 2 additions & 2 deletions builder/proxmox/clone/config.hcl2spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions builder/proxmox/common/config.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:generate packer-sdc struct-markdown
//go:generate packer-sdc mapstructure-to-hcl2 -type Config,nicConfig,diskConfig,vgaConfig,additionalISOsConfig
//go:generate packer-sdc mapstructure-to-hcl2 -type Config,nicConfig,diskConfig,vgaConfig,additionalISOsConfig,efiConfig

package proxmox

Expand Down Expand Up @@ -52,7 +52,7 @@ type Config struct {
Sockets int `mapstructure:"sockets"`
OS string `mapstructure:"os"`
BIOS string `mapstructure:"bios"`
EFIDisk string `mapstructure:"efidisk"`
EFIDisk efiConfig `mapstructure:"efidisk"`
Machine string `mapstructure:"machine"`
VGA vgaConfig `mapstructure:"vga"`
NICs []nicConfig `mapstructure:"network_adapters"`
Expand Down Expand Up @@ -102,6 +102,11 @@ type diskConfig struct {
DiskFormat string `mapstructure:"format"`
IOThread bool `mapstructure:"io_thread"`
}
type efiConfig struct {
Storage string `mapstructure:"storage"`
PreEnrolledKeys int `mapstructure:"pre_enrolled_keys"`
EfiType string `mapstructure:"efitype"`
}
type vgaConfig struct {
Type string `mapstructure:"type"`
Memory int `mapstructure:"memory"`
Expand Down
31 changes: 29 additions & 2 deletions builder/proxmox/common/config.hcl2spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions builder/proxmox/iso/config.hcl2spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- Code generated from the comments of the efiConfig struct in builder/proxmox/common/config.go; DO NOT EDIT MANUALLY -->

- `storage` (string) - Storage

- `pre_enrolled_keys` (int) - Pre Enrolled Keys

- `efitype` (string) - Efi Type

<!-- End of code generated from the comments of the efiConfig struct in builder/proxmox/common/config.go; -->
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/hashicorp/packer-plugin-proxmox
go 1.18

require (
github.com/Telmate/proxmox-api-go v0.0.0-20220107223401-b9c909d83a3b
github.com/Telmate/proxmox-api-go v0.0.0-20220524222303-9d9842512e0c
github.com/hashicorp/hcl/v2 v2.14.1
github.com/hashicorp/packer-plugin-sdk v0.3.2
github.com/mitchellh/mapstructure v1.4.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/Telmate/proxmox-api-go v0.0.0-20220107223401-b9c909d83a3b h1:EzGVAEAffdZqkKpI4wC9dzR81v/uBB4yYuXf1wU3fZk=
github.com/Telmate/proxmox-api-go v0.0.0-20220107223401-b9c909d83a3b/go.mod h1:keBhXWLa+UBajvf79xvKcfiqeIc7vZL9wOqxuy1CBGw=
github.com/Telmate/proxmox-api-go v0.0.0-20220524222303-9d9842512e0c h1:zWpApvGyhBPreUo7Hd9oR55tUNfYqlS+SH58aa33O8c=
github.com/Telmate/proxmox-api-go v0.0.0-20220524222303-9d9842512e0c/go.mod h1:uHptTDYag2s4dJQWUYP4VczIeUPGGu3BNy4JGm9MSjg=
github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo=
github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
Expand Down

0 comments on commit ad7c88b

Please sign in to comment.