Documentation ¶
Overview ¶
Package portsbinding provides information and interaction with the port binding extension for the OpenStack Networking service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateOpts ¶
type CreateOpts struct { // CreateOptsBuilder is the interface options structs have to satisfy in order // to be used in the main Create operation in this package. ports.CreateOptsBuilder `json:"-"` // The ID of the host where the port is allocated HostID string `json:"binding:host_id,omitempty"` // The virtual network interface card (vNIC) type that is bound to the // neutron port VNICType string `json:"binding:vnic_type,omitempty"` // A dictionary that enables the application running on the specified // host to pass and receive virtual network interface (VIF) port-specific // information to the plug-in Profile map[string]string `json:"binding:profile,omitempty"` }
CreateOpts represents the attributes used when creating a new port with extended attributes.
func (CreateOpts) ToPortCreateMap ¶
func (opts CreateOpts) ToPortCreateMap() (map[string]interface{}, error)
ToPortCreateMap casts a CreateOpts struct to a map.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult represents the result of a create operation.
func Create ¶
func Create(c *gophercloud.ServiceClient, opts ports.CreateOptsBuilder) (r CreateResult)
Create accepts a CreateOpts struct and creates a new port with extended attributes. You must remember to provide a NetworkID value.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult represents the result of a get operation.
func Get ¶
func Get(c *gophercloud.ServiceClient, id string) (r GetResult)
Get retrieves a specific port based on its unique ID.
type Port ¶
type Port struct { ports.Port // The ID of the host where the port is allocated HostID string `json:"binding:host_id"` // A dictionary that enables the application to pass information about // functions that the Networking API provides. VIFDetails map[string]interface{} `json:"binding:vif_details"` // The VIF type for the port. VIFType string `json:"binding:vif_type"` // The virtual network interface card (vNIC) type that is bound to the // neutron port VNICType string `json:"binding:vnic_type"` // A dictionary that enables the application running on the specified // host to pass and receive virtual network interface (VIF) port-specific // information to the plug-in Profile map[string]string `json:"binding:profile"` }
Port represents a Neutron port. See package documentation for a top-level description of what this is.
func ExtractPorts ¶
func ExtractPorts(r pagination.Page) ([]Port, error)
ExtractPorts accepts a Page struct, specifically a PortPage struct, and extracts the elements into a slice of Port structs. In other words, a generic collection is mapped into a relevant slice.
type UpdateOpts ¶
type UpdateOpts struct { // UpdateOptsBuilder is the interface options structs have to satisfy in order // to be used in the main Update operation in this package. ports.UpdateOptsBuilder `json:"-"` // The ID of the host where the port is allocated HostID string `json:"binding:host_id,omitempty"` // The virtual network interface card (vNIC) type that is bound to the // neutron port VNICType string `json:"binding:vnic_type,omitempty"` // A dictionary that enables the application running on the specified // host to pass and receive virtual network interface (VIF) port-specific // information to the plug-in Profile map[string]string `json:"binding:profile,omitempty"` }
UpdateOpts represents the attributes used when updating an existing port.
func (UpdateOpts) ToPortUpdateMap ¶
func (opts UpdateOpts) ToPortUpdateMap() (map[string]interface{}, error)
ToPortUpdateMap casts an UpdateOpts struct to a map.
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
UpdateResult represents the result of an update operation.
func Update ¶
func Update(c *gophercloud.ServiceClient, id string, opts ports.UpdateOptsBuilder) (r UpdateResult)
Update accepts a UpdateOpts struct and updates an existing port using the values provided.