Documentation ¶
Overview ¶
quotasets unit tests
Index ¶
Constants ¶
const FirstTenantID = "555544443333222211110000ffffeeee"
const GetDetailsOutput = `` /* 1357-byte string literal not displayed */
GetDetailsOutput is a sample response to a Get call with the detailed option.
const GetOutput = `` /* 382-byte string literal not displayed */
GetOutput is a sample response to a Get call.
const PartialUpdateBody = `{"quota_set":{"cores":200, "force":true}}`
The expected partialupdate Body. Is also returned by PUT request
const UpdateOutput = `` /* 298-byte string literal not displayed */
The expected update Body. Is also returned by PUT request
Variables ¶
var FirstQuotaDetailsSet = quotasets.QuotaDetailSet{ ID: FirstTenantID, InjectedFileContentBytes: quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 10240}, InjectedFilePathBytes: quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 255}, InjectedFiles: quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 5}, KeyPairs: quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 10}, MetadataItems: quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 128}, RAM: quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 200000}, SecurityGroupRules: quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 20}, SecurityGroups: quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 10}, Cores: quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 200}, Instances: quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 25}, ServerGroups: quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 2}, ServerGroupMembers: quotasets.QuotaDetail{InUse: 0, Reserved: 0, Limit: 3}, }
FirstQuotaDetailsSet is the first result in ListOutput.
var FirstQuotaSet = quotasets.QuotaSet{
FixedIps: 0,
FloatingIps: 0,
InjectedFileContentBytes: 10240,
InjectedFilePathBytes: 255,
InjectedFiles: 5,
KeyPairs: 10,
MetadataItems: 128,
Ram: 200000,
SecurityGroupRules: 20,
SecurityGroups: 10,
Cores: 200,
Instances: 25,
ServerGroups: 2,
ServerGroupMembers: 3,
}
FirstQuotaSet is the first result in ListOutput.
var UpdatedQuotaSet = quotasets.UpdateOpts{ FixedIps: gophercloud.IntToPointer(0), FloatingIps: gophercloud.IntToPointer(0), InjectedFileContentBytes: gophercloud.IntToPointer(10240), InjectedFilePathBytes: gophercloud.IntToPointer(255), InjectedFiles: gophercloud.IntToPointer(5), KeyPairs: gophercloud.IntToPointer(10), MetadataItems: gophercloud.IntToPointer(128), Ram: gophercloud.IntToPointer(200000), SecurityGroupRules: gophercloud.IntToPointer(20), SecurityGroups: gophercloud.IntToPointer(10), Cores: gophercloud.IntToPointer(200), Instances: gophercloud.IntToPointer(25), ServerGroups: gophercloud.IntToPointer(2), ServerGroupMembers: gophercloud.IntToPointer(3), }
Result of Quota-update
Functions ¶
func HandleDeleteSuccessfully ¶
HandleDeleteSuccessfully configures the test server to respond to a Delete request for sample tenant
func HandleGetDetailSuccessfully ¶
HandleGetDetailSuccessfully configures the test server to respond to a Get Details request for sample tenant
func HandleGetSuccessfully ¶
HandleGetSuccessfully configures the test server to respond to a Get request for sample tenant
func HandlePartialPutSuccessfully ¶
HandlePartialPutSuccessfully configures the test server to respond to a Put request for sample tenant that only containes specific values
func HandlePutSuccessfully ¶
HandlePutSuccessfully configures the test server to respond to a Put request for sample tenant
Types ¶
This section is empty.