nas

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateObservation

func GenerateObservation(fileSystemID *string, descriptionResponse *sdk.DescribeFileSystemsResponse) v1alpha1.NASFileSystemObservation

GenerateObservation generates NASFileSystemObservation from fileSystem information When vpcID and vSwitchID are set, descriptionResponse.Body.FileSystems.FileSystem becomes 0, so we need to set fileSystemID first, not from descriptionResponse

func GenerateObservation4MountTarget

func GenerateObservation4MountTarget(res *sdk.CreateMountTargetResponse) v1alpha1.NASMountTargetObservation

GenerateObservation4MountTarget generates observation information from fileSystem mount point

func IsMountTargetNotFoundError

func IsMountTargetNotFoundError(err error) bool

IsMountTargetNotFoundError helper function to test for SLS project not found error

func IsMountTargetUpdateToDate

func IsMountTargetUpdateToDate(cr *v1alpha1.NASMountTarget, mountTargetResponse *sdk.DescribeMountTargetsResponse) bool

IsMountTargetUpdateToDate checks whether cr is up to date

func IsNotFoundError

func IsNotFoundError(err error) bool

IsNotFoundError helper function to test for SLS project not found error

func IsUpdateToDate

func IsUpdateToDate(cr *v1alpha1.NASFileSystem, fsResponse *sdk.DescribeFileSystemsResponse) bool

IsUpdateToDate checks whether cr is up to date

Types

type ClientInterface

type ClientInterface interface {
	DescribeFileSystems(fileSystemID, fileSystemType, vpcID *string) (*sdk.DescribeFileSystemsResponse, error)
	CreateFileSystem(fs v1alpha1.NASFileSystemParameter) (*sdk.CreateFileSystemResponse, error)
	DeleteFileSystem(fileSystemID string) error

	DescribeMountTargets(fileSystemID, mountTargetDomain *string) (*sdk.DescribeMountTargetsResponse, error)
	CreateMountTarget(fs v1alpha1.NASMountTargetParameter) (*sdk.CreateMountTargetResponse, error)
	DeleteMountTarget(fileSystemID, mountTargetDomain *string) error
}

ClientInterface create a client inferface

type SDKClient

type SDKClient struct {
	Client *sdk.Client
}

SDKClient is the SDK client for NASFileSystem

func NewClient

func NewClient(ctx context.Context, endpoint string, accessKeyID string, accessKeySecret string, securityToken string) (*SDKClient, error)

NewClient will create NAS client

func (*SDKClient) CreateFileSystem

CreateFileSystem creates NASFileSystem

func (*SDKClient) CreateMountTarget

CreateMountTarget creates NASMountTarget

func (*SDKClient) DeleteFileSystem

func (c *SDKClient) DeleteFileSystem(fileSystemID string) error

DeleteFileSystem deletes NASFileSystem

func (*SDKClient) DeleteMountTarget

func (c *SDKClient) DeleteMountTarget(fileSystemID, mountTargetDomain *string) error

DeleteMountTarget deletes NASMountTarget

func (*SDKClient) DescribeFileSystems

func (c *SDKClient) DescribeFileSystems(fileSystemID, fileSystemType, vpcID *string) (*sdk.DescribeFileSystemsResponse, error)

DescribeFileSystems describes NAS FileSystem

func (*SDKClient) DescribeMountTargets

func (c *SDKClient) DescribeMountTargets(fileSystemID, mountTargetDomain *string) (*sdk.DescribeMountTargetsResponse, error)

DescribeMountTargets describes NAS MountTarget

Jump to

Keyboard shortcuts

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