Documentation ¶
Index ¶
- func DeleteURL(c *golangsdk.ServiceClient, vpcId string) string
- func ExtractVpcs(r pagination.Page) ([]common.VPC, error)
- func GetURL(c *golangsdk.ServiceClient, vpcId string) string
- func UpdateURL(c *golangsdk.ServiceClient, vpcId string) string
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type GetResult
- type ListOpts
- type ListResult
- type ListVPCOptsBuilder
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
- type UpdateStatusResult
- type VpcPage
- type Vpcs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractVpcs ¶
func ExtractVpcs(r pagination.Page) ([]common.VPC, error)
Types ¶
type CreateOpts ¶
type CreateOpts struct { //vpc name Name string `json:"name" required:"true"` //cidr,172.16.0.0/12~172.248.255.0/24 Cidr string `json:"cidr" required:"true"` //mode,SYSTEM or CUSTOMER,SYSTEM: system will design and create subnet when you need; // CUSTOMER: you should design and create by yourself Mode string `json:"mode" required:"true"` }
func (CreateOpts) ToVPCCreateMap ¶
func (opts CreateOpts) ToVPCCreateMap() (map[string]interface{}, error)
ToSecurityGroupsCreateMap converts CreateOpts structures to map[string]interface{}
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create create vpc
type DeleteResult ¶
func Delete ¶
func Delete(client *golangsdk.ServiceClient, vpcID string) (r DeleteResult)
Delete delete the vpc
type ListOpts ¶
type ListOpts struct { Limit int `q:"limit"` Offset int `q:"offset"` // ID is the unique identifier for the vpc. ID string `q:"id"` // Name is the human readable name for the vpc. It does not have to be unique. Name string `q:"name"` }
ListOpts allows the filtering collections through the API.
func (ListOpts) ToListVPCQuery ¶
ToListVPCQuery converts ListVPCOpts structures to query string
type ListResult ¶
type ListResult struct {
// contains filtered or unexported fields
}
func List ¶
func List(client *golangsdk.ServiceClient, opts ListVPCOptsBuilder) (r ListResult)
List returns collection of vpcs. It accepts a ListOpts struct, which allows you to filter the returned collection for greater efficiency.
func (ListResult) Extract ¶
func (r ListResult) Extract() (*Vpcs, error)
type ListVPCOptsBuilder ¶
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 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 UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
func Update ¶
func Update(client *golangsdk.ServiceClient, vpcID string, opts UpdateOptsBuilder) (r UpdateResult)
Update update vpc info,name especially
type UpdateStatusResult ¶
type UpdateStatusResult struct {
// contains filtered or unexported fields
}
type VpcPage ¶
type VpcPage struct {
pagination.LinkedPageBase
}
Click to show internal directories.
Click to hide internal directories.