openstack

package
v0.0.0-...-9649b88 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: Apache-2.0 Imports: 19 Imported by: 2

Documentation

Index

Constants

View Source
const MaxReqForAttach int = 5

Variables

View Source
var InitLock sync.Mutex

Functions

func AuthenticatedClientV2

func AuthenticatedClientV2(options gophercloud.AuthOptions) (*gophercloud.ProviderClient, error)

Types

type OpenStack

type OpenStack struct {
	VmLock    map[string]*sync.Mutex
	Channel   chan int
	AttachReq int
	// contains filtered or unexported fields
}

func NewOpenstack

func NewOpenstack() *OpenStack

func (*OpenStack) AttachNetToRouter

func (self *OpenStack) AttachNetToRouter(routerId, subNetId string) (string, error)

func (*OpenStack) AttachPortToVM

func (self *OpenStack) AttachPortToVM(vmId, portId string) (*Interface, error)

func (*OpenStack) Auth

func (self *OpenStack) Auth() error

func (*OpenStack) CreateBulkPorts

func (o *OpenStack) CreateBulkPorts(req *mgriaas.MgrBulkPortsReq) ([]*Interface, error)

func (*OpenStack) CreateNetwork

func (self *OpenStack) CreateNetwork(name string) (*Network, error)

func (*OpenStack) CreatePort

func (self *OpenStack) CreatePort(networkId, subnetId, portName, ip, mac, vnicType string) (*Interface, error)

func (*OpenStack) CreateProviderNetwork

func (self *OpenStack) CreateProviderNetwork(name, nwType, phyNet, sId string, vlanTransparent bool) (*Network, error)

func (*OpenStack) CreateRouter

func (self *OpenStack) CreateRouter(name, extNetId string) (string, error)

func (*OpenStack) CreateSubnet

func (self *OpenStack) CreateSubnet(id, cidr, gw string, allocationPools []subnets.AllocationPool) (*Subnet, error)

func (*OpenStack) DeleteNetwork

func (self *OpenStack) DeleteNetwork(id string) error

func (*OpenStack) DeletePort

func (self *OpenStack) DeletePort(portId string) error

func (*OpenStack) DeleteRouter

func (self *OpenStack) DeleteRouter(id string) error

func (*OpenStack) DeleteSubnet

func (self *OpenStack) DeleteSubnet(id string) error

func (*OpenStack) DetachNetFromRouter

func (self *OpenStack) DetachNetFromRouter(routerId, subNetId string) (string, error)

func (*OpenStack) DetachPortFromVM

func (self *OpenStack) DetachPortFromVM(vmId, portId string) error

func (*OpenStack) GetAttachReq

func (self *OpenStack) GetAttachReq() int

func (*OpenStack) GetNetwork

func (self *OpenStack) GetNetwork(id string) (*Network, error)

func (*OpenStack) GetNetworkExtenAttrs

func (self *OpenStack) GetNetworkExtenAttrs(id string) (*NetworkExtenAttrs, error)

func (*OpenStack) GetNetworkID

func (self *OpenStack) GetNetworkID(networkName string) (string, error)

func (*OpenStack) GetPort

func (self *OpenStack) GetPort(id string) (*Interface, error)

func (*OpenStack) GetRouter

func (self *OpenStack) GetRouter(id string) (*Router, error)

func (*OpenStack) GetSubnet

func (self *OpenStack) GetSubnet(id string) (*Subnet, error)

func (*OpenStack) GetSubnetID

func (self *OpenStack) GetSubnetID(networkId string) (string, error)

func (*OpenStack) GetTenantID

func (self *OpenStack) GetTenantID() string

func (*OpenStack) GetTenantName

func (self *OpenStack) GetTenantName() string

func (*OpenStack) GetTenantUUID

func (self *OpenStack) GetTenantUUID(cfgStr string) (string, error)

func (*OpenStack) GetType

func (self *OpenStack) GetType() string

func (*OpenStack) ListPorts

func (self *OpenStack) ListPorts(networkID string) ([]*Interface, error)

func (*OpenStack) Lock

func (self *OpenStack) Lock(vmId string)

func (*OpenStack) SetAttachReq

func (self *OpenStack) SetAttachReq(req int)

func (*OpenStack) SetConfig

func (self *OpenStack) SetConfig(conf gophercloud.AuthOptions)

func (*OpenStack) SetOpenstackConfig

func (self *OpenStack) SetOpenstackConfig(cfgStr string) error

func (*OpenStack) Unlock

func (self *OpenStack) Unlock(vmId string)

func (*OpenStack) UpdateRouter

func (self *OpenStack) UpdateRouter(routerID, name, extNetId string) error

func (*OpenStack) VmLockInit

func (self *OpenStack) VmLockInit(vmId string)

type OpenStackConf

type OpenStackConf struct {
	Username   string `json:"username"`
	Password   string `json:"password"`
	Url        string `json:"url"`
	Tenantid   string `json:"tenantid"`
	TenantName string `json:"tenantname"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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