portsbinding

package
v0.0.0-...-9368c00 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

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

Create accepts a CreateOpts struct and creates a new port with extended attributes. You must remember to provide a NetworkID value.

func (CreateResult) Extract

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

Extract is a function that accepts a result and extracts a port resource.

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.

func (GetResult) Extract

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

Extract is a function that accepts a result and extracts a port resource.

type IP

type IP struct {
	SubnetID  string `json:"subnet_id"`
	IPAddress string `json:"ip_address"`
}

IP is a sub-struct that represents an individual IP.

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

Update accepts a UpdateOpts struct and updates an existing port using the values provided.

func (UpdateResult) Extract

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

Extract is a function that accepts a result and extracts a port resource.

Directories

Path Synopsis
networking_extensions_portsbinding_v2
networking_extensions_portsbinding_v2

Jump to

Keyboard shortcuts

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