Added functionality for updating and resetting compute quotas. (#214)
* Added functionality for updating and resetting compute quotas.
Unit and acceptance tests added.
* Forgot to add my latest changes.
Modified acceptance test to better find the tenant-id
* Improved test coverage.
And fixed a bug while doing this.
* Moved FillFromQuotaSet to acceptance test package
Refractored ToComputeQuotaUpdateMap()
diff --git a/openstack/compute/v2/extensions/quotasets/results.go b/openstack/compute/v2/extensions/quotasets/results.go
index f6c4e5a..44e6b06 100644
--- a/openstack/compute/v2/extensions/quotasets/results.go
+++ b/openstack/compute/v2/extensions/quotasets/results.go
@@ -20,7 +20,7 @@
// InjectedFiles is injected files allowed for each project
InjectedFiles int `json:"injected_files"`
// KeyPairs is number of ssh keypairs
- KeyPairs int `json:"keypairs"`
+ KeyPairs int `json:"key_pairs"`
// MetadataItems is number of metadata items allowed for each instance
MetadataItems int `json:"metadata_items"`
// Ram is megabytes allowed for each instance
@@ -33,6 +33,10 @@
Cores int `json:"cores"`
// Instances is number of instances allowed for each project
Instances int `json:"instances"`
+ // Number of ServerGroups allowed for the project
+ ServerGroups int `json:"server_groups"`
+ // Max number of Members for each ServerGroup
+ ServerGroupMembers int `json:"server_group_members"`
}
// QuotaSetPage stores a single, only page of QuotaSet results from a List call.
@@ -73,3 +77,15 @@
type GetResult struct {
quotaResult
}
+
+// UpdateResult is the response from a Update operation. Call its Extract method to interpret it
+// as a QuotaSet.
+type UpdateResult struct {
+ quotaResult
+}
+
+// DeleteResult is the response from a Delete operation. Call its Extract method to interpret it
+// as a QuotaSet.
+type DeleteResult struct {
+ quotaResult
+}