Help us shape the future of Go! Take the 2026 Go Developer Survey

vpcs

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateURL

func CreateURL(c *gophercloud.ServiceClient) string

func DeleteURL

func DeleteURL(c *gophercloud.ServiceClient, vpcId string) string

func GetURL

func GetURL(c *gophercloud.ServiceClient, vpcId string) string

func ListURL

func ListURL(c *gophercloud.ServiceClient) string

func UpdateURL

func UpdateURL(c *gophercloud.ServiceClient, vpcId string) string

Types

type CreateOpts

type CreateOpts struct {
	// Specifies the name of the VPC. The name must be unique for a
	// tenant. The value is a string of no more than 64 characters and can contain digits,
	// letters, underscores (_), and hyphens (-).
	Name string `json:"name,omitempty"`

	// Specifies the VPC description. The value is a string of 0 to 255
	// characters and cannot contain "<" or ">".
	Description string `json:"description,omitempty"`

	// Specifies the range of available subnets in the VPC. The value
	// must be in CIDR format, for example, 192.168.0.0/16. The value ranges from 10.0.0.0/8
	// to 10.255.255.0/24, 172.16.0.0/12 to 172.31.255.0/24, or 192.168.0.0/16 to
	// 192.168.255.0/24.
	Cidr string `json:"cidr,omitempty"`

	// Specifies the enterprise project ID. This field can be used to
	// filter out the VPCs associated with a specified enterprise project.
	EnterpriseProjectId string `json:"enterprise_project_id,omitempty"`
}

func (CreateOpts) ToVPCCreateMap

func (opts CreateOpts) ToVPCCreateMap() (map[string]interface{}, error)

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToVPCCreateMap() (map[string]interface{}, error)
}

type CreateResult

type CreateResult struct {
	// contains filtered or unexported fields
}

func Create

func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)

func (CreateResult) Extract

func (r CreateResult) Extract() (*VPC, error)

type DeleteResult

type DeleteResult struct {
	gophercloud.ErrResult
}

func Delete

func Delete(client *gophercloud.ServiceClient, vpcId string) (r DeleteResult)

type GetResult

type GetResult struct {
	// contains filtered or unexported fields
}

func Get

func Get(client *gophercloud.ServiceClient, vpcId string) (r GetResult)

func (GetResult) Extract

func (r GetResult) Extract() (*VPC, error)

type ListOpts

type ListOpts struct {
	// Specifies the resource ID of pagination query. If the parameter
	// is left blank, only resources on the first page are queried.
	Marker string `q:"marker"`

	// Specifies the number of records returned on each page.
	Limit int `q:"limit"`

	//The value can contain a maximum of 36 characters.
	//It is string "0"&nbsp;or in UUID format with hyphens (-). Value&nbsp;
	//"0" indicates the default enterprise project.Specifies the enterprise project ID.
	//This field can be used to filter the security groups of an enterprise project.
	EnterpriseProjectID string `q:"enterprise_project_id"`
}

func (ListOpts) ToVPCListQuery

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

type ListOptsBuilder

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

type Route

type Route struct {
	// Specifies the destination network segment of a route.
	Destination string `json:"destination"`

	// Specifies the next hop of a route.
	Nexthop string `json:"nexthop"`
}

type UpdateOpts

type UpdateOpts struct {
	// Specifies the name of the VPC. The name must be unique for a
	// tenant. The value is a string of no more than 64 characters and can contain digits,
	// letters, underscores (_), and hyphens (-).
	Name string `json:"name,omitempty"`

	// Specifies the VPC description. The value is a string of 0 to 255
	// characters and cannot contain "<" or ">".
	Description string `json:"description,omitempty"`

	// Specifies the range of available subnets in the VPC. The value
	// must be in CIDR format, for example, 192.168.0.0/16. The value ranges from 10.0.0.0/8
	// to 10.255.255.0/24, 172.16.0.0/12 to 172.31.255.0/24, or 192.168.0.0/16 to
	// 192.168.255.0/24.
	Cidr string `json:"cidr,omitempty"`
}

func (UpdateOpts) ToVPCUpdateMap

func (opts UpdateOpts) ToVPCUpdateMap() (map[string]interface{}, error)

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	ToVPCUpdateMap() (map[string]interface{}, error)
}

type UpdateResult

type UpdateResult struct {
	// contains filtered or unexported fields
}

func Update

func Update(client *gophercloud.ServiceClient, vpcId string, opts UpdateOptsBuilder) (r UpdateResult)

func (UpdateResult) Extract

func (r UpdateResult) Extract() (*VPC, error)

type VPC

type VPC struct {
	// Specifies a resource ID in UUID format.
	ID string `json:"id"`

	// Specifies the name of the VPC. The name must be unique for a
	// tenant. The value is a string of no more than 64 characters and can contain digits,
	// letters, underscores (_), and hyphens (-).
	Name string `json:"name,omitempty"`

	// Specifies the VPC description. The value is a string of 0 to 255
	// characters and cannot contain "<" or ">".
	Description string `json:"description,omitempty"`

	// Specifies the range of available subnets in the VPC. The value
	// must be in CIDR format, for example, 192.168.0.0/16. The value ranges from 10.0.0.0/8
	// to 10.255.255.0/24, 172.16.0.0/12 to 172.31.255.0/24, or 192.168.0.0/16 to
	// 192.168.255.0/24.
	Cidr string `json:"cidr,omitempty"`

	// Specifies the status of the VPC. The value can be CREATING, OK,
	// DOWN, PENDING_UPDATE, PENDING_DELETE, or ERROR.
	Status string `json:"status"`

	// Specifies the route information.
	Routes []Route `json:"routes"`

	// Specifies the enterprise project ID. This field can be used to
	// filter out the VPCs associated with a specified enterprise project.
	EnterpriseProjectId string `json:"enterprise_project_id"`
}

func ExtractVpcs

func ExtractVpcs(r pagination.Page) ([]VPC, error)

type VpcPage

type VpcPage struct {
	pagination.LinkedPageBase
}

func (VpcPage) IsEmpty

func (r VpcPage) IsEmpty() (bool, error)

IsEmpty checks whether a NetworkPage struct is empty.

func (VpcPage) NextPageURL

func (r VpcPage) NextPageURL() (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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