test

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIAttach

func APIAttach(id, vm string) *httptest.ResponseRecorder

func APICreatePort

func APICreatePort(cfg string) *httptest.ResponseRecorder

func APIDbrestore

func APIDbrestore(body []byte) *httptest.ResponseRecorder

func APIDeletePort

func APIDeletePort(id string) *httptest.ResponseRecorder

func APIDetach

func APIDetach(id, vm string) *httptest.ResponseRecorder

func APIGetDefaultPhysnet

func APIGetDefaultPhysnet() *httptest.ResponseRecorder

func APIGetNetAttrs

func APIGetNetAttrs(networkName string) *httptest.ResponseRecorder

func APIGetNetExt

func APIGetNetExt(networkNames []string, needProvider bool) *httptest.ResponseRecorder

func APIPostInitConfiguration

func APIPostInitConfiguration(cfg string) *httptest.ResponseRecorder

func APIRestore

func APIRestore(body []byte) *httptest.ResponseRecorder

func APIUptdateDefaultPhysnet

func APIUptdateDefaultPhysnet(body []byte) *httptest.ResponseRecorder

func AttachRouter

func AttachRouter(routerID, networkID string) *httptest.ResponseRecorder

func AttachRouter403

func AttachRouter403(routerID, networkID string) *httptest.ResponseRecorder

func ConfigOpenStack

func ConfigOpenStack(cfg string) *httptest.ResponseRecorder

func CreateIPGroup

func CreateIPGroup(cfg string) *httptest.ResponseRecorder

func CreateNetwork

func CreateNetwork(cfg string) *httptest.ResponseRecorder

func CreateNetworkAdmin

func CreateNetworkAdmin(cfg string) *httptest.ResponseRecorder

func CreatePort

func CreatePort(cfg string) *httptest.ResponseRecorder

func CreateRouter

func CreateRouter(cfg string) *httptest.ResponseRecorder

func DeleteIPGroup

func DeleteIPGroup(id string) *httptest.ResponseRecorder

func DeleteNetwork

func DeleteNetwork(id string) *httptest.ResponseRecorder

func DeletePort

func DeletePort(id string) *httptest.ResponseRecorder

func DeleteRouter

func DeleteRouter(id string) *httptest.ResponseRecorder

func DeleteTenant

func DeleteTenant() *httptest.ResponseRecorder

func DetachRouter

func DetachRouter(routerID, networkID string) *httptest.ResponseRecorder

func DetachRouter403

func DetachRouter403(routerID, networkID string) *httptest.ResponseRecorder

func GetAllIPGroup

func GetAllIPGroup() *httptest.ResponseRecorder

func GetAllNetwork

func GetAllNetwork() *httptest.ResponseRecorder

func GetAllNetworkByName

func GetAllNetworkByName(name string) *httptest.ResponseRecorder

func GetAllPod

func GetAllPod() *httptest.ResponseRecorder

func GetAllPodByNetID

func GetAllPodByNetID() *httptest.ResponseRecorder

func GetAllPort

func GetAllPort() *httptest.ResponseRecorder

func GetAllPublicNetwork

func GetAllPublicNetwork() *httptest.ResponseRecorder

func GetAllRouter

func GetAllRouter() *httptest.ResponseRecorder

func GetAllUserNetwork

func GetAllUserNetwork() *httptest.ResponseRecorder

func GetHealth

func GetHealth() *httptest.ResponseRecorder

func GetIPGroup

func GetIPGroup(id string) *httptest.ResponseRecorder

func GetNetwork

func GetNetwork(id string) *httptest.ResponseRecorder

func GetPod

func GetPod(name string) *httptest.ResponseRecorder

func GetPort

func GetPort(id string) *httptest.ResponseRecorder

func GetRouter

func GetRouter(id string) *httptest.ResponseRecorder

func GetTenant

func GetTenant(id string) *httptest.ResponseRecorder

func GetTenants

func GetTenants() *httptest.ResponseRecorder

func GetType

func GetType() *httptest.ResponseRecorder

func GetVni

func GetVni(networkID string) *httptest.ResponseRecorder

func MockPaasAdminCheck

func MockPaasAdminCheck(mockDB *MockDbAccessor)

func MockTenantCheck

func MockTenantCheck(mockDB *MockDbAccessor, tenantID string)

func UpdateIPGroup

func UpdateIPGroup(id, cfg string) *httptest.ResponseRecorder

func UpdateRouter

func UpdateRouter(id, cfg string) *httptest.ResponseRecorder

func UpdateTenant

func UpdateTenant(cfg string) *httptest.ResponseRecorder

Types

type MockDbAccessor

type MockDbAccessor struct {
	// contains filtered or unexported fields
}

Mock of DbAccessor interface

func NewMockDbAccessor

func NewMockDbAccessor(ctrl *gomock.Controller) *MockDbAccessor

func (*MockDbAccessor) DeleteDir

func (_m *MockDbAccessor) DeleteDir(_param0 string) error

func (*MockDbAccessor) DeleteLeaf

func (_m *MockDbAccessor) DeleteLeaf(_param0 string) error

func (*MockDbAccessor) EXPECT

func (_m *MockDbAccessor) EXPECT() *MockDbAccessorRecorder

func (*MockDbAccessor) Lock

func (_m *MockDbAccessor) Lock(_param0 string) bool

func (*MockDbAccessor) ReadDir

func (_m *MockDbAccessor) ReadDir(_param0 string) ([]*client.Node, error)

func (*MockDbAccessor) ReadLeaf

func (_m *MockDbAccessor) ReadLeaf(_param0 string) (string, error)

func (*MockDbAccessor) SaveLeaf

func (_m *MockDbAccessor) SaveLeaf(_param0 string, _param1 string) error

func (*MockDbAccessor) Unlock

func (_m *MockDbAccessor) Unlock(_param0 string) bool

func (*MockDbAccessor) WatcherDir

func (_m *MockDbAccessor) WatcherDir(_param0 string) (*client.Response, error)

type MockDbAccessorRecorder

type MockDbAccessorRecorder struct {
	// contains filtered or unexported fields
}

Recorder for MockDbAccessor (not exported)

func (*MockDbAccessorRecorder) DeleteDir

func (_mr *MockDbAccessorRecorder) DeleteDir(arg0 interface{}) *gomock.Call

func (*MockDbAccessorRecorder) DeleteLeaf

func (_mr *MockDbAccessorRecorder) DeleteLeaf(arg0 interface{}) *gomock.Call

func (*MockDbAccessorRecorder) Lock

func (_mr *MockDbAccessorRecorder) Lock(arg0 interface{}) *gomock.Call

func (*MockDbAccessorRecorder) ReadDir

func (_mr *MockDbAccessorRecorder) ReadDir(arg0 interface{}) *gomock.Call

func (*MockDbAccessorRecorder) ReadLeaf

func (_mr *MockDbAccessorRecorder) ReadLeaf(arg0 interface{}) *gomock.Call

func (*MockDbAccessorRecorder) SaveLeaf

func (_mr *MockDbAccessorRecorder) SaveLeaf(arg0, arg1 interface{}) *gomock.Call

func (*MockDbAccessorRecorder) Unlock

func (_mr *MockDbAccessorRecorder) Unlock(arg0 interface{}) *gomock.Call

func (*MockDbAccessorRecorder) WatcherDir

func (_mr *MockDbAccessorRecorder) WatcherDir(arg0 interface{}) *gomock.Call

type MockIaaS

type MockIaaS struct {
	// contains filtered or unexported fields
}

Mock of IaaS interface

func NewMockIaaS

func NewMockIaaS(ctrl *gomock.Controller) *MockIaaS

func (*MockIaaS) AttachNetToRouter

func (_m *MockIaaS) AttachNetToRouter(_param0 string, _param1 string) (string, error)

func (*MockIaaS) AttachPortToVM

func (_m *MockIaaS) AttachPortToVM(_param0 string, _param1 string) (*iaas_accessor.Interface, error)

func (*MockIaaS) Auth

func (_m *MockIaaS) Auth() error

func (*MockIaaS) CreateBulkPorts

func (_m *MockIaaS) CreateBulkPorts(_param0 *mgr_iaas.MgrBulkPortsReq) ([]*iaas_accessor.Interface, error)

func (*MockIaaS) CreateNetwork

func (_m *MockIaaS) CreateNetwork(_param0 string) (*iaas_accessor.Network, error)

func (*MockIaaS) CreatePort

func (_m *MockIaaS) CreatePort(_param0 string, _param1 string, _param2 string, _param3 string, _param4 string, _param5 string) (*iaas_accessor.Interface, error)

func (*MockIaaS) CreateProviderNetwork

func (_m *MockIaaS) CreateProviderNetwork(_param0 string, _param1 string, _param2 string, _param3 string, _param4 bool) (*iaas_accessor.Network, error)

func (*MockIaaS) CreateRouter

func (_m *MockIaaS) CreateRouter(_param0 string, _param1 string) (string, error)

func (*MockIaaS) CreateSubnet

func (_m *MockIaaS) CreateSubnet(_param0 string, _param1 string, _param2 string, _param3 []subnets.AllocationPool) (*iaas_accessor.Subnet, error)

func (*MockIaaS) DeleteNetwork

func (_m *MockIaaS) DeleteNetwork(_param0 string) error

func (*MockIaaS) DeletePort

func (_m *MockIaaS) DeletePort(_param0 string) error

func (*MockIaaS) DeleteRouter

func (_m *MockIaaS) DeleteRouter(_param0 string) error

func (*MockIaaS) DeleteSubnet

func (_m *MockIaaS) DeleteSubnet(_param0 string) error

func (*MockIaaS) DetachNetFromRouter

func (_m *MockIaaS) DetachNetFromRouter(_param0 string, _param1 string) (string, error)

func (*MockIaaS) DetachPortFromVM

func (_m *MockIaaS) DetachPortFromVM(_param0 string, _param1 string) error

func (*MockIaaS) EXPECT

func (_m *MockIaaS) EXPECT() *_MockIaaSRecorder

func (*MockIaaS) GetAttachReq

func (_m *MockIaaS) GetAttachReq() int

func (*MockIaaS) GetNetwork

func (_m *MockIaaS) GetNetwork(_param0 string) (*iaas_accessor.Network, error)

func (*MockIaaS) GetNetworkExtenAttrs

func (_m *MockIaaS) GetNetworkExtenAttrs(_param0 string) (*iaas_accessor.NetworkExtenAttrs, error)

func (*MockIaaS) GetNetworkID

func (_m *MockIaaS) GetNetworkID(_param0 string) (string, error)

func (*MockIaaS) GetPort

func (_m *MockIaaS) GetPort(_param0 string) (*iaas_accessor.Interface, error)

func (*MockIaaS) GetRouter

func (_m *MockIaaS) GetRouter(_param0 string) (*iaas_accessor.Router, error)

func (*MockIaaS) GetSubnet

func (_m *MockIaaS) GetSubnet(_param0 string) (*iaas_accessor.Subnet, error)

func (*MockIaaS) GetSubnetID

func (_m *MockIaaS) GetSubnetID(_param0 string) (string, error)

func (*MockIaaS) GetTenantUUID

func (_m *MockIaaS) GetTenantUUID(_param0 string) (string, error)

func (*MockIaaS) GetType

func (_m *MockIaaS) GetType() string

func (*MockIaaS) ListPorts

func (_m *MockIaaS) ListPorts(_param0 string) ([]*iaas_accessor.Interface, error)

func (*MockIaaS) SetAttachReq

func (_m *MockIaaS) SetAttachReq(_param0 int)

func (*MockIaaS) UpdateRouter

func (_m *MockIaaS) UpdateRouter(_param0 string, _param1 string, _param2 string) error

Directories

Path Synopsis
mock

Jump to

Keyboard shortcuts

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