Documentation ¶
Overview ¶
quotasets unit tests
Index ¶
Constants ¶
const FirstTenantID = "555544443333222211110000ffffeeee"
const GetDetailsOutput = `` /* 1358-byte string literal not displayed */
GetDetailsOutput is a sample response to a Get call with the detailed option.
const GetOutput = `` /* 383-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 = `` /* 299-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: 9216000}, 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: 9216000,
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(9216000),
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.