Skip to content

Commit

Permalink
Merge pull request #13 from SoftIron/update_sg
Browse files Browse the repository at this point in the history
fix: set template for update SG request
  • Loading branch information
masonkatz committed Jun 3, 2024
2 parents 8dfc09d + 6ccf094 commit e6f9421
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cloud/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,12 @@ type UpdateSecurityGroupRequest struct {
Merge bool `json:"merge"`
}

// SetTemplate sets r.Template from its structured representation. Either call
// this or set the template string directly.
func (r *UpdateSecurityGroupRequest) SetTemplate(t SecurityGroupTemplate) {
r.Template = mustParseTemplate(t).String()
}

// CommitSecurityGroupRequest is the request body for PATCH /cloud/security-group/{sg}/commit.
type CommitSecurityGroupRequest struct {
All bool `json:"all"`
Expand Down

0 comments on commit e6f9421

Please sign in to comment.