test

package
v0.6.2 Latest Latest
Warning

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

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

Documentation

Overview

Copyright 2016 The Rook Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockRookRestClient

type MockRookRestClient struct {
	MockGetNodes                     func() ([]model.Node, error)
	MockGetPools                     func() ([]model.Pool, error)
	MockCreatePool                   func(pool model.Pool) (string, error)
	MockDeletePool                   func(name string) error
	MockGetBlockImages               func() ([]model.BlockImage, error)
	MockCreateBlockImage             func(image model.BlockImage) (string, error)
	MockDeleteBlockImage             func(image model.BlockImage) (string, error)
	MockGetClientAccessInfo          func() (model.ClientAccessInfo, error)
	MockGetFilesystems               func() ([]model.Filesystem, error)
	MockCreateFilesystem             func(model.FilesystemRequest) (string, error)
	MockDeleteFilesystem             func(model.FilesystemRequest) (string, error)
	MockGetStatusDetails             func() (model.StatusDetails, error)
	MockGetObjectStores              func() ([]model.ObjectStoreResponse, error)
	MockCreateObjectStore            func(store model.ObjectStore) (string, error)
	MockDeleteObjectStore            func(string) error
	MockGetObjectStoreConnectionInfo func(storeName string) (*model.ObjectStoreConnectInfo, error)
	MockCreateObjectUser             func(storeName string, user model.ObjectUser) (*model.ObjectUser, error)
	MockListBuckets                  func(storeName string) ([]model.ObjectBucket, error)
	MockGetBucket                    func(storeName, bucketName string) (*model.ObjectBucket, error)
	MockDeleteBucket                 func(storeName, bucketName string, purge bool) error
	MockListObjectUsers              func(storeName string) ([]model.ObjectUser, error)
	MockGetObjectUser                func(storeName, id string) (*model.ObjectUser, error)
	MockUpdateObjectUser             func(storeName string, user model.ObjectUser) (*model.ObjectUser, error)
	MockDeleteObjectUser             func(storeName, id string) error
}

Mock Rook REST Client implementation

func (*MockRookRestClient) CreateBlockImage

func (m *MockRookRestClient) CreateBlockImage(image model.BlockImage) (string, error)

func (*MockRookRestClient) CreateFilesystem added in v0.1.1

func (m *MockRookRestClient) CreateFilesystem(fsr model.FilesystemRequest) (string, error)

func (*MockRookRestClient) CreateObjectStore added in v0.2.0

func (m *MockRookRestClient) CreateObjectStore(store model.ObjectStore) (string, error)

func (*MockRookRestClient) CreateObjectUser added in v0.3.0

func (m *MockRookRestClient) CreateObjectUser(storeName string, u model.ObjectUser) (*model.ObjectUser, error)

func (*MockRookRestClient) CreatePool

func (m *MockRookRestClient) CreatePool(pool model.Pool) (string, error)

func (*MockRookRestClient) DeleteBlockImage added in v0.3.1

func (m *MockRookRestClient) DeleteBlockImage(image model.BlockImage) (string, error)

func (*MockRookRestClient) DeleteBucket added in v0.5.0

func (m *MockRookRestClient) DeleteBucket(storeName, s string, b bool) error

func (*MockRookRestClient) DeleteFilesystem added in v0.1.1

func (m *MockRookRestClient) DeleteFilesystem(fsr model.FilesystemRequest) (string, error)

func (*MockRookRestClient) DeleteObjectStore added in v0.6.0

func (m *MockRookRestClient) DeleteObjectStore(storeName string) error

func (*MockRookRestClient) DeleteObjectUser added in v0.3.0

func (m *MockRookRestClient) DeleteObjectUser(storeName, id string) error

func (*MockRookRestClient) DeletePool added in v0.6.0

func (m *MockRookRestClient) DeletePool(name string) error

func (*MockRookRestClient) GetBlockImages

func (m *MockRookRestClient) GetBlockImages() ([]model.BlockImage, error)

func (*MockRookRestClient) GetBucket added in v0.5.0

func (m *MockRookRestClient) GetBucket(storeName, s string) (*model.ObjectBucket, error)

func (*MockRookRestClient) GetClientAccessInfo added in v0.1.1

func (m *MockRookRestClient) GetClientAccessInfo() (model.ClientAccessInfo, error)

func (*MockRookRestClient) GetFilesystems added in v0.1.1

func (m *MockRookRestClient) GetFilesystems() ([]model.Filesystem, error)

func (*MockRookRestClient) GetNodes

func (m *MockRookRestClient) GetNodes() ([]model.Node, error)

func (*MockRookRestClient) GetObjectStoreConnectionInfo added in v0.2.0

func (m *MockRookRestClient) GetObjectStoreConnectionInfo(storeName string) (*model.ObjectStoreConnectInfo, error)

func (*MockRookRestClient) GetObjectStores added in v0.6.0

func (m *MockRookRestClient) GetObjectStores() ([]model.ObjectStoreResponse, error)

func (*MockRookRestClient) GetObjectUser added in v0.3.0

func (m *MockRookRestClient) GetObjectUser(storeName, s string) (*model.ObjectUser, error)

func (*MockRookRestClient) GetPools

func (m *MockRookRestClient) GetPools() ([]model.Pool, error)

func (*MockRookRestClient) GetStatusDetails

func (m *MockRookRestClient) GetStatusDetails() (model.StatusDetails, error)

func (*MockRookRestClient) ListBuckets added in v0.3.0

func (m *MockRookRestClient) ListBuckets(storeName string) ([]model.ObjectBucket, error)

func (*MockRookRestClient) ListObjectUsers added in v0.3.0

func (m *MockRookRestClient) ListObjectUsers(storeName string) ([]model.ObjectUser, error)

func (*MockRookRestClient) URL

func (m *MockRookRestClient) URL() string

func (*MockRookRestClient) UpdateObjectUser added in v0.3.0

func (m *MockRookRestClient) UpdateObjectUser(storeName string, u model.ObjectUser) (*model.ObjectUser, error)

type RookMockRestClientFactory

type RookMockRestClientFactory struct{}

func (*RookMockRestClientFactory) CreateRookRestClient

func (*RookMockRestClientFactory) CreateRookRestClient(url string, httpClient *http.Client) client.RookRestClient

Jump to

Keyboard shortcuts

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