Documentation ¶
Index ¶
- func ActivateSystemClientSystem(ctx context.Context, clientAPI *apexClient.APIClient, systemID string, ...) error
- func AsyncCheckActivation(ctx context.Context, stop chan bool, err chan error, ...)
- func ConnectAccount(clientAPI *client.APIClient, arn string) (*client.RedactedAwsAccountInstance, *http.Response, error)
- func ConvertTimeToString(pTime *time.Time) string
- func ConvertToStringSlice(typesSlice []types.String) []string
- func CopyMobilityGroups(request client.ApiMobilityGroupsCopyRequest, input client.StartCopyInput) (*client.Job, *http.Response, error)
- func CreateClone(request client.ApiClonesCreateRequest, input client.CloneCreateInput) (*client.Job, *http.Response, error)
- func CreateFilter(filter []string, key string) string
- func CreateMobilityGroup(ctx context.Context, clientAPI *client.APIClient, ...) (*client.Job, *http.Response, error)
- func CreateMobilityTarget(request client.ApiMobilityTargetsCreateRequest, input client.CreateTargetInput) (*client.Job, *http.Response, error)
- func CreateStorageSystem(client client.ApiStorageSystemsCreateRequest, ...) (*client.Job, *http.Response, error)
- func DisconnectAccount(clientAPI *client.APIClient, accountID string) (*client.Job, *http.Response, error)
- func GenerateAwsTrustPolicy(clientAPI *client.APIClient, accountID string) (*client.AwsTrustPolicy, *http.Response, error)
- func GetAccountInstance(clientAPI *client.APIClient, accountID string) (*client.AwsAccountsInstance, *http.Response, error)
- func GetAwsAccountCollection(clientAPI *client.APIClient, filter []basetypes.StringValue) (*client.AwsAccountsCollection200Response, *http.Response, error)
- func GetAwsPermssionCollection(clientAPI *client.APIClient, filter []basetypes.StringValue) (*client.AwsPermissionPoliciesCollection200Response, *http.Response, error)
- func GetCloneCollection(client *client.APIClient, filter string) (*client.ClonesCollection200Response, *http.Response, error)
- func GetCloneInstance(client *client.APIClient, id string) (*client.Clone, *http.Response, error)
- func GetClonesModel(clone client.Clone, systemID string) (model models.ClonesModel)
- func GetClonesModelDs(clone client.Clone) (model models.ClonesModelDs)
- func GetErrorMessageFromBody(ctx context.Context, body string) (string, error)
- func GetErrorString(err error, status *http.Response) string
- func GetHostCollection(client *client.APIClient, filter string) (*client.HostsCollection200Response, *http.Response, error)
- func GetJobStatus(ctx context.Context, jobsClient *jmsClient.APIClient, jobID string) (*jmsClient.JobsInstance, error)
- func GetMobilityGroup(client *client.APIClient, id string) (*client.MobilityGroup, *http.Response, error)
- func GetMobilityGroupCollection(client *client.APIClient, filter string) (*client.MobilityGroupsCollection200Response, *http.Response, error)
- func GetMobilityGroupModel(mobilityGroup client.MobilityGroup) (model models.MobilityGroupModel)
- func GetMobilityGroupModelDs(mobilityGroup client.MobilityGroup) (model models.MobilityGroupModelDs)
- func GetMobilityTarget(client *client.APIClient, id string) (*client.MobilityTarget, *http.Response, error)
- func GetMobilityTargetCollection(client *client.APIClient, filter string) (*client.MobilityTargetsCollection200Response, *http.Response, error)
- func GetMobilityTargetModel(mobilityTarget client.MobilityTarget) (model models.MobilityTargetModel)
- func GetMobilityTargetModelDs(mobilityTarget client.MobilityTarget) (model models.MobilityTargetModelDs)
- func GetNewToken(ctx context.Context) (string, error)
- func GetSourcePoolsCollection(client *client.APIClient, filter string) (*client.PoolsCollection200Response, *http.Response, error)
- func GetStorageCollection(client *client.APIClient, filter string) (*client.StorageSystemsCollection200Response, *http.Response, error)
- func GetStorageInstance(client *client.APIClient, id string) (*client.StorageSystemsInstance, *http.Response, error)
- func GetStorageProductsCollection(client *client.APIClient, filter string) (*client.StorageProductsCollection200Response, *http.Response, error)
- func GetStorageSystemBlock(storageSystem client.StorageSystemsInstance) (storageState models.StorageModel)
- func GetStorageSystemDs(storageSystem client.StorageSystemsInstance) (storageState models.StorageModelDs)
- func GetStorageSystemFile(storageSystem client.StorageSystemsInstance) (storageState models.StorageModelFile)
- func GetVolumesCollection(client *client.APIClient, filter string) (*client.VolumesCollection200Response, *http.Response, error)
- func MapAwsAccount(account client.RedactedAwsAccountInstance) models.AwsAccountModel
- func MapAwsPermission(permission client.AwsPermissionPoliciesInstance) models.AwsPermissionsModel
- func MapClones(ctx context.Context, mapReq client.ApiClonesMapRequest, cloneID string, ...) (*client.Job, *http.Response, error)
- func MapGeneratedStatements(statements []client.AwsTrustPolicyStatementInner) basetypes.ListValue
- func MapHostModel(hosts *client.HostsCollection200Response, state models.HostsDataSourceModel) models.HostsDataSourceModel
- func MapPoolsToState(pools []client.PoolsInstance) []models.PoolsModel
- func MapStorageProduct(storageProducts *client.StorageProductsCollection200Response) models.StorageProductsDataSourceModel
- func MapVolumesToState(volumes []client.VolumesInstance) []models.VolumesModel
- func RefreshClone(refreshReq client.ApiClonesRefreshRequest) (*client.Job, *http.Response, error)
- func SetCloudConfigSubnetAndVpcBlock(plan models.StorageModel, result models.StorageModel)
- func SetCloudConfigSubnetAndVpcFile(plan models.StorageModelFile, result models.StorageModelFile)
- func SetPowerflexAysncClientState(source models.ActivationAsyncClientModel) *models.ActivationAsyncClientModel
- func SetPowerflexClientState(source models.ActivationClientModel) *models.ActivationClientModel
- func UnmapClones(unmapReq client.ApiClonesUnmapRequest, hosts []basetypes.StringValue) (*client.Job, *http.Response, error)
- func UpdateAccount(clientAPI *client.APIClient, accountID string, roleArn string) (*client.Job, *http.Response, error)
- func UpdateClone(request client.ApiClonesModifyRequest, input client.UpdateCloneInput) (*client.Job, *http.Response, error)
- func UpdateDeploymentDetails(planDeploymentDetail *models.DeploymentDetailsModel, ...)
- func UpdateHostMappings(clone *client.Clone) basetypes.ListValue
- func UpdateMobilityGroup(ctx context.Context, clientAPI *client.APIClient, ...) (*client.Job, *http.Response, error)
- func UpdateMobilityTarget(request client.ApiMobilityTargetsModifyRequest, ...) (*client.Job, *http.Response, error)
- func UpdateToken(ctx context.Context, client *apexClient.APIClient, ...) error
- func ValidateCreateStorageParams(planDeploymentDetails *models.DeploymentDetailsModel) error
- func ValidateCreateStorageParamsBlock(plan models.StorageModel) error
- func ValidateCreateStorageParamsFile(plan models.StorageModelFile) error
- func WaitForJobToComplete(ctx context.Context, jobsClient *jmsClient.APIClient, jobID string) (string, error)
- type AccessTokenResponse
- type Config
- type Poller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActivateSystemClientSystem ¶
func ActivateSystemClientSystem(ctx context.Context, clientAPI *apexClient.APIClient, systemID string, activateSystemClientSystem models.ActivationClientModel, storageType apexClient.StorageProductEnum) error
ActivateSystemClientSystem checks to see if the current platform (ie.powerflex or powerscale) is activated, if not it will activate it.
func AsyncCheckActivation ¶
func AsyncCheckActivation(ctx context.Context, stop chan bool, err chan error, clientAPI *apexClient.APIClient, systemID string, activateSystemClientSystem models.ActivationAsyncClientModel, storageType apexClient.StorageProductEnum)
AsyncCheckActivation checks to see if the current platform (ie.powerflex or powerscale) is activated, if not it will activate it in a go routine.
func ConnectAccount ¶
func ConnectAccount(clientAPI *client.APIClient, arn string) (*client.RedactedAwsAccountInstance, *http.Response, error)
ConnectAccount connects an aws account
func ConvertTimeToString ¶
ConvertTimeToString converts time to string
func ConvertToStringSlice ¶
ConvertToStringSlice converts []types.String to []string
func CopyMobilityGroups ¶
func CopyMobilityGroups(request client.ApiMobilityGroupsCopyRequest, input client.StartCopyInput) (*client.Job, *http.Response, error)
CopyMobilityGroups copies a Mobility Group
func CreateClone ¶
func CreateClone(request client.ApiClonesCreateRequest, input client.CloneCreateInput) (*client.Job, *http.Response, error)
CreateClone sends the create clone request
func CreateFilter ¶
CreateFilter creates a filter query string
func CreateMobilityGroup ¶
func CreateMobilityGroup(ctx context.Context, clientAPI *client.APIClient, plan models.MobilityGroupModel) (*client.Job, *http.Response, error)
CreateMobilityGroup creates a new Mobility Group
func CreateMobilityTarget ¶
func CreateMobilityTarget(request client.ApiMobilityTargetsCreateRequest, input client.CreateTargetInput) (*client.Job, *http.Response, error)
CreateMobilityTarget sends the create mobility target request
func CreateStorageSystem ¶
func CreateStorageSystem(client client.ApiStorageSystemsCreateRequest, systemCreateInput client.StorageSystemDeploymentRequest) (*client.Job, *http.Response, error)
CreateStorageSystem creates a storage system
func DisconnectAccount ¶
func DisconnectAccount(clientAPI *client.APIClient, accountID string) (*client.Job, *http.Response, error)
DisconnectAccount disconnects an aws account
func GenerateAwsTrustPolicy ¶
func GenerateAwsTrustPolicy(clientAPI *client.APIClient, accountID string) (*client.AwsTrustPolicy, *http.Response, error)
GenerateAwsTrustPolicy aws trust policy
func GetAccountInstance ¶
func GetAccountInstance(clientAPI *client.APIClient, accountID string) (*client.AwsAccountsInstance, *http.Response, error)
GetAccountInstance gets an aws account
func GetAwsAccountCollection ¶
func GetAwsAccountCollection(clientAPI *client.APIClient, filter []basetypes.StringValue) (*client.AwsAccountsCollection200Response, *http.Response, error)
GetAwsAccountCollection gets list of block storage instances
func GetAwsPermssionCollection ¶
func GetAwsPermssionCollection(clientAPI *client.APIClient, filter []basetypes.StringValue) (*client.AwsPermissionPoliciesCollection200Response, *http.Response, error)
GetAwsPermssionCollection gets list of block storage instances
func GetCloneCollection ¶
func GetCloneCollection(client *client.APIClient, filter string) (*client.ClonesCollection200Response, *http.Response, error)
GetCloneCollection is a collection of clones
func GetCloneInstance ¶
GetCloneInstance is a clone
func GetClonesModel ¶
func GetClonesModel(clone client.Clone, systemID string) (model models.ClonesModel)
GetClonesModel returns a new clonesModel based on data from the given clones
func GetClonesModelDs ¶
func GetClonesModelDs(clone client.Clone) (model models.ClonesModelDs)
GetClonesModelDs returns a new clonesModelDs based on data from the given clones
func GetErrorMessageFromBody ¶
GetErrorMessageFromBody returns the error message from the response body
func GetErrorString ¶
GetErrorString returns the error string from the response
func GetHostCollection ¶
func GetHostCollection(client *client.APIClient, filter string) (*client.HostsCollection200Response, *http.Response, error)
GetHostCollection gets list of hosts.
func GetJobStatus ¶
func GetJobStatus(ctx context.Context, jobsClient *jmsClient.APIClient, jobID string) (*jmsClient.JobsInstance, error)
GetJobStatus returns the job status
func GetMobilityGroup ¶
func GetMobilityGroup(client *client.APIClient, id string) (*client.MobilityGroup, *http.Response, error)
GetMobilityGroup returns a single Mobility Group
func GetMobilityGroupCollection ¶
func GetMobilityGroupCollection(client *client.APIClient, filter string) (*client.MobilityGroupsCollection200Response, *http.Response, error)
GetMobilityGroupCollection returns a list of all Mobility Groups
func GetMobilityGroupModel ¶
func GetMobilityGroupModel(mobilityGroup client.MobilityGroup) (model models.MobilityGroupModel)
GetMobilityGroupModel returns a new mobilityGroupModel based on data from the given mobilityGroup
func GetMobilityGroupModelDs ¶
func GetMobilityGroupModelDs(mobilityGroup client.MobilityGroup) (model models.MobilityGroupModelDs)
GetMobilityGroupModelDs returns a new mobilityGroupModel based on data from the given mobilityGroup
func GetMobilityTarget ¶
func GetMobilityTarget(client *client.APIClient, id string) (*client.MobilityTarget, *http.Response, error)
GetMobilityTarget returns a single Mobility Target
func GetMobilityTargetCollection ¶
func GetMobilityTargetCollection(client *client.APIClient, filter string) (*client.MobilityTargetsCollection200Response, *http.Response, error)
GetMobilityTargetCollection returns a list of all Mobility Targets
func GetMobilityTargetModel ¶
func GetMobilityTargetModel(mobilityTarget client.MobilityTarget) (model models.MobilityTargetModel)
GetMobilityTargetModel creates a new MobilityTargetModel based on the provided mobilityTarget
func GetMobilityTargetModelDs ¶
func GetMobilityTargetModelDs(mobilityTarget client.MobilityTarget) (model models.MobilityTargetModelDs)
GetMobilityTargetModelDs creates a new MobilityTargetModel based on the provided mobilityTarget
func GetNewToken ¶
GetNewToken retrieves a new token by running a Python script, reading from a named pipe, and sending an API request.
ctx: The context.Context object for the function. Returns: - string: The token from the response from the API request. - error: An error if any occurred during the process.
func GetSourcePoolsCollection ¶
func GetSourcePoolsCollection(client *client.APIClient, filter string) (*client.PoolsCollection200Response, *http.Response, error)
GetSourcePoolsCollection returns a list of all Source Pools
func GetStorageCollection ¶
func GetStorageCollection(client *client.APIClient, filter string) (*client.StorageSystemsCollection200Response, *http.Response, error)
GetStorageCollection gets list of storage instances
func GetStorageInstance ¶
func GetStorageInstance(client *client.APIClient, id string) (*client.StorageSystemsInstance, *http.Response, error)
GetStorageInstance gets storage instance
func GetStorageProductsCollection ¶
func GetStorageProductsCollection(client *client.APIClient, filter string) (*client.StorageProductsCollection200Response, *http.Response, error)
GetStorageProductsCollection returns a list of all Stroage Products
func GetStorageSystemBlock ¶
func GetStorageSystemBlock(storageSystem client.StorageSystemsInstance) (storageState models.StorageModel)
GetStorageSystemBlock returns a Block storage systems model based on the given storage system instance
func GetStorageSystemDs ¶
func GetStorageSystemDs(storageSystem client.StorageSystemsInstance) (storageState models.StorageModelDs)
GetStorageSystemDs returns a storage systems model for datasource based on the given storage system instance
func GetStorageSystemFile ¶
func GetStorageSystemFile(storageSystem client.StorageSystemsInstance) (storageState models.StorageModelFile)
GetStorageSystemFile returns a File storage systems model based on the given storage system instance
func GetVolumesCollection ¶
func GetVolumesCollection(client *client.APIClient, filter string) (*client.VolumesCollection200Response, *http.Response, error)
GetVolumesCollection returns a list of all Volumes
func MapAwsAccount ¶
func MapAwsAccount(account client.RedactedAwsAccountInstance) models.AwsAccountModel
MapAwsAccount maps the AWS account
func MapAwsPermission ¶
func MapAwsPermission(permission client.AwsPermissionPoliciesInstance) models.AwsPermissionsModel
MapAwsPermission maps the AWS permission policy
func MapClones ¶
func MapClones(ctx context.Context, mapReq client.ApiClonesMapRequest, cloneID string, hosts []basetypes.StringValue) (*client.Job, *http.Response, error)
MapClones maps clones to a host
func MapGeneratedStatements ¶
func MapGeneratedStatements(statements []client.AwsTrustPolicyStatementInner) basetypes.ListValue
MapGeneratedStatements maps the AWS permssions statements to terraform state
func MapHostModel ¶
func MapHostModel(hosts *client.HostsCollection200Response, state models.HostsDataSourceModel) models.HostsDataSourceModel
MapHostModel maps response body to model
func MapPoolsToState ¶
func MapPoolsToState(pools []client.PoolsInstance) []models.PoolsModel
MapPoolsToState maps the pools to the terraform state
func MapStorageProduct ¶
func MapStorageProduct(storageProducts *client.StorageProductsCollection200Response) models.StorageProductsDataSourceModel
MapStorageProduct maps storage product to terraformsdk model
func MapVolumesToState ¶
func MapVolumesToState(volumes []client.VolumesInstance) []models.VolumesModel
MapVolumesToState maps the given array of client.VolumesInstance to an array of models.VolumesModel.
func RefreshClone ¶
RefreshClone refreshes a clone
func SetCloudConfigSubnetAndVpcBlock ¶
func SetCloudConfigSubnetAndVpcBlock(plan models.StorageModel, result models.StorageModel)
SetCloudConfigSubnetAndVpcBlock sets cloud config from plan
func SetCloudConfigSubnetAndVpcFile ¶
func SetCloudConfigSubnetAndVpcFile(plan models.StorageModelFile, result models.StorageModelFile)
SetCloudConfigSubnetAndVpcFile sets cloud config from plan
func SetPowerflexAysncClientState ¶
func SetPowerflexAysncClientState(source models.ActivationAsyncClientModel) *models.ActivationAsyncClientModel
SetPowerflexAysncClientState sets the powerflex client state
func SetPowerflexClientState ¶
func SetPowerflexClientState(source models.ActivationClientModel) *models.ActivationClientModel
SetPowerflexClientState sets the powerflex client state
func UnmapClones ¶
func UnmapClones(unmapReq client.ApiClonesUnmapRequest, hosts []basetypes.StringValue) (*client.Job, *http.Response, error)
UnmapClones unmaps clones from a host
func UpdateAccount ¶
func UpdateAccount(clientAPI *client.APIClient, accountID string, roleArn string) (*client.Job, *http.Response, error)
UpdateAccount updates an aws account
func UpdateClone ¶
func UpdateClone(request client.ApiClonesModifyRequest, input client.UpdateCloneInput) (*client.Job, *http.Response, error)
UpdateClone sends the update clone request
func UpdateDeploymentDetails ¶
func UpdateDeploymentDetails(planDeploymentDetail *models.DeploymentDetailsModel, resultDeploymentDetail *models.DeploymentDetailsModel)
UpdateDeploymentDetails sets the deplopyment details
func UpdateHostMappings ¶
UpdateHostMappings updates the host mappings after map/unmap operations
func UpdateMobilityGroup ¶
func UpdateMobilityGroup(ctx context.Context, clientAPI *client.APIClient, plan models.MobilityGroupModel) (*client.Job, *http.Response, error)
UpdateMobilityGroup updates an existing Mobility Group
func UpdateMobilityTarget ¶
func UpdateMobilityTarget(request client.ApiMobilityTargetsModifyRequest, input client.UpdateMobilityTargetInput) (*client.Job, *http.Response, error)
UpdateMobilityTarget sends the update mobility target request
func UpdateToken ¶
func UpdateToken(ctx context.Context, client *apexClient.APIClient, jmsClient *jmsClient.APIClient) error
UpdateToken updates the token for the given API clients.
It takes a context.Context, a pointer to an apexClient.APIClient, and a pointer to a jmsClient.APIClient as parameters. It returns an error.
func ValidateCreateStorageParams ¶
func ValidateCreateStorageParams(planDeploymentDetails *models.DeploymentDetailsModel) error
ValidateCreateStorageParams validates the parameters for the create function. It checks for any errors in the plan. If there are errors, it returns the error.
func ValidateCreateStorageParamsBlock ¶
func ValidateCreateStorageParamsBlock(plan models.StorageModel) error
ValidateCreateStorageParamsBlock validates the parameters for the Block Storage create function.
func ValidateCreateStorageParamsFile ¶
func ValidateCreateStorageParamsFile(plan models.StorageModelFile) error
ValidateCreateStorageParamsFile validates the parameters for the File Storage create function.
Types ¶
type AccessTokenResponse ¶
type AccessTokenResponse struct { AccessToken string `json:"access_token"` TokenType string `json:"token_type"` ExpiresIn int `json:"expires_in"` IssuedTo string `json:"issued_to"` TokenTypeURL string `json:"token_type_url"` }
AccessTokenResponse represents the structure of the JSON response
type Config ¶
type Config struct { ScriptPath string DirPath string TokenFileName string URLLink string AccessKey string Secret string }
Config represents the configuration settings for the token helper. The struct contains the following fields: - ScriptPath: the path to the script file that retrieves the token. - DirPath: the directory where the script file is located. - TokenFileName: the name of the file where the token is stored. - URLLink: the URL link for the API request. - AccessKey: the access key for the API request. - Secret: the secret key for the API request.
type Poller ¶
type Poller interface { WaitForResource(ctx context.Context, id string) (string, error) CancelJob(ctx context.Context, id string) (*http.Response, error) GetJob(ctx context.Context, id string) (*jobsClient.JobsInstance, error) }
Poller interface
func NewPoller ¶
func NewPoller(jmsClient *jobsClient.APIClient) Poller
NewPoller returns a new poller object