Documentation ¶
Overview ¶
This interface is used to query network resource quotas for the VPC service of a tenant. The network resources include VPCs, subnets, security groups, security group rules, elastic IP addresses, and VPNs.
Sample Code, This interface is used to query network resource quotas for the VPC service of a tenant. The network resources include VPCs, subnets, security groups, security group rules, elastic IP addresses, and VPNs.
result, err := quotas.List(client.ServiceClient(), tenantID, quotas.ListOpts{ Type: "vpc", }).Extract()
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ListOpts ¶
type ListOpts struct { // Specifies the resource type. Type string `q:"type"` }
func (ListOpts) ToListQuery ¶
type ListOptsBuilder ¶
type ListResult ¶
type ListResult struct {
// contains filtered or unexported fields
}
func List ¶
func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) (r ListResult)
func (ListResult) Extract ¶
func (r ListResult) Extract() (*Quota, error)
type Quota ¶
type Quota struct { // Specifies the resource list objects. Resources []Resource `json:"resources"` }
type Resource ¶
type Resource struct { // Specifies the resource type. The value can be vpc, subnet, // securityGroup, securityGroupRule, publicIp, vpn, physicalConnect, virtualInterface, // vpcPeer, loadbalancer, listener, firewall, or shareBandwidthIP. Type string `json:"type"` // Specifies the number of created network resources. The value // ranges from 0 to the value of quota. Used int `json:"used"` // Specifies the maximum quota values for the resources. The // quotas can be changed only in the FusionSphere OpenStack system. If it is left blank, // -1 is displayed and the resources cannot be created. The default quotas for different // resources are as follows: VPC: 2 Subnet: 100 Security group: 100 Security group // rule: 5000 Elastic IP address: 10 VPN: 5 Physical connection: 10 Virtual interface: // 50 Load balancer: 10 Listener: 10 VPC peering connection: 50 Firewall: 200 IP address // with shared bandwidth: 20 The value ranges from the default quota value to the // maximum quota value. Quota int `json:"quota"` // Specifies the minimum quota value allowed. Min int `json:"min"` }
Click to show internal directories.
Click to hide internal directories.