diff --git a/openstack/autoscaling/v1/tags/requests.go b/openstack/autoscaling/v1/tags/requests.go index d7af4e1bf..9409ddbd8 100644 --- a/openstack/autoscaling/v1/tags/requests.go +++ b/openstack/autoscaling/v1/tags/requests.go @@ -27,7 +27,7 @@ func doAction(client *golangsdk.ServiceClient, id string, opts ActionOptsBuilder return } _, r.Err = client.Post(actionURL(client, id), b, nil, &golangsdk.RequestOpts{ - OkCodes: []int{204}, + OkCodes: []int{200, 204}, }) return } @@ -41,6 +41,15 @@ func Create(client *golangsdk.ServiceClient, id string, tags []ResourceTag) (r A return doAction(client, id, opts) } +//Update is a method of updating group tags by id, used by hcs +func Update(client *golangsdk.ServiceClient, id string, tags []ResourceTag) (r ActionResult) { + opts := ActionOpts{ + Tags: tags, + Action: "update", + } + return doAction(client, id, opts) +} + //Delete is a method of deleting group tags by id func Delete(client *golangsdk.ServiceClient, id string, tags []ResourceTag) (r ActionResult) { opts := ActionOpts{