Skip to content

Commit

Permalink
Merge pull request #71 from danitso/release/v0.4.2
Browse files Browse the repository at this point in the history
Release/v0.4.2
  • Loading branch information
danitso-dp authored Feb 13, 2021
2 parents 9c9cd2d + 5871fff commit 69ff016
Show file tree
Hide file tree
Showing 10 changed files with 151 additions and 96 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
## v0.5.0 (UNRELEASED)
## v0.4.2

BUG FIXES:

* resource/virtual_environment_vm: Fix `disk.file_id` diff issue
* resource/virtual_environment_vm: Fix disk resizing issue

OTHER:

Expand Down Expand Up @@ -47,7 +52,7 @@ BUG FIXES:
* resource/virtual_environment_container: Fix VM ID collision when `vm_id` is not specified
* resource/virtual_environment_vm: Fix VM ID collision when `vm_id` is not specified
* resource/virtual_environment_vm: Fix disk import issue when importing from directory-based datastores
* resource/virtual/environment/vm: Fix handling of storage name - correct handling of `-`
* resource/virtual_environment_vm: Fix handling of storage name - correct handling of `-`

WORKAROUNDS:

Expand Down
4 changes: 2 additions & 2 deletions proxmox/virtual_environment_cluster_alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

// CreateAlias create an alias
func (c *VirtualEnvironmentClient) CreateAlias(d *VirtualEnvironmentClusterAliasCreateRequestBody) error {
func (c *VirtualEnvironmentClient) CreateAlias(d *VirtualEnvironmentClusterAliasCreateRequestBody) error {
return c.DoRequest(hmPOST, "cluster/firewall/aliases", d, nil)
}

Expand Down Expand Up @@ -60,4 +60,4 @@ func (c *VirtualEnvironmentClient) ListAliases() ([]*VirtualEnvironmentClusterAl
// UpdateAlias updates an alias.
func (c *VirtualEnvironmentClient) UpdateAlias(id string, d *VirtualEnvironmentClusterAliasUpdateRequestBody) error {
return c.DoRequest(hmPUT, fmt.Sprintf("cluster/firewall/aliases/%s", url.PathEscape(id)), d, nil)
}
}
15 changes: 7 additions & 8 deletions proxmox/virtual_environment_cluster_alias_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ type VirtualEnvironmentClusterAliasGetResponseBody struct {

// VirtualEnvironmentClusterAliasGetResponseData contains the data from an alias get response.
type VirtualEnvironmentClusterAliasGetResponseData struct {
Comment *string `json:"comment,omitempty" url:"comment,omitempty"`
Name string `json:"name" url:"name"`
CIDR string `json:"cidr" url:"cidr"`
Digest *string `json:"digest" url:"digest"`
IPVersion int `json:"ipversion" url:"ipversion"`
Comment *string `json:"comment,omitempty" url:"comment,omitempty"`
Name string `json:"name" url:"name"`
CIDR string `json:"cidr" url:"cidr"`
Digest *string `json:"digest" url:"digest"`
IPVersion int `json:"ipversion" url:"ipversion"`
}

// VirtualEnvironmentClusterAliasListResponseBody contains the data from an alias get response.
Expand All @@ -33,7 +33,6 @@ type VirtualEnvironmentClusterAliasListResponseBody struct {
// VirtualEnvironmentClusterAliasUpdateRequestBody contains the data for an alias update request.
type VirtualEnvironmentClusterAliasUpdateRequestBody struct {
Comment *string `json:"comment,omitempty" url:"comment,omitempty"`
ReName string `json:"rename" url:"rename"`
CIDR string `json:"cidr" url:"cidr"`
ReName string `json:"rename" url:"rename"`
CIDR string `json:"cidr" url:"cidr"`
}

4 changes: 2 additions & 2 deletions proxmox/virtual_environment_cluster_ipset.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

// CreateIPSet create an IPSet
func (c *VirtualEnvironmentClient) CreateIPSet(d *VirtualEnvironmentClusterIPSetCreateRequestBody) error {
func (c *VirtualEnvironmentClient) CreateIPSet(d *VirtualEnvironmentClusterIPSetCreateRequestBody) error {
return c.DoRequest(hmPOST, "cluster/firewall/ipset", d, nil)
}

Expand Down Expand Up @@ -70,4 +70,4 @@ func (c *VirtualEnvironmentClient) GetListIPSets() (*VirtualEnvironmentClusterIP
})

return resBody, nil
}
}
14 changes: 7 additions & 7 deletions proxmox/virtual_environment_cluster_ipset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type VirtualEnvironmentClusterIPSetListResponseBody struct {
// VirtualEnvironmentClusterIPSetCreateRequestBody contains the data for an IPSet create request
type VirtualEnvironmentClusterIPSetCreateRequestBody struct {
Comment string `json:"comment,omitempty" url:"comment,omitempty"`
Name string `json:"name" url:"name"`
Name string `json:"name" url:"name"`
}

// VirtualEnvironmentClusterIPSetGetResponseBody contains the body from an IPSet get response.
Expand All @@ -26,22 +26,22 @@ type VirtualEnvironmentClusterIPSetGetResponseBody struct {

// VirtualEnvironmentClusterIPSetGetResponseData contains the data from an IPSet get response.
type VirtualEnvironmentClusterIPSetGetResponseData struct {
CIDR string `json:"cidr" url:"cidr"`
NoMatch *CustomBool `json:"nomatch,omitempty" url:"nomatch,omitempty,int"`
Comment string `json:"comment,omitempty" url:"comment,omitempty"`
CIDR string `json:"cidr" url:"cidr"`
NoMatch *CustomBool `json:"nomatch,omitempty" url:"nomatch,omitempty,int"`
Comment string `json:"comment,omitempty" url:"comment,omitempty"`
}

// VirtualEnvironmentClusterIPSetUpdateRequestBody contains the data for an IPSet update request.
type VirtualEnvironmentClusterIPSetUpdateRequestBody struct {
ReName string `json:"rename,omitempty" url:"rename,omitempty"`
ReName string `json:"rename,omitempty" url:"rename,omitempty"`
Comment *string `json:"comment,omitempty" url:"comment,omitempty"`
Name string `json:"name" url:"name"`
}

// VirtualEnvironmentClusterIPSetGetResponseData contains list of IPSets from
type VirtualEnvironmentClusterIPSetListResponseData struct {
Comment *string `json:"comment,omitempty" url:"comment,omitempty"`
Name string `json:"name" url:"name"`
Comment *string `json:"comment,omitempty" url:"comment,omitempty"`
Name string `json:"name" url:"name"`
}

// VirtualEnvironmentClusterIPSetContent is an array of VirtualEnvironmentClusterIPSetGetResponseData.
Expand Down
5 changes: 4 additions & 1 deletion proxmoxtf/data_source_virtual_environment_datastores.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package proxmoxtf

import (
"fmt"
"sort"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)
Expand Down Expand Up @@ -126,7 +127,9 @@ func dataSourceVirtualEnvironmentDatastoresRead(d *schema.ResourceData, m interf
}

if v.ContentTypes != nil {
contentTypes[i] = []string(*v.ContentTypes)
contentTypeList := []string(*v.ContentTypes)
sort.Strings(contentTypeList)
contentTypes[i] = contentTypeList
} else {
contentTypes[i] = []string{}
}
Expand Down
2 changes: 1 addition & 1 deletion proxmoxtf/resource_virtual_environment_cluster_ipset.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func resourceVirtualEnvironmentClusterIPSetRead(d *schema.ResourceData, m interf
return err
}

for key, _ := range IPSet {
for key := range IPSet {
d.Set(mkResourceVirtualEnvironmentClusterIPSetCIDR, IPSet[key])
}

Expand Down
Loading

0 comments on commit 69ff016

Please sign in to comment.