From b729f433fc97d3421a872cb6adf6247d3cb7cb5b Mon Sep 17 00:00:00 2001 From: shichangkuo Date: Wed, 7 Feb 2024 13:38:38 +0800 Subject: [PATCH] Update CHANGELOG for v1.61.1 (#4220) --- CHANGELOG.md | 43 +++++++++++ .../bms/v1/baremetalservers/requests.go | 77 +++++++++++++++++++ .../openstack/bms/v1/baremetalservers/urls.go | 1 - .../openstack/cce/v3/nodes/results.go | 2 +- .../openstack/cdn/v1/domains/requests.go | 22 ++++++ .../openstack/cdn/v1/domains/results.go | 20 +++++ .../openstack/cdn/v1/domains/urls.go | 4 + 7 files changed, 167 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1133ee2d98..0737495983 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,48 @@ # CHANGELOG +## 1.61.1 (February 7, 2024) + +* **New Resource:** + + `huaweicloud_coc_script` [GH-3682] + + `huaweicloud_coc_script_execute` [GH-3757] + + `huaweicloud_dcs_bigkey_analysis` [GH-4030] + + `huaweicloud_dcs_hotkey_analysis` [GH-4070] + + `huaweicloud_fgs_function_event` [GH-4080] + + `huaweicloud_vpc_network_acl` [GH-4111] + + `huaweicloud_dws_workload_plan` [GH-4135] + + `huaweicloud_dli_elastic_resource_pool` [GH-4186] + +* **New Data Source:** + + `huaweicloud_as_policy_execute_logs` [GH-4094] + + `huaweicloud_compute_instance_remote_console` [GH-4123] + + `huaweicloud_dli_datasource_connections` [GH-4130] + + `huaweicloud_dli_datasource_auths` [GH-4146] + + `huaweicloud_ram_shared_resources` [GH-4151] + + `huaweicloud_dc_virtual_gateways` [GH-4184] + + + `huaweicloud_rds_pg_databases` [GH-4085] + + `huaweicloud_rds_mysql_database_privileges` [GH-4092] + + `huaweicloud_rds_sqlserver_databases` [GH-4117] + + `huaweicloud_rds_sqlserver_database_privileges` [GH-4150] + + `huaweicloud_rds_sqlserver_accounts` [GH-4158] + +ENHANCEMENTS: + +* resource/huaweicloud_bms_instance: Support updating `nics` block [GH-4073] +* resource/huaweicloud_bms_instance: Support `metadata` parameter [GH-4100] +* resource/huaweicloud_rds_instance: Support updating volume size in prepaid mode [GH-4078] +* resource/huaweicloud_vpc_bandwidth: Support changing billing mode to prePaid [GH-4113] +* resource/huaweicloud_vpc_eip: Support changing billing mode to prePaid [GH-4122] +* resource/huaweicloud_obs_bucket: Support agency configuration in `logging` block [GH-4138] +* resource/huaweicloud_identity_project: Support `status` parameter [GH-4143] +* resource/huaweicloud_vpn_gateway: Add tags support [GH-4149] +* resource/huaweicloud_vpn_customer_gateway: Add tags support [GH-4160] +* resource/huaweicloud_vpn_connection: Add tags support [GH-4161] + +BUG FIXES: + +* resource/huaweicloud_css_cluster: Fix the issue when creating cluster in postPaid billing mode [GH-4125] + ## 1.61.0 (January 29, 2024) * **New Resource:** diff --git a/vendor/github.com/chnsz/golangsdk/openstack/bms/v1/baremetalservers/requests.go b/vendor/github.com/chnsz/golangsdk/openstack/bms/v1/baremetalservers/requests.go index 5b75acf69b..3cb257ed59 100644 --- a/vendor/github.com/chnsz/golangsdk/openstack/bms/v1/baremetalservers/requests.go +++ b/vendor/github.com/chnsz/golangsdk/openstack/bms/v1/baremetalservers/requests.go @@ -194,6 +194,50 @@ type AddNicsOptsBuilder interface { ToServerAddNicsMap() (map[string]interface{}, error) } +func (opts StopServerOps) ToServerStopServerMap() (map[string]interface{}, error) { + return golangsdk.BuildRequestBody(opts, "os-stop") +} + +func (opts StartServerOps) ToServerStartServerMap() (map[string]interface{}, error) { + return golangsdk.BuildRequestBody(opts, "os-start") +} + +func (opts RebootServerOps) ToServerRebootServerMap() (map[string]interface{}, error) { + return golangsdk.BuildRequestBody(opts, "reboot") +} + +type StartServerOps struct { + Servers []Servers `json:"servers" required:"true"` +} + +type StopServerOps struct { + // The value can be: HARD and SOFT. Only HARD takes effect. + Type string `json:"type" required:"true"` + Servers []Servers `json:"servers" required:"true"` +} + +type RebootServerOps struct { + // The value can be: HARD and SOFT. Only HARD takes effect. + Type string `json:"type" required:"true"` + Servers []Servers `json:"servers" required:"true"` +} + +type Servers struct { + ID string `json:"id" required:"true"` +} + +type RebootServerOpsBuilder interface { + ToServerRebootServerMap() (map[string]interface{}, error) +} + +type StartServerOpsBuilder interface { + ToServerStartServerMap() (map[string]interface{}, error) +} + +type StopServerOpsBuilder interface { + ToServerStopServerMap() (map[string]interface{}, error) +} + func (opts UpdateOpts) ToServerUpdateMap() (map[string]interface{}, error) { b, err := golangsdk.BuildRequestBody(opts, "") if err != nil { @@ -259,3 +303,36 @@ func GetJobDetail(client *golangsdk.ServiceClient, jobID string) (r JobResult) { _, r.Err = client.Get(jobURL(client, jobID), &r.Body, nil) return } + +func RebootServer(client *golangsdk.ServiceClient, ops RebootServerOpsBuilder) (r JobResult) { + reqBody, err := ops.ToServerRebootServerMap() + if err != nil { + r.Err = err + return + } + + _, r.Err = client.Post(serverStatusPostURL(client), reqBody, &r.Body, nil) + return +} + +func StartServer(client *golangsdk.ServiceClient, ops StartServerOpsBuilder) (r JobResult) { + reqBody, err := ops.ToServerStartServerMap() + if err != nil { + r.Err = err + return + } + + _, r.Err = client.Post(serverStatusPostURL(client), reqBody, &r.Body, nil) + return +} + +func StopServer(client *golangsdk.ServiceClient, ops StopServerOpsBuilder) (r JobResult) { + reqBody, err := ops.ToServerStopServerMap() + if err != nil { + r.Err = err + return + } + + _, r.Err = client.Post(serverStatusPostURL(client), reqBody, &r.Body, nil) + return +} diff --git a/vendor/github.com/chnsz/golangsdk/openstack/bms/v1/baremetalservers/urls.go b/vendor/github.com/chnsz/golangsdk/openstack/bms/v1/baremetalservers/urls.go index 8ad680f9f4..842cc9822b 100644 --- a/vendor/github.com/chnsz/golangsdk/openstack/bms/v1/baremetalservers/urls.go +++ b/vendor/github.com/chnsz/golangsdk/openstack/bms/v1/baremetalservers/urls.go @@ -7,7 +7,6 @@ const resourcePath = "baremetalservers" func createURL(sc *golangsdk.ServiceClient) string { return sc.ServiceURL(resourcePath) - return sc.ServiceURL(resourcePath) } func getURL(sc *golangsdk.ServiceClient, serverID string) string { diff --git a/vendor/github.com/chnsz/golangsdk/openstack/cce/v3/nodes/results.go b/vendor/github.com/chnsz/golangsdk/openstack/cce/v3/nodes/results.go index 764402f2d0..9868a50a2b 100644 --- a/vendor/github.com/chnsz/golangsdk/openstack/cce/v3/nodes/results.go +++ b/vendor/github.com/chnsz/golangsdk/openstack/cce/v3/nodes/results.go @@ -114,7 +114,7 @@ type ExtNic struct { // TaintSpec to created nodes to configure anti-affinity type TaintSpec struct { Key string `json:"key" required:"true"` - Value string `json:"value" required:"true"` + Value string `json:"value,omitempty"` // Available options are NoSchedule, PreferNoSchedule, and NoExecute Effect string `json:"effect" required:"true"` } diff --git a/vendor/github.com/chnsz/golangsdk/openstack/cdn/v1/domains/requests.go b/vendor/github.com/chnsz/golangsdk/openstack/cdn/v1/domains/requests.go index f9bfc64c7f..d985089db7 100644 --- a/vendor/github.com/chnsz/golangsdk/openstack/cdn/v1/domains/requests.go +++ b/vendor/github.com/chnsz/golangsdk/openstack/cdn/v1/domains/requests.go @@ -11,6 +11,10 @@ type ExtensionOpts struct { EnterpriseProjectId string `q:"enterprise_project_id"` } +type PrivateBucketAccessOpts struct { + Status *bool `json:"status,omitempty"` +} + // ToExtensionQuery formats a ExtensionOpts into a query string. func (opts ExtensionOpts) ToExtensionQuery() (string, error) { q, err := golangsdk.BuildQueryString(opts) @@ -44,12 +48,20 @@ type CreateOptsBuilder interface { ToCdnDomainCreateMap() (map[string]interface{}, error) } +type PrivateBucketAccessBuilder interface { + ToCdnUpdatePrivateBucketAccessMap() (map[string]interface{}, error) +} + // ToCdnDomainCreateMap assembles a request body based on the contents of a // CreateOpts. func (opts CreateOpts) ToCdnDomainCreateMap() (map[string]interface{}, error) { return golangsdk.BuildRequestBody(opts, "domain") } +func (opts PrivateBucketAccessOpts) ToCdnUpdatePrivateBucketAccessMap() (map[string]interface{}, error) { + return golangsdk.BuildRequestBody(opts, "") +} + // OriginOpts specifies the attributes used to modify the orogin server. type OriginOpts struct { // the domain name or the IP address of the origin server @@ -80,6 +92,16 @@ func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateRe return } +func UpdatePrivateBucketAccess(client *golangsdk.ServiceClient, domainId string, opts PrivateBucketAccessBuilder) (r PrivateBucketAccessResult) { + reqBody, err := opts.ToCdnUpdatePrivateBucketAccessMap() + if err != nil { + r.Err = err + return + } + _, r.Err = client.Put(updatePrivateBucketAccessURL(client, domainId), reqBody, &r.Body, nil) + return +} + // Get retrieves a particular CDN domain based on its unique ID. func Get(client *golangsdk.ServiceClient, id string, opts *ExtensionOpts) (r GetResult) { url := getURL(client, id) diff --git a/vendor/github.com/chnsz/golangsdk/openstack/cdn/v1/domains/results.go b/vendor/github.com/chnsz/golangsdk/openstack/cdn/v1/domains/results.go index c0cb30c6b5..352eff36f2 100644 --- a/vendor/github.com/chnsz/golangsdk/openstack/cdn/v1/domains/results.go +++ b/vendor/github.com/chnsz/golangsdk/openstack/cdn/v1/domains/results.go @@ -59,6 +59,16 @@ type CdnDomain struct { ModifyTime time.Time `json:"-"` } +type PrivateBucketAccessStatus struct { + Status bool `json:"status"` + ErrorResp ErrorResp `json:"error"` +} + +type ErrorResp struct { + ErrorCode string `json:"error_code"` + ErrorMsg string `json:"error_msg"` +} + type OriginSources struct { // the domain name or the IP address of the origin server Sources []DomainSources `json:"sources"` @@ -74,6 +84,16 @@ type GetResult struct { commonResult } +type PrivateBucketAccessResult struct { + commonResult +} + +func (r PrivateBucketAccessResult) Extract() (*PrivateBucketAccessStatus, error) { + var response PrivateBucketAccessStatus + err := r.ExtractInto(&response) + return &response, err +} + func (r GetResult) Extract() (*CdnDomain, error) { var domain CdnDomain err := r.ExtractInto(&domain) diff --git a/vendor/github.com/chnsz/golangsdk/openstack/cdn/v1/domains/urls.go b/vendor/github.com/chnsz/golangsdk/openstack/cdn/v1/domains/urls.go index db4df1c945..a9cc075466 100644 --- a/vendor/github.com/chnsz/golangsdk/openstack/cdn/v1/domains/urls.go +++ b/vendor/github.com/chnsz/golangsdk/openstack/cdn/v1/domains/urls.go @@ -10,6 +10,10 @@ func createURL(sc *golangsdk.ServiceClient) string { return sc.ServiceURL(rootPath) } +func updatePrivateBucketAccessURL(sc *golangsdk.ServiceClient, domainId string) string { + return sc.ServiceURL(rootPath, domainId, "private-bucket-access") +} + func deleteURL(sc *golangsdk.ServiceClient, domainId string) string { return sc.ServiceURL(rootPath, domainId) }