Skip to content

Commit

Permalink
Change ResourceQuotaOpts.Value type to *int (#23)
Browse files Browse the repository at this point in the history
Change Value type to the pointer so it not going to be set to 0 at every
update request.
  • Loading branch information
ozerovandrei committed Apr 7, 2018
1 parent 68bb3bd commit 534b8d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion selvpcclient/resell/v2/quotas/requests_opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type ResourceQuotaOpts struct {
Zone string `json:"zone,omitempty"`

// Value contans value of resource quota in the specific region and zone.
Value int `json:"value"`
Value *int `json:"value"`
}

// UpdateProjectQuotasOpts represents options for the UpdateProjectQuotas request.
Expand Down
4 changes: 3 additions & 1 deletion selvpcclient/resell/v2/quotas/testing/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ var TestGetProjectQuotasResponseSingle = []*quotas.Quota{
},
}

var ramQuotaValue = 64000

// TestUpdateQuotasOpts represents options for the UpdateProjectQuotas request.
var TestUpdateQuotasOpts = quotas.UpdateProjectQuotasOpts{
QuotasOpts: []quotas.QuotaOpts{
Expand All @@ -264,7 +266,7 @@ var TestUpdateQuotasOpts = quotas.UpdateProjectQuotasOpts{
{
Region: "ru-2",
Zone: "ru-2a",
Value: 64000,
Value: &ramQuotaValue,
},
},
},
Expand Down

0 comments on commit 534b8d2

Please sign in to comment.