Documentation ¶
Index ¶
- Constants
- Variables
- func AddRouterInterfaceEndpoint(routerID string) string
- type InterfaceInfo
- func (i *InterfaceInfo) CreateResponse() ([]byte, error)
- func (i *InterfaceInfo) FromCreateRequest(c []byte) (Resource, error)
- func (i InterfaceInfo) GetID() string
- func (i InterfaceInfo) GetName() string
- func (i InterfaceInfo) GetPath() string
- func (i InterfaceInfo) GetType() string
- func (i *InterfaceInfo) SubResources() []ResourceBuilder
- type Network
- type Port
- type Request
- type Resource
- type ResourceBuilder
- type Router
- type SecGroup
- func (s *SecGroup) CreateResponse() ([]byte, error)
- func (s *SecGroup) FromCreateRequest(c []byte) (Resource, error)
- func (s SecGroup) GetID() string
- func (s SecGroup) GetName() string
- func (s SecGroup) GetPath() string
- func (s SecGroup) GetType() string
- func (s *SecGroup) SubResources() []ResourceBuilder
- type SecGroupRule
- func (s *SecGroupRule) CreateResponse() ([]byte, error)
- func (s *SecGroupRule) FromCreateRequest(c []byte) (Resource, error)
- func (s SecGroupRule) GetID() string
- func (s SecGroupRule) GetName() string
- func (s SecGroupRule) GetPath() string
- func (s SecGroupRule) GetType() string
- func (s *SecGroupRule) SubResources() []ResourceBuilder
- type Simulator
- func (s *Simulator) Add(res ...Resource) *Simulator
- func (s *Simulator) GetClient() *gophercloud.ServiceClient
- func (s *Simulator) GetRequestCounters() map[Request]int
- func (s *Simulator) Handle(w http.ResponseWriter, r *http.Request)
- func (s *Simulator) Register(builder ResourceBuilder) *Simulator
- func (s *Simulator) TearDown()
- type Subnet
- type SubnetPool
- func (s *SubnetPool) CreateResponse() ([]byte, error)
- func (s *SubnetPool) FromCreateRequest(c []byte) (Resource, error)
- func (s SubnetPool) GetID() string
- func (s SubnetPool) GetName() string
- func (s SubnetPool) GetPath() string
- func (s SubnetPool) GetType() string
- func (s *SubnetPool) SubResources() []ResourceBuilder
Constants ¶
View Source
const ( NetworkID = "8bb661f5-76b9-45f1-9ef9-eeffcd025fe4" SubnetID = "bec43a98-2d0a-4b1d-9df0-0f21e8f89d8a" SubnetPoolID = "bed43a98-2d0a-4b1d-9df0-0f21e8f89d8a" RouterID = "b8a25073-b35f-4b64-b205-6d21c8221d98" PortID = "6f5c4730-aa3f-4677-bca2-3b1ead8545d9" InterfaceInfoID = "6f5c4730-aa3f-4677-bca2-3b1ead8545d9" SecGroupID = "babf744f-0098-4f61-8e15-f91c30b3ed05" SecGroupRuleID = "da8d0577-eeb8-4351-b543-4bb0687f81d3" )
IDs used when a new resource is created. Note that using always the same ID is not correct, but is sufficient to cover the current usage. For more advanced usages a pseudo-random UID generator should be used instead.
View Source
const ( SecurityGroupsEndpoint = "/security-groups" NetworksEndpoint = "/networks" SubnetsEndpoint = "/subnets" RoutersEndpoint = "/routers" SubnetPoolsEndpoint = "/subnetpools" )
Relative paths to resource endpoints.
Variables ¶
View Source
var ExternalNetwork = Network{ Network: networks.Network{Name: "external-network", ID: "d32019d3-bc6e-4319-9c1d-6722fc136a22"}, NetworkExternalExt: external.NetworkExternalExt{External: true}, }
View Source
var InternalNetwork = Network{ Network: networks.Network{Name: "kubernetes-cluster-xyz", ID: NetworkID}, }
Functions ¶
Types ¶
type InterfaceInfo ¶
type InterfaceInfo struct { routers.InterfaceInfo // contains filtered or unexported fields }
func (*InterfaceInfo) CreateResponse ¶
func (i *InterfaceInfo) CreateResponse() ([]byte, error)
func (*InterfaceInfo) FromCreateRequest ¶
func (i *InterfaceInfo) FromCreateRequest(c []byte) (Resource, error)
func (InterfaceInfo) GetID ¶
func (i InterfaceInfo) GetID() string
func (InterfaceInfo) GetName ¶
func (i InterfaceInfo) GetName() string
func (InterfaceInfo) GetPath ¶
func (i InterfaceInfo) GetPath() string
func (InterfaceInfo) GetType ¶
func (i InterfaceInfo) GetType() string
func (*InterfaceInfo) SubResources ¶
func (i *InterfaceInfo) SubResources() []ResourceBuilder
type Network ¶
type Network struct { external.NetworkExternalExt networks.Network }
func (*Network) CreateResponse ¶
func (*Network) SubResources ¶
func (n *Network) SubResources() []ResourceBuilder
type Port ¶
func (*Port) CreateResponse ¶
func (*Port) SubResources ¶
func (p *Port) SubResources() []ResourceBuilder
type ResourceBuilder ¶
type ResourceBuilder func() Resource
type Router ¶
func (*Router) CreateResponse ¶
func (*Router) SubResources ¶
func (r *Router) SubResources() []ResourceBuilder
type SecGroup ¶
func (*SecGroup) CreateResponse ¶
func (*SecGroup) FromCreateRequest ¶
func (*SecGroup) SubResources ¶
func (s *SecGroup) SubResources() []ResourceBuilder
type SecGroupRule ¶
type SecGroupRule rules.SecGroupRule
func (*SecGroupRule) CreateResponse ¶
func (s *SecGroupRule) CreateResponse() ([]byte, error)
func (*SecGroupRule) FromCreateRequest ¶
func (s *SecGroupRule) FromCreateRequest(c []byte) (Resource, error)
func (SecGroupRule) GetID ¶
func (s SecGroupRule) GetID() string
func (SecGroupRule) GetName ¶
func (s SecGroupRule) GetName() string
func (SecGroupRule) GetPath ¶
func (s SecGroupRule) GetPath() string
func (SecGroupRule) GetType ¶
func (s SecGroupRule) GetType() string
func (*SecGroupRule) SubResources ¶
func (s *SecGroupRule) SubResources() []ResourceBuilder
type Simulator ¶
Simulator provides an OpenStack API server to be used for testing purposes.
func NewSimulator ¶
func (*Simulator) GetClient ¶
func (s *Simulator) GetClient() *gophercloud.ServiceClient
func (*Simulator) GetRequestCounters ¶
func (*Simulator) Register ¶
func (s *Simulator) Register(builder ResourceBuilder) *Simulator
type Subnet ¶
func (*Subnet) CreateResponse ¶
func (*Subnet) SubResources ¶
func (s *Subnet) SubResources() []ResourceBuilder
type SubnetPool ¶
type SubnetPool subnetpools.SubnetPool
func (*SubnetPool) CreateResponse ¶
func (s *SubnetPool) CreateResponse() ([]byte, error)
func (*SubnetPool) FromCreateRequest ¶
func (s *SubnetPool) FromCreateRequest(c []byte) (Resource, error)
func (SubnetPool) GetID ¶
func (s SubnetPool) GetID() string
func (SubnetPool) GetName ¶
func (s SubnetPool) GetName() string
func (SubnetPool) GetPath ¶
func (s SubnetPool) GetPath() string
func (SubnetPool) GetType ¶
func (s SubnetPool) GetType() string
func (*SubnetPool) SubResources ¶
func (s *SubnetPool) SubResources() []ResourceBuilder
Click to show internal directories.
Click to hide internal directories.