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 ¶
func HandleCreate ¶
func HandleListSuccessfully ¶
func HandleUpdate ¶
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 // The ID of the host where the port is allocated HostID string // The virtual network interface card (vNIC) type that is bound to the // neutron port VNICType string // 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 }
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) 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) GetResult
Get retrieves a specific port based on its unique ID.
type IP ¶
type IP struct { SubnetID string `mapstructure:"subnet_id" json:"subnet_id"` IPAddress string `mapstructure:"ip_address" json:"ip_address,omitempty"` }
IP is a sub-struct that represents an individual IP.
type Port ¶
type Port struct { ports.Port `mapstructure:",squash"` // The ID of the host where the port is allocated HostID string `mapstructure:"binding:host_id" json:"binding:host_id"` // A dictionary that enables the application to pass information about // functions that the Networking API provides. VIFDetails map[string]interface{} `mapstructure:"binding:vif_details" json:"binding:vif_details"` // The VIF type for the port. VIFType string `mapstructure:"binding:vif_type" json:"binding:vif_type"` // The virtual network interface card (vNIC) type that is bound to the // neutron port VNICType string `mapstructure:"binding:vnic_type" 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 `mapstructure:"binding:profile" json:"binding:profile"` }
Port represents a Neutron port. See package documentation for a top-level description of what this is.
func ExtractPorts ¶
func ExtractPorts(page 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 // The ID of the host where the port is allocated HostID string // The virtual network interface card (vNIC) type that is bound to the // neutron port VNICType string // 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 }
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) UpdateResult
Update accepts a UpdateOpts struct and updates an existing port using the values provided.