Documentation ¶
Index ¶
- func GenerateObservation(fileSystemID *string, descriptionResponse *sdk.DescribeFileSystemsResponse) v1alpha1.NASFileSystemObservation
- func GenerateObservation4MountTarget(res *sdk.CreateMountTargetResponse) v1alpha1.NASMountTargetObservation
- func IsMountTargetNotFoundError(err error) bool
- func IsMountTargetUpdateToDate(cr *v1alpha1.NASMountTarget, ...) bool
- func IsNotFoundError(err error) bool
- func IsUpdateToDate(cr *v1alpha1.NASFileSystem, fsResponse *sdk.DescribeFileSystemsResponse) bool
- type ClientInterface
- type SDKClient
- func (c *SDKClient) CreateFileSystem(fs v1alpha1.NASFileSystemParameter) (*sdk.CreateFileSystemResponse, error)
- func (c *SDKClient) CreateMountTarget(fs v1alpha1.NASMountTargetParameter) (*sdk.CreateMountTargetResponse, error)
- func (c *SDKClient) DeleteFileSystem(fileSystemID string) error
- func (c *SDKClient) DeleteMountTarget(fileSystemID, mountTargetDomain *string) error
- func (c *SDKClient) DescribeFileSystems(fileSystemID, fileSystemType, vpcID *string) (*sdk.DescribeFileSystemsResponse, error)
- func (c *SDKClient) DescribeMountTargets(fileSystemID, mountTargetDomain *string) (*sdk.DescribeMountTargetsResponse, error)
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 ¶
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 ¶
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 ¶
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 ¶
func (c *SDKClient) CreateFileSystem(fs v1alpha1.NASFileSystemParameter) (*sdk.CreateFileSystemResponse, error)
CreateFileSystem creates NASFileSystem
func (*SDKClient) CreateMountTarget ¶
func (c *SDKClient) CreateMountTarget(fs v1alpha1.NASMountTargetParameter) (*sdk.CreateMountTargetResponse, error)
CreateMountTarget creates NASMountTarget
func (*SDKClient) DeleteFileSystem ¶
DeleteFileSystem deletes NASFileSystem
func (*SDKClient) DeleteMountTarget ¶
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