utils

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteCmd

func ExecuteCmd(Cmd string, cmdArgs []string) (stdout string, stderr string, exitCode int)

func ExecuteCmdAndLogToConsole

func ExecuteCmdAndLogToConsole(command string, cmdArgs []string, cmdEnv []string) (stdout string, stderr string, err error)

TODO add timeout parameter

func ExecuteCmdWithEnv

func ExecuteCmdWithEnv(Cmd string, cmdArgs []string, env []string) (stdout string, stderr string, exitCode int)

func ExecuteCommand

func ExecuteCommand(cmdStruct objects.CommandArgs) objects.CommandOut

Types

type K8sHelper

type K8sHelper struct {
}

func CreatK8sHelper

func CreatK8sHelper() *K8sHelper

func (*K8sHelper) CleanUpDymaincCreatedPVC

func (k8sh *K8sHelper) CleanUpDymaincCreatedPVC(blockList map[string]blockListData)

func (*K8sHelper) GetService

func (k8sh *K8sHelper) GetService(servicename string) (string, error)

func (*K8sHelper) IsPodRunning

func (k8sh *K8sHelper) IsPodRunning(name string) bool

func (*K8sHelper) IsPodRunningInNamespace

func (k8sh *K8sHelper) IsPodRunningInNamespace(name string) bool

func (*K8sHelper) IsPodTerminated

func (k8sh *K8sHelper) IsPodTerminated(name string) bool

TODO: Combine these like functions

func (*K8sHelper) IsPodTerminatedInNamespace

func (k8sh *K8sHelper) IsPodTerminatedInNamespace(name string) bool

TODO: Combine these like functions

func (*K8sHelper) IsServiceUp

func (k8sh *K8sHelper) IsServiceUp(name string) bool

func (*K8sHelper) IsServiceUpInNameSpace

func (k8sh *K8sHelper) IsServiceUpInNameSpace(name string) bool

func (*K8sHelper) IsThirdPartyResourcePresent

func (k8sh *K8sHelper) IsThirdPartyResourcePresent(tprname string) bool

func (*K8sHelper) ResourceOperation

func (k8sh *K8sHelper) ResourceOperation(action string, poddefPath string) (string, error)

func (*K8sHelper) ResourceOperationFromTemplate

func (k8sh *K8sHelper) ResourceOperationFromTemplate(action string, poddefPath string) (string, error)

type ObjectBucketListData

type ObjectBucketListData struct {
	Name            string
	Owner           string
	Created         string
	Size            int
	NumberOfObjects int
}

type ObjectConnectionData

type ObjectConnectionData struct {
	AwsHost      string
	AwsEndpoint  string
	AwsAccessKey string
	AwsSecretKey string
}

type ObjectUserData

type ObjectUserData struct {
	UserId      string
	DisplayName string
	Email       string
	AccessKey   string
	SecretKey   string
}

type ObjectUserListData

type ObjectUserListData struct {
	UserId      string
	DisplayName string
	Email       string
}

type RookHelper

type RookHelper struct {
}

func CreateRookHelper

func CreateRookHelper() *RookHelper

func (*RookHelper) GetRgwServiceNodePort

func (rh *RookHelper) GetRgwServiceNodePort(rawdata string) (string, error)

func (*RookHelper) ParseBlockListData

func (rh *RookHelper) ParseBlockListData(rawdata string) map[string]blockListData

func (*RookHelper) ParseFileSystemData

func (rh *RookHelper) ParseFileSystemData(rawdata string) fileSystemListData

func (*RookHelper) ParserObjectBucketListData

func (rh *RookHelper) ParserObjectBucketListData(rawdata string) map[string]ObjectBucketListData

func (*RookHelper) ParserObjectConnectionData

func (rh *RookHelper) ParserObjectConnectionData(rawdata string) ObjectConnectionData

func (*RookHelper) ParserObjectUserData

func (rh *RookHelper) ParserObjectUserData(rawdata string) ObjectUserData

func (*RookHelper) ParserObjectUserListData

func (rh *RookHelper) ParserObjectUserListData(rawdata string) map[string]ObjectUserListData

type S3Helper

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

func CreateNewS3Helper

func CreateNewS3Helper(endpoint string, keyId string, keySecret string) *S3Helper

func (*S3Helper) CreateBucket

func (h *S3Helper) CreateBucket(name string) (bool, error)

func (*S3Helper) DeleteBucket

func (h *S3Helper) DeleteBucket(name string) (bool, error)

func (*S3Helper) DeleteObjectInBucket

func (h *S3Helper) DeleteObjectInBucket(bucketname string, key string) (bool, error)

func (*S3Helper) GetObjectInBucket

func (h *S3Helper) GetObjectInBucket(bucketname string, key string) (string, error)

func (*S3Helper) PutObjectInBucket

func (h *S3Helper) PutObjectInBucket(bucketname string, body string, key string,
	contentType string) (bool, error)

Jump to

Keyboard shortcuts

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