Documentation ¶
Index ¶
- func ExtractRoutingtablesInto(r pagination.Page, v interface{}) error
- func List(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type GetResult
- type ListOpts
- type ListOptsBuilder
- type Route
- type Routingtable
- type RoutingtableDetail
- type RoutingtablePage
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractRoutingtablesInto ¶
func ExtractRoutingtablesInto(r pagination.Page, v interface{}) error
func List ¶
func List(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
List returns a Pager which allows you to iterate over a collection of routingtables. It accepts a ListOpts struct, which allows you to filter and sort the returned collection for greater efficiency.
Types ¶
type CreateOpts ¶
type CreateOpts struct { Name string `json:"name"` VpcID string `json:"vpc_id"` Distributed bool `json:"distributed,omitempty"` }
CreateOpts represents options used to create a routingtable.
func (CreateOpts) ToRoutingtableCreateMap ¶
func (opts CreateOpts) ToRoutingtableCreateMap() (map[string]interface{}, error)
ToRoutingtableCreateMap builds a request body from CreateOpts.
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(c *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create accepts a CreateOpts struct and creates a new routingtable using the values provided. This operation does not actually require a request body, i.e. the CreateOpts struct argument can be empty.
The tenant ID that is contained in the URI is the tenant that creates the routingtable. An admin user, however, has the option of specifying another tenant ID in the CreateOpts struct.
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*Routingtable, error)
func (CreateResult) ExtractInto ¶
func (r CreateResult) ExtractInto(v interface{}) error
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
func Delete ¶
func Delete(c *gophercloud.ServiceClient, routingtableID string) (r DeleteResult)
Delete accepts a unique ID and deletes the routingtable associated with it.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
func Get ¶
func Get(c *gophercloud.ServiceClient, id string) (r GetResult)
Get retrieves a specific routingtable based on its unique ID.
func (GetResult) Extract ¶
func (r GetResult) Extract() (*Routingtable, error)
func (GetResult) ExtractInto ¶
func (r GetResult) ExtractInto(v interface{}) error
type ListOpts ¶
type ListOpts struct { TenantID string `q:"tenant_id"` ID string `q:"id"` Name string `q:"name"` DefaultTable *bool `q:"default_table"` GatewayID string `q:"gateway_id"` Distributed *bool `q:"distributed"` Detail *bool `q:"detail"` SortKey string `q:"sort_key"` SortDir string `q:"sort_dir"` Marker string `q:"marker"` Limit int `q:"limit"` }
ListOpts allows the filtering and sorting of paginated collections through the API. Filtering is achieved by passing in struct field values that map to the routingtable attributes you want to see returned. SortKey allows you to sort by a particular routingtable attribute. SortDir sets the direction, and is either `asc' or `desc'. Marker and Limit are used for pagination.
func (ListOpts) ToRoutingtableListQuery ¶
ToRoutingtableListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.
type Route ¶
type Route struct { TenantID string `json:"tenant_id,omitempty"` Mask int `json:"mask,omitempty"` Gateway string `json:"gateway,omitempty"` GatewayID string `json:"gateway_id,omitempty"` RoutingtableID string `json:"routingtable_id,omitempty"` CIDR string `json:"cidr,omitempty"` ID string `json:"id,omitempty"` }
type Routingtable ¶
type Routingtable struct { // Name Routing table name Name string `json:"name"` // TenantID Tenant ID to which routing table is included TenantID string `json:"tenant_id"` // ID Routing table ID ID string `json:"id"` // DefaultTable Whether routing table is default table DefaultTable bool `json:"default_table"` // Distributed Routing method of routing table to query Distributed bool `json:"distributed"` // GatewayID The ID of the internet gateway when the gateway is associated with routing table GatewayID string `json:"gateway_id"` // State Status of the routing table. Currently, only the available status exists State string `json:"state"` // CreateTime Routing table creation time CreateTime string `json:"create_time"` // UpdatedAt and CreatedAt contain ISO-8601 timestamps of when the state of the // network last changed, and when it was created. UpdatedAt time.Time `json:"-"` CreatedAt time.Time `json:"-"` }
func ExtractRoutingtables ¶
func ExtractRoutingtables(r pagination.Page) ([]Routingtable, error)
ExtractRoutingtables accepts a Page struct, specifically a RoutingtablePage struct, and extracts the elements into a slice of Routingtable structs. In other words, a generic collection is mapped into a relevant slice.
func (*Routingtable) UnmarshalJSON ¶
func (r *Routingtable) UnmarshalJSON(b []byte) error
type RoutingtableDetail ¶
type RoutingtableDetail struct { // Name Routing table name Name string `json:"name"` // TenantID Tenant ID to which routing table is included TenantID string `json:"tenant_id"` // Routingtable Routing table ID ID string `json:"id"` // DefaultTable Whether routing table is default table DefaultTable bool `json:"default_table"` // Distributed Routing method of routing table to query Distributed bool `json:"distributed"` // GatewayID The ID of the internet gateway when the gateway is associated with routing table GatewayID string `json:"gateway_id"` // State Status of the routing table. Currently, only the available status exists State string `json:"state"` // VPCs List of VPC information strings to which routing table belongs VPCs []string `json:"vpcs,omitempty"` // Subnets List of subnet information strings associated with routing table Subnets []string `json:"subnets,omitempty"` // Routes List of route information objects set to routing table Routes []Route `json:"routes,omitempty"` // CreateTime Routing table creation time CreateTime string `json:"create_time"` // UpdatedAt and CreatedAt contain ISO-8601 timestamps of when the state of the // network last changed, and when it was created. UpdatedAt time.Time `json:"-"` CreatedAt time.Time `json:"-"` }
type RoutingtablePage ¶
type RoutingtablePage struct {
pagination.LinkedPageBase
}
RoutingtablePage is the page returned by a pager when traversing over a collection of networks.
func (RoutingtablePage) IsEmpty ¶
func (r RoutingtablePage) IsEmpty() (bool, error)
IsEmpty checks whether a RoutingtablePage struct is empty.
func (RoutingtablePage) NextPageURL ¶
func (r RoutingtablePage) NextPageURL() (string, error)
NextPageURL is invoked when a paginated collection of networks has reached the end of a page and the pager seeks to traverse over a new one. In order to do this, it needs to construct the next page's URL.
type UpdateOpts ¶
type UpdateOpts struct { Name *string `json:"name,omitempty"` Distributed *bool `json:"distributed,omitempty"` }
UpdateOpts represents options used to update a routingtable.
func (UpdateOpts) ToRoutingtableUpdateMap ¶
func (opts UpdateOpts) ToRoutingtableUpdateMap() (map[string]interface{}, error)
ToRoutingtableUpdateMap builds a request body from UpdateOpts.
type UpdateOptsBuilder ¶
UpdateOptsBuilder allows extensions to add additional parameters to the Update request.
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
func Update ¶
func Update(c *gophercloud.ServiceClient, routingtableID string, opts UpdateOptsBuilder) (r UpdateResult)
Update accepts a UpdateOpts struct and updates an existing routingtable using the values provided. For more information, see the Create function.
func (UpdateResult) Extract ¶
func (r UpdateResult) Extract() (*Routingtable, error)
func (UpdateResult) ExtractInto ¶
func (r UpdateResult) ExtractInto(v interface{}) error