openstack

package
v0.0.5-0...-6e23503 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrFloatingIPNotFound

type ErrFloatingIPNotFound struct {
	FixedIP     string
	NetworkName string
}

func (ErrFloatingIPNotFound) Error

func (e ErrFloatingIPNotFound) Error() string

type OpenStackClient

type OpenStackClient struct {
	ProviderClient *gophercloud.ProviderClient
	RegionName     string
}

func (*OpenStackClient) AttachFIP

func (client *OpenStackClient) AttachFIP(id string, portID string) error

func (*OpenStackClient) CreateFIP

func (client *OpenStackClient) CreateFIP(networkName string) (*floatingips.FloatingIP, error)

func (*OpenStackClient) DeleteFIP

func (client *OpenStackClient) DeleteFIP(id string) error

func (*OpenStackClient) DetachFIP

func (client *OpenStackClient) DetachFIP(id string) error

func (*OpenStackClient) FindFIP

func (client *OpenStackClient) FindFIP(networkName string, fixedIP string) (floatingips.FloatingIP, error)

func (*OpenStackClient) FindPortByServer

func (client *OpenStackClient) FindPortByServer(server servers.Server) (*ports.Port, error)

func (*OpenStackClient) GetFIP

func (client *OpenStackClient) GetFIP(id string) (*floatingips.FloatingIP, error)

func (*OpenStackClient) GetNetworkByName

func (client *OpenStackClient) GetNetworkByName(name string) (networks.Network, error)

func (*OpenStackClient) GetServer

func (client *OpenStackClient) GetServer(id string) (*servers.Server, error)

func (*OpenStackClient) GetTenant

func (client *OpenStackClient) GetTenant(id string) (tenants.Tenant, error)

func (*OpenStackClient) GetTenantByName

func (client *OpenStackClient) GetTenantByName(name string) (projects.Project, error)

type OpenStackClientInterface

type OpenStackClientInterface interface {
	GetTenant(id string) (tenants.Tenant, error)
	GetTenantByName(name string) (projects.Project, error)

	GetServer(id string) (*servers.Server, error)

	GetNetworkByName(name string) (networks.Network, error)

	FindFIP(networkName string, fixedIP string) (floatingips.FloatingIP, error)
	GetFIP(id string) (*floatingips.FloatingIP, error)
	CreateFIP(networkName string) (*floatingips.FloatingIP, error)
	DeleteFIP(id string) error
	AttachFIP(id string, portID string) error
	DetachFIP(id string) error

	FindPortByServer(server servers.Server) (*ports.Port, error)
}

func NewClient

func NewClient() (OpenStackClientInterface, error)

Jump to

Keyboard shortcuts

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