Documentation ¶
Index ¶
- type BlockOperation
- func (rb *BlockOperation) BlockCreate(name string, size int) (string, error)
- func (rb *BlockOperation) BlockDelete(name string) (string, error)
- func (rb *BlockOperation) BlockList() ([]model.BlockImage, error)
- func (rb *BlockOperation) BlockMap(name string, mountpath string) (string, error)
- func (rb *BlockOperation) BlockRead(name string, mountpath string, filename string, namespace string) (string, error)
- func (rb *BlockOperation) BlockUnmap(name string, mountpath string) (string, error)
- func (rb *BlockOperation) BlockWrite(name string, mountpath string, data string, filename string, namespace string) (string, error)
- type FileSystemOperation
- func (rfs *FileSystemOperation) FSCreate(name string) (string, error)
- func (rfs *FileSystemOperation) FSDelete(name string) (string, error)
- func (rfs *FileSystemOperation) FSList() ([]model.Filesystem, error)
- func (rfs *FileSystemOperation) FSMount(name string, path string) (string, error)
- func (rfs *FileSystemOperation) FSRead(name string, mountpath string, filename string, namespace string) (string, error)
- func (rfs *FileSystemOperation) FSUnmount(name string) (string, error)
- func (rfs *FileSystemOperation) FSWrite(name string, mountpath string, data string, filename string, namespace string) (string, error)
- type ObjectOperation
- func (ro *ObjectOperation) ObjectBucketList() ([]model.ObjectBucket, error)
- func (ro *ObjectOperation) ObjectConnection() (*model.ObjectStoreConnectInfo, error)
- func (ro *ObjectOperation) ObjectCreate() (string, error)
- func (ro *ObjectOperation) ObjectCreateUser(userid string, displayname string) (*model.ObjectUser, error)
- func (ro *ObjectOperation) ObjectDeleteUser(userid string) error
- func (ro *ObjectOperation) ObjectGetUser(userid string) (*model.ObjectUser, error)
- func (ro *ObjectOperation) ObjectListUser() ([]model.ObjectUser, error)
- func (ro *ObjectOperation) ObjectUpdateUser(userid string, displayname string, emailid string) (*model.ObjectUser, error)
- type PoolClient
- type RestAPIClient
- func (a *RestAPIClient) CreateBlockImage(image model.BlockImage) (string, error)
- func (a *RestAPIClient) CreateFilesystem(fsmodel model.FilesystemRequest) (string, error)
- func (a *RestAPIClient) CreateObjectStore() (string, error)
- func (a *RestAPIClient) CreateObjectUser(user model.ObjectUser) (*model.ObjectUser, error)
- func (a *RestAPIClient) CreatePool(pool model.Pool) (string, error)
- func (a *RestAPIClient) DeleteBlockImage(image model.BlockImage) (string, error)
- func (a *RestAPIClient) DeleteFilesystem(fsmodel model.FilesystemRequest) (string, error)
- func (a *RestAPIClient) DeleteObjectUser(id string) error
- func (a *RestAPIClient) GetBlockImages() ([]model.BlockImage, error)
- func (a *RestAPIClient) GetClientAccessInfo() (model.ClientAccessInfo, error)
- func (a *RestAPIClient) GetFilesystems() ([]model.Filesystem, error)
- func (a *RestAPIClient) GetNodes() ([]model.Node, error)
- func (a *RestAPIClient) GetObjectStoreConnectionInfo() (*model.ObjectStoreConnectInfo, error)
- func (a *RestAPIClient) GetObjectUser(id string) (*model.ObjectUser, error)
- func (a *RestAPIClient) GetPools() ([]model.Pool, error)
- func (a *RestAPIClient) GetStatusDetails() (model.StatusDetails, error)
- func (a *RestAPIClient) ListBuckets() ([]model.ObjectBucket, error)
- func (a *RestAPIClient) ListObjectUsers() ([]model.ObjectUser, error)
- func (a *RestAPIClient) URL() string
- func (a *RestAPIClient) UpdateObjectUser(user model.ObjectUser) (*model.ObjectUser, error)
- type TestClient
- func (c TestClient) GetBlockClient() contracts.BlockOperator
- func (c TestClient) GetFileSystemClient() contracts.FileSystemOperator
- func (c TestClient) GetObjectClient() contracts.ObjectOperator
- func (c TestClient) GetPoolClient() contracts.PoolOperator
- func (c TestClient) GetRestAPIClient() contracts.RestAPIOperator
- func (c TestClient) Node() ([]model.Node, error)
- func (c TestClient) Status() (model.StatusDetails, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockOperation ¶
type BlockOperation struct {
// contains filtered or unexported fields
}
BlockOperation is wrapper for k8s rook block operations
func CreateK8BlockOperation ¶
func CreateK8BlockOperation(k8shelp *utils.K8sHelper, rookRestClient contracts.RestAPIOperator) *BlockOperation
CreateK8BlockOperation - Constructor to create BlockOperation - client to perform rook Block operations on k8s
func (*BlockOperation) BlockCreate ¶
func (rb *BlockOperation) BlockCreate(name string, size int) (string, error)
BlockCreate Function to create a Block using Rook Input parameters - name - pod definition that creates a pvc in k8s - yaml should describe name and size of pvc being created size - not user for k8s implementation since its descried on the pvc yaml definition Output - k8s create pvc operation output and/or error
func (*BlockOperation) BlockDelete ¶
func (rb *BlockOperation) BlockDelete(name string) (string, error)
BlockDelete Function to delete a Block using Rook Input parameters - name - pod definition where pvc is described - delete is run on the the yaml definition Output - k8s delete pvc operation output and/or error
func (*BlockOperation) BlockList ¶
func (rb *BlockOperation) BlockList() ([]model.BlockImage, error)
BlockList Function to list all the blocks created/being managed by rook
func (*BlockOperation) BlockMap ¶
func (rb *BlockOperation) BlockMap(name string, mountpath string) (string, error)
BlockMap Function to map a Block using Rook Input parameters - name - Pod definition - pod should be defined to use a pvc that was created earlier mountpath - not used in this impl since mountpath is defined in the pod definition Output - k8s create pod operation output and/or error
func (*BlockOperation) BlockRead ¶
func (rb *BlockOperation) BlockRead(name string, mountpath string, filename string, namespace string) (string, error)
BlockRead Function to read from block created by rook ,i.e. Read data from a pod that is using a pvc Input parameters - name - path to a yaml file that creates a pod - pod should be defined to use a pvc that was created earlier mountpath - folder on the pod were data is supposed to be written(should match the mountpath described in the pod definition) filename - file to be read namespace - optional param - namespace of the pod Output - k8s exec pod operation output and/or error
func (*BlockOperation) BlockUnmap ¶
func (rb *BlockOperation) BlockUnmap(name string, mountpath string) (string, error)
BlockUnmap Function to map a Block using Rook Input parameters - name - ppod definition - the pod described in yam file is deleted mountpath - not used in this impl since mountpath is defined in the pod definition Output - k8s delete pod operation output and/or error
func (*BlockOperation) BlockWrite ¶
func (rb *BlockOperation) BlockWrite(name string, mountpath string, data string, filename string, namespace string) (string, error)
BlockWrite Function to write data to block created by rook ,i.e. write data to a pod that is using a pvc Input parameters - name - path to a yaml file that creates a pod - pod should be defined to use a pvc that was created earlier mountpath - folder on the pod were data is supposed to be written(should match the mountpath described in the pod definition) data - data to be written filename - file where data is written to namespace - optional param - namespace of the pod Output - k8s exec pod operation output and/or error
type FileSystemOperation ¶
type FileSystemOperation struct {
// contains filtered or unexported fields
}
FileSystemOperation is a wrapper for k8s rook file operations
func CreateK8sFileSystemOperation ¶
func CreateK8sFileSystemOperation(k8shelp *utils.K8sHelper, rookRestClient contracts.RestAPIOperator) *FileSystemOperation
CreateK8sFileSystemOperation Constructor to create FileSystemOperation - client to perform rook file system operations on k8s
func (*FileSystemOperation) FSCreate ¶
func (rfs *FileSystemOperation) FSCreate(name string) (string, error)
FSCreate Function to create a fileSystem in rook Input parameters - name - name of the shared file system to be created Output - output returned by rook rest API client
func (*FileSystemOperation) FSDelete ¶
func (rfs *FileSystemOperation) FSDelete(name string) (string, error)
FSDelete Function to delete a fileSystem in rook Input parameters - name - name of the shared file system to be deleted Output - output returned by rook rest API client
func (*FileSystemOperation) FSList ¶
func (rfs *FileSystemOperation) FSList() ([]model.Filesystem, error)
FSList Function to list a fileSystem in rook Output - output returned by rook rest API client
func (*FileSystemOperation) FSMount ¶
func (rfs *FileSystemOperation) FSMount(name string, path string) (string, error)
FSMount Function to Mount a file system created by rook(on a pod) Input parameters - name - path to the yaml definition file - definition of pod to be created that mounts existing file system path - ignored in this case - moount path is defined in the path definition output - output returned by k8s create pod operaton and/or error
func (*FileSystemOperation) FSRead ¶
func (rfs *FileSystemOperation) FSRead(name string, mountpath string, filename string, namespace string) (string, error)
FSRead Function to write read from file system created by rook ,i.e. Read data from a pod that filesystem mounted Input parameters - name - path to a yaml file that creates a pod - pod should be defined to use a pvc that was created earlier mountpath - folder on the pod were data is supposed to be written(should match the mountpath described in the pod definition) filename - file to be read namespace - optional param - namespace of the pod Output - k8s exec pod operation output and/or error
func (*FileSystemOperation) FSUnmount ¶
func (rfs *FileSystemOperation) FSUnmount(name string) (string, error)
FSUnmount Function to UnMount a file system created by rook(delete pod) Input parameters - name - path to the yaml definition file - definition of pod to be deleted that has a file system mounted path - ignored in this case - moount path is defined in the path definition output - output returned by k8s delete pod operaton and/or error
func (*FileSystemOperation) FSWrite ¶
func (rfs *FileSystemOperation) FSWrite(name string, mountpath string, data string, filename string, namespace string) (string, error)
FSWrite Function to write data to file system created by rook ,i.e. write data to a pod that has filesystem mounted Input parameters - name - path to a yaml file that creates a pod - pod should be defined to use a pvc that was created earlier mountpath - folder on the pod were data is supposed to be written(should match the mountpath described in the pod definition) data - data to be written filename - file where data is written to namespace - optional param - namespace of the pod Output - k8s exec pod operation output and/or error
type ObjectOperation ¶
type ObjectOperation struct {
// contains filtered or unexported fields
}
ObjectOperation is wrapper for k8s rook object operations
func CreateObjectOperation ¶
func CreateObjectOperation(rookRestClient contracts.RestAPIOperator) *ObjectOperation
CreateObjectOperation creates new rook object client
func (*ObjectOperation) ObjectBucketList ¶
func (ro *ObjectOperation) ObjectBucketList() ([]model.ObjectBucket, error)
ObjectBucketList Function to get Buckets present in rook object store Input paramatres - None Output - output returned by rook Rest API client
func (*ObjectOperation) ObjectConnection ¶
func (ro *ObjectOperation) ObjectConnection() (*model.ObjectStoreConnectInfo, error)
ObjectConnection Function to get connection information for a user Input paramatres - None Output - output returned by rook Rest API client
func (*ObjectOperation) ObjectCreate ¶
func (ro *ObjectOperation) ObjectCreate() (string, error)
ObjectCreate Function to create a object store in rook Input paramatres -None Output - output returned by rook Rest API client
func (*ObjectOperation) ObjectCreateUser ¶
func (ro *ObjectOperation) ObjectCreateUser(userid string, displayname string) (*model.ObjectUser, error)
ObjectCreateUser Function to create user on rook object store Input paramatres - userId and display Name Output - output returned by rook Rest API client
func (*ObjectOperation) ObjectDeleteUser ¶
func (ro *ObjectOperation) ObjectDeleteUser(userid string) error
ObjectDeleteUser Function to delete user on rook object store Input paramatres - userId Output - output returned by rook Rest API client
func (*ObjectOperation) ObjectGetUser ¶
func (ro *ObjectOperation) ObjectGetUser(userid string) (*model.ObjectUser, error)
ObjectGetUser Function to get a user on rook object store Input paramatres - userId Output - output returned by rook Rest API client
func (*ObjectOperation) ObjectListUser ¶
func (ro *ObjectOperation) ObjectListUser() ([]model.ObjectUser, error)
ObjectListUser Function to get all users on rook object store Input paramatres - none Output - output returned by rook Rest API client
func (*ObjectOperation) ObjectUpdateUser ¶
func (ro *ObjectOperation) ObjectUpdateUser(userid string, displayname string, emailid string) (*model.ObjectUser, error)
ObjectUpdateUser Function to update a user on rook object store Input paramatres - userId,display Name and email address Output - output returned by rook Rest API client
type PoolClient ¶
type PoolClient struct {
// contains filtered or unexported fields
}
PoolClient is a wrapper for rook pool operations
func CreatePoolClient ¶
func CreatePoolClient(rookRestClient contracts.RestAPIOperator) *PoolClient
CreatePoolClient creates a new pool client
func (*PoolClient) PoolCreate ¶
func (rp *PoolClient) PoolCreate(pool model.Pool) (string, error)
PoolCreate creates new pool
type RestAPIClient ¶
type RestAPIClient struct {
// contains filtered or unexported fields
}
RestAPIClient is wrapper for rook rest api client
func CreateRestAPIClient ¶
func CreateRestAPIClient(platform enums.RookPlatformType, k8sHelper *utils.K8sHelper) *RestAPIClient
CreateRestAPIClient Create Rook REST API client
func (*RestAPIClient) CreateBlockImage ¶
func (a *RestAPIClient) CreateBlockImage(image model.BlockImage) (string, error)
CreateBlockImage creates a new block image in rook
func (*RestAPIClient) CreateFilesystem ¶
func (a *RestAPIClient) CreateFilesystem(fsmodel model.FilesystemRequest) (string, error)
CreateFilesystem creates file system on rook
func (*RestAPIClient) CreateObjectStore ¶
func (a *RestAPIClient) CreateObjectStore() (string, error)
CreateObjectStore creates object store
func (*RestAPIClient) CreateObjectUser ¶
func (a *RestAPIClient) CreateObjectUser(user model.ObjectUser) (*model.ObjectUser, error)
CreateObjectUser creates new user in object store
func (*RestAPIClient) CreatePool ¶
func (a *RestAPIClient) CreatePool(pool model.Pool) (string, error)
CreatePool creates a new pool
func (*RestAPIClient) DeleteBlockImage ¶
func (a *RestAPIClient) DeleteBlockImage(image model.BlockImage) (string, error)
DeleteBlockImage deletes a block image from rook
func (*RestAPIClient) DeleteFilesystem ¶
func (a *RestAPIClient) DeleteFilesystem(fsmodel model.FilesystemRequest) (string, error)
DeleteFilesystem deletes file system from rook
func (*RestAPIClient) DeleteObjectUser ¶
func (a *RestAPIClient) DeleteObjectUser(id string) error
DeleteObjectUser deletes user from object store
func (*RestAPIClient) GetBlockImages ¶
func (a *RestAPIClient) GetBlockImages() ([]model.BlockImage, error)
GetBlockImages returns list of a block images
func (*RestAPIClient) GetClientAccessInfo ¶
func (a *RestAPIClient) GetClientAccessInfo() (model.ClientAccessInfo, error)
GetClientAccessInfo returns rook REST API client info
func (*RestAPIClient) GetFilesystems ¶
func (a *RestAPIClient) GetFilesystems() ([]model.Filesystem, error)
GetFilesystems returns rook filesystem
func (*RestAPIClient) GetNodes ¶
func (a *RestAPIClient) GetNodes() ([]model.Node, error)
GetNodes returns all rook nodes
func (*RestAPIClient) GetObjectStoreConnectionInfo ¶
func (a *RestAPIClient) GetObjectStoreConnectionInfo() (*model.ObjectStoreConnectInfo, error)
GetObjectStoreConnectionInfo returns object store connection info
func (*RestAPIClient) GetObjectUser ¶
func (a *RestAPIClient) GetObjectUser(id string) (*model.ObjectUser, error)
GetObjectUser returns a object user from object store
func (*RestAPIClient) GetPools ¶
func (a *RestAPIClient) GetPools() ([]model.Pool, error)
GetPools returns all pools in rook
func (*RestAPIClient) GetStatusDetails ¶
func (a *RestAPIClient) GetStatusDetails() (model.StatusDetails, error)
GetStatusDetails reruns rook status details
func (*RestAPIClient) ListBuckets ¶
func (a *RestAPIClient) ListBuckets() ([]model.ObjectBucket, error)
ListBuckets lists all buckets in object store
func (*RestAPIClient) ListObjectUsers ¶
func (a *RestAPIClient) ListObjectUsers() ([]model.ObjectUser, error)
ListObjectUsers returns all object store users
func (*RestAPIClient) UpdateObjectUser ¶
func (a *RestAPIClient) UpdateObjectUser(user model.ObjectUser) (*model.ObjectUser, error)
UpdateObjectUser updates user in object store
type TestClient ¶
type TestClient struct {
// contains filtered or unexported fields
}
TestClient is a wrapper for test client, containing interfaces for all rook operations
func CreateTestClient ¶
func CreateTestClient(platform enums.RookPlatformType, k8sHelper *utils.K8sHelper) (*TestClient, error)
CreateTestClient creates new instance of test client for a platform
func (TestClient) GetBlockClient ¶
func (c TestClient) GetBlockClient() contracts.BlockOperator
GetBlockClient returns Block client for platform in context
func (TestClient) GetFileSystemClient ¶
func (c TestClient) GetFileSystemClient() contracts.FileSystemOperator
GetFileSystemClient returns fileSystem client for platform in context
func (TestClient) GetObjectClient ¶
func (c TestClient) GetObjectClient() contracts.ObjectOperator
GetObjectClient returns Object client for platform in context
func (TestClient) GetPoolClient ¶
func (c TestClient) GetPoolClient() contracts.PoolOperator
GetPoolClient returns pool client for platform in context
func (TestClient) GetRestAPIClient ¶
func (c TestClient) GetRestAPIClient() contracts.RestAPIOperator
GetRestAPIClient returns RestAPI client for platform in context
func (TestClient) Node ¶
func (c TestClient) Node() ([]model.Node, error)
Node returns list of rook nodes
func (TestClient) Status ¶
func (c TestClient) Status() (model.StatusDetails, error)
Status returns rook status details