Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion openstack/autoscaling/v1/tags/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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{
Expand Down