Documentation
¶
Overview ¶
Package limits shows rate and limit information for a tenant/project.
Example to Retrieve Limits for a Tenant
getOpts := limits.GetOpts{
TenantID: "tenant-id",
}
limits, err := limits.Get(computeClient, getOpts).Extract()
if err != nil {
panic(err)
}
fmt.Printf("%+v\n", limits)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Absolute ¶
type Absolute struct {
// MaxTotalCores is the number of cores available to a tenant.
MaxTotalCores int `json:"maxTotalCores"`
// MaxImageMeta is the amount of image metadata available to a tenant.
MaxImageMeta int `json:"maxImageMeta"`
// MaxServerMeta is the amount of server metadata available to a tenant.
MaxServerMeta int `json:"maxServerMeta"`
// MaxPersonality is the amount of personality/files available to a tenant.
MaxPersonality int `json:"maxPersonality"`
// MaxPersonalitySize is the personality file size available to a tenant.
MaxPersonalitySize int `json:"maxPersonalitySize"`
// MaxTotalKeypairs is the total keypairs available to a tenant.
MaxTotalKeypairs int `json:"maxTotalKeypairs"`
// MaxSecurityGroups is the number of security groups available to a tenant.
MaxSecurityGroups int `json:"maxSecurityGroups"`
// MaxSecurityGroupRules is the number of security group rules available to
// a tenant.
MaxSecurityGroupRules int `json:"maxSecurityGroupRules"`
// MaxServerGroups is the number of server groups available to a tenant.
MaxServerGroups int `json:"maxServerGroups"`
// MaxServerGroupMembers is the number of server group members available
// to a tenant.
MaxServerGroupMembers int `json:"maxServerGroupMembers"`
// MaxTotalFloatingIps is the number of floating IPs available to a tenant.
MaxTotalFloatingIps int `json:"maxTotalFloatingIps"`
// MaxTotalInstances is the number of instances/servers available to a tenant.
MaxTotalInstances int `json:"maxTotalInstances"`
// MaxTotalRAMSize is the total amount of RAM available to a tenant measured
// in megabytes (MB).
MaxTotalRAMSize int `json:"maxTotalRAMSize"`
// TotalCoresUsed is the number of cores currently in use.
TotalCoresUsed int `json:"totalCoresUsed"`
// TotalInstancesUsed is the number of instances/servers in use.
TotalInstancesUsed int `json:"totalInstancesUsed"`
// TotalFloatingIpsUsed is the number of floating IPs in use.
TotalFloatingIpsUsed int `json:"totalFloatingIpsUsed"`
// TotalRAMUsed is the total RAM/memory in use measured in megabytes (MB).
TotalRAMUsed int `json:"totalRAMUsed"`
// TotalSecurityGroupsUsed is the total number of security groups in use.
TotalSecurityGroupsUsed int `json:"totalSecurityGroupsUsed"`
// TotalServerGroupsUsed is the total number of server groups in use.
TotalServerGroupsUsed int `json:"totalServerGroupsUsed"`
}
Usage is a struct that contains the current resource usage and limits of a tenant.
type GetOpts ¶
type GetOpts struct {
// The tenant ID to retrieve limits for.
TenantID string `q:"tenant_id"`
}
GetOpts enables retrieving limits by a specific tenant.
func (GetOpts) ToLimitsQuery ¶
ToLimitsQuery formats a GetOpts into a query string.
type GetOptsBuilder ¶
GetOptsBuilder allows extensions to add additional parameters to the Get request.
type GetResult ¶
type GetResult struct {
gophercloud.Result
}
GetResult is the response from a Get operation. Call its Extract method to interpret it as an Absolute.
func Get ¶
func Get(client *gophercloud.ServiceClient, opts GetOptsBuilder) (r GetResult)
Get returns the limits about the currently scoped tenant.
Click to show internal directories.
Click to hide internal directories.