Documentation ¶
Overview ¶
Package quotasets provides information and interaction with QuotaSet extension for the OpenStack Compute service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeleteResult ¶
type DeleteResult struct {
// contains filtered or unexported fields
}
DeleteResult is the response from a Delete operation. Call its Extract method to interpret it as a QuotaSet.
func Delete ¶
func Delete(client *gophercloud.ServiceClient, tenantID string) (res DeleteResult)
Resets the uotas for the given tenant to their default values
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult is the response from a Get operation. Call its Extract method to interpret it as a QuotaSet.
func Get ¶
func Get(client *gophercloud.ServiceClient, tenantID string) GetResult
Get returns public data about a previously created QuotaSet.
type QuotaSet ¶
type QuotaSet struct { //ID is tenant associated with this quota_set ID string `json:"id"` //FixedIps is number of fixed ips alloted this quota_set FixedIps int `json:"fixed_ips"` // FloatingIps is number of floating ips alloted this quota_set FloatingIps int `json:"floating_ips"` // InjectedFileContentBytes is content bytes allowed for each injected file InjectedFileContentBytes int `json:"injected_file_content_bytes"` // InjectedFilePathBytes is allowed bytes for each injected file path InjectedFilePathBytes int `json:"injected_file_path_bytes"` // InjectedFiles is injected files allowed for each project InjectedFiles int `json:"injected_files"` // KeyPairs is number of ssh 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 Ram int `json:"ram"` // SecurityGroupRules is rules allowed for each security group SecurityGroupRules int `json:"security_group_rules"` // SecurityGroups security groups allowed for each project SecurityGroups int `json:"security_groups"` // Cores is number of instance cores allowed for each project 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"` }
QuotaSet is a set of operational limits that allow for control of compute usage.
func ExtractQuotaSets ¶
func ExtractQuotaSets(r pagination.Page) ([]QuotaSet, error)
ExtractQuotaSets interprets a page of results as a slice of QuotaSets.
type QuotaSetPage ¶
type QuotaSetPage struct {
pagination.SinglePageBase
}
QuotaSetPage stores a single, only page of QuotaSet results from a List call.
func (QuotaSetPage) IsEmpty ¶
func (page QuotaSetPage) IsEmpty() (bool, error)
IsEmpty determines whether or not a QuotaSetsetPage is empty.
type UpdateOpts ¶
type UpdateOpts struct { //FixedIps is number of fixed ips alloted this quota_set FixedIps *int `json:"fixed_ips,omitempty"` // FloatingIps is number of floating ips alloted this quota_set FloatingIps *int `json:"floating_ips,omitempty"` // InjectedFileContentBytes is content bytes allowed for each injected file InjectedFileContentBytes *int `json:"injected_file_content_bytes,omitempty"` // InjectedFilePathBytes is allowed bytes for each injected file path InjectedFilePathBytes *int `json:"injected_file_path_bytes,omitempty"` // InjectedFiles is injected files allowed for each project InjectedFiles *int `json:"injected_files,omitempty"` // KeyPairs is number of ssh keypairs KeyPairs *int `json:"key_pairs,omitempty"` // MetadataItems is number of metadata items allowed for each instance MetadataItems *int `json:"metadata_items,omitempty"` // Ram is megabytes allowed for each instance Ram *int `json:"ram,omitempty"` // SecurityGroupRules is rules allowed for each security group SecurityGroupRules *int `json:"security_group_rules,omitempty"` // SecurityGroups security groups allowed for each project SecurityGroups *int `json:"security_groups,omitempty"` // Cores is number of instance cores allowed for each project Cores *int `json:"cores,omitempty"` // Instances is number of instances allowed for each project Instances *int `json:"instances,omitempty"` // Number of ServerGroups allowed for the project ServerGroups *int `json:"server_groups,omitempty"` // Max number of Members for each ServerGroup ServerGroupMembers *int `json:"server_group_members,omitempty"` //Users can force the update even if the quota has already been used and the reserved quota exceeds the new quota. Force bool `json:"force,omitempty"` }
Options for Updating the quotas of a Tenant All int-values are pointers so they can be nil if they are not needed you can use gopercloud.IntToPointer() for convenience
func (UpdateOpts) ToComputeQuotaUpdateMap ¶
func (opts UpdateOpts) ToComputeQuotaUpdateMap() (map[string]interface{}, error)
type UpdateOptsBuilder ¶
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
UpdateResult is the response from a Update operation. Call its Extract method to interpret it as a QuotaSet.
func Update ¶
func Update(client *gophercloud.ServiceClient, tenantID string, opts UpdateOptsBuilder) (res UpdateResult)
Updates the quotas for the given tenantID and returns the new quota-set