quotas

package
v1.0.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

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

func ListURL

func ListURL(c *gophercloud.ServiceClient) string

Types

type ListOpts

type ListOpts struct {

	// Specifies the resource type.
	Type string `q:"type"`
}

func (ListOpts) ToListQuery

func (opts ListOpts) ToListQuery() (string, error)

type ListOptsBuilder

type ListOptsBuilder interface {
	ToListQuery() (string, error)
}

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"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL