Documentation
¶
Index ¶
- Constants
- func GetAAIClient(deploymentID string, locationProps config.DynamicMap) yorcoidc.Client
- func GetAccessToken(ctx context.Context, cfg config.Configuration, deploymentID, nodeName string) (string, error)
- func GetStoredNodeTemplate(ctx context.Context, deploymentID, nodeName string) (*tosca.NodeTemplate, error)
- func MatchesFilter(fileName string, filesPatterns []string) (bool, error)
- func RefreshToken(ctx context.Context, locationProps config.DynamicMap, deploymentID string) (string, string, error)
- func StoreNodeTemplate(ctx context.Context, deploymentID, nodeName string, ...) error
- type ChangedFile
- type DDIExecution
- func (e *DDIExecution) GetBooleanValueFromEnvInputs(envVar string) bool
- func (e *DDIExecution) GetDDIClientFromAssociatedComputeLocation(ctx context.Context) (ddi.Client, error)
- func (e *DDIExecution) GetDDIClientFromHostingComputeLocation(ctx context.Context) (ddi.Client, config.DynamicMap, error)
- func (e *DDIExecution) GetDDIClientFromRequirement(ctx context.Context, requirementName string) (ddi.Client, config.DynamicMap, string, error)
- func (e *DDIExecution) GetDDILocationFromComputeLocation(ctx context.Context, locationMgr locations.Manager, computeLocation string) (config.DynamicMap, error)
- func (e *DDIExecution) GetDDILocationNameFromInfrastructureLocation(ctx context.Context, infraLocation string) (string, error)
- func (e *DDIExecution) GetFirstCreatedTaskDetails(ctx context.Context, jobPath string) (int64, string, error)
- func (e *DDIExecution) GetFirstRunningTaskDetails(ctx context.Context, jobPath string) (int64, string, error)
- func (e *DDIExecution) GetHPCJobChangedFilesSinceStartup(ctx context.Context) ([]ChangedFile, error)
- func (e *DDIExecution) GetLastDoneTaskDetails(ctx context.Context, jobPath string) (int64, string, error)
- func (e *DDIExecution) GetValueFromEnvInputs(envVar string) string
- func (e *DDIExecution) ResolveExecution(ctx context.Context) error
- func (e *DDIExecution) SetCloudStagingAreaAccessCapabilityAttributes(ctx context.Context, ddiClient ddi.Client) error
- func (e *DDIExecution) SetDDIAccessCapabilityAttributes(ctx context.Context, ddiClient ddi.Client) error
- func (e *DDIExecution) SetDatasetInfoCapabilityLocationsAttribute(ctx context.Context, locationNames []string) error
- func (e *DDIExecution) SetDatasetInfoCapabilityNumberOfFilesAttribute(ctx context.Context, filesNumber string) error
- func (e *DDIExecution) SetDatasetInfoCapabilityNumberOfSmallFilesAttribute(ctx context.Context, filesNumber string) error
- func (e *DDIExecution) SetDatasetInfoCapabilitySizeAttribute(ctx context.Context, size string) error
- func (e *DDIExecution) SetLocationFromAssociatedCloudInstance(ctx context.Context) (string, error)
- func (e *DDIExecution) SetLocationFromAssociatedDataTransferJob(ctx context.Context) (string, error)
- func (e *DDIExecution) SetLocationFromAssociatedHPCJob(ctx context.Context) (string, error)
Constants ¶
const ( // DDIInfrastructureType is the DDI location infrastructure type DDIInfrastructureType = "ddi" // DatasetInfoCapability is the capability of a component providing info on a dataset DatasetInfoCapability = "dataset_info" // DatasetInfoLocations is an attribute providing the list of DDI areas where the // dataset is available DatasetInfoLocations = "locations" // DatasetInfoLocations is an attribute providing the number of files in a dataset DatasetInfoNumberOfFiles = "number_of_files" // DatasetInfoLocations is an attribute providing the number of small files in a dataset (<= 32MB) DatasetInfoNumberOfSmallFiles = "number_of_small_files" // DatasetInfoLocations is an attribute providing the size in bytes of a dataset DatasetInfoSize = "size" // AccessTokenConsulAttribute is the access token attribute of a job stored in consul AccessTokenConsulAttribute = "access_token" )
Variables ¶
This section is empty.
Functions ¶
func GetAAIClient ¶
func GetAAIClient(deploymentID string, locationProps config.DynamicMap) yorcoidc.Client
GetAAIClient returns the AAI client for a given location
func GetAccessToken ¶
func GetAccessToken(ctx context.Context, cfg config.Configuration, deploymentID, nodeName string) (string, error)
GetAccessToken returns the access token for this deployment
func GetStoredNodeTemplate ¶
func GetStoredNodeTemplate(ctx context.Context, deploymentID, nodeName string) (*tosca.NodeTemplate, error)
GetStoredNodeTemplate returns the description of a node stored by Yorc
func MatchesFilter ¶
Check if a string matches one of the filters
func RefreshToken ¶
func RefreshToken(ctx context.Context, locationProps config.DynamicMap, deploymentID string) (string, string, error)
RefreshToken refreshes an access token
func StoreNodeTemplate ¶
func StoreNodeTemplate(ctx context.Context, deploymentID, nodeName string, nodeTemplate *tosca.NodeTemplate) error
StoreNodeTemplate stores a node template in Yorc
Types ¶
type ChangedFile ¶
ChangedFile holds properties of a file created/updated by a job
type DDIExecution ¶
type DDIExecution struct { KV *api.KV Cfg config.Configuration DeploymentID string TaskID string NodeName string Operation prov.Operation EnvInputs []*operations.EnvInput VarInputsNames []string AAIClient yorcoidc.Client }
DDIExecution holds DDI Execution properties
func (*DDIExecution) GetBooleanValueFromEnvInputs ¶
func (e *DDIExecution) GetBooleanValueFromEnvInputs(envVar string) bool
GetBooleanValueFromEnvInputs returns a boolean from environment variables provided in input
func (*DDIExecution) GetDDIClientFromAssociatedComputeLocation ¶
func (e *DDIExecution) GetDDIClientFromAssociatedComputeLocation(ctx context.Context) (ddi.Client, error)
GetDDIClientFromAssociatedComputeLocation gets a DDI client corresponding to the location on which the associated compute instance is running
func (*DDIExecution) GetDDIClientFromHostingComputeLocation ¶
func (e *DDIExecution) GetDDIClientFromHostingComputeLocation(ctx context.Context) (ddi.Client, config.DynamicMap, error)
GetDDIClientFromHostingComputeLocation gets a DDI client corresponding to the location on which the hosting compute instance is running
func (*DDIExecution) GetDDIClientFromRequirement ¶
func (e *DDIExecution) GetDDIClientFromRequirement(ctx context.Context, requirementName string) (ddi.Client, config.DynamicMap, string, error)
GetDDIClientFromRequirement gets a DDI client and location properties corresponding to the location on which the associated compute instance is running
func (*DDIExecution) GetDDILocationFromComputeLocation ¶
func (e *DDIExecution) GetDDILocationFromComputeLocation(ctx context.Context, locationMgr locations.Manager, computeLocation string) (config.DynamicMap, error)
GetDDILocationFromComputeLocation gets the DDI location for the location on which the associated compute instance is running
func (*DDIExecution) GetDDILocationNameFromInfrastructureLocation ¶
func (e *DDIExecution) GetDDILocationNameFromInfrastructureLocation(ctx context.Context, infraLocation string) (string, error)
GetDDILocationNameFromComputeLocationName gets the DDI location name for the location on which the associated compute instance is running if any
func (*DDIExecution) GetFirstCreatedTaskDetails ¶ added in v1.0.3
func (e *DDIExecution) GetFirstCreatedTaskDetails(ctx context.Context, jobPath string) (int64, string, error)
GetFirstCreatedTaskDetails gets details on the first task of state created or pending in a HEAppE job: task ID and directory path
func (*DDIExecution) GetFirstRunningTaskDetails ¶ added in v1.0.3
func (e *DDIExecution) GetFirstRunningTaskDetails(ctx context.Context, jobPath string) (int64, string, error)
GetFirstRunningTaskDetails gets details on the first task pending or running in a HEAppE job: task ID and directory path
func (*DDIExecution) GetHPCJobChangedFilesSinceStartup ¶
func (e *DDIExecution) GetHPCJobChangedFilesSinceStartup(ctx context.Context) ([]ChangedFile, error)
GetHPCJobChangedFilesSinceStartup gets from evironment the list of files modified by a job since its startup
func (*DDIExecution) GetLastDoneTaskDetails ¶ added in v1.0.3
func (e *DDIExecution) GetLastDoneTaskDetails(ctx context.Context, jobPath string) (int64, string, error)
GetLastDoneTaskDetails gets details on the last task done in a HEAppE job: task ID and directory path
func (*DDIExecution) GetValueFromEnvInputs ¶
func (e *DDIExecution) GetValueFromEnvInputs(envVar string) string
GetValueFromEnvInputs returns a value from environment variables provided in input
func (*DDIExecution) ResolveExecution ¶
func (e *DDIExecution) ResolveExecution(ctx context.Context) error
ResolveExecution resolves inputs before the execution of an operation
func (*DDIExecution) SetCloudStagingAreaAccessCapabilityAttributes ¶
func (e *DDIExecution) SetCloudStagingAreaAccessCapabilityAttributes(ctx context.Context, ddiClient ddi.Client) error
SetCloudStagingAreaAccessCapabilityAttributes sets the corresponding capability attributes
func (*DDIExecution) SetDDIAccessCapabilityAttributes ¶
func (*DDIExecution) SetDatasetInfoCapabilityLocationsAttribute ¶
func (e *DDIExecution) SetDatasetInfoCapabilityLocationsAttribute(ctx context.Context, locationNames []string) error
func (*DDIExecution) SetDatasetInfoCapabilityNumberOfFilesAttribute ¶
func (e *DDIExecution) SetDatasetInfoCapabilityNumberOfFilesAttribute(ctx context.Context, filesNumber string) error
func (*DDIExecution) SetDatasetInfoCapabilityNumberOfSmallFilesAttribute ¶
func (e *DDIExecution) SetDatasetInfoCapabilityNumberOfSmallFilesAttribute(ctx context.Context, filesNumber string) error
func (*DDIExecution) SetDatasetInfoCapabilitySizeAttribute ¶
func (e *DDIExecution) SetDatasetInfoCapabilitySizeAttribute(ctx context.Context, size string) error
func (*DDIExecution) SetLocationFromAssociatedCloudInstance ¶
func (e *DDIExecution) SetLocationFromAssociatedCloudInstance(ctx context.Context) (string, error)
SetLocationFromAssociatedCloudInstance sets the location of this component according to an associated compute instance location
func (*DDIExecution) SetLocationFromAssociatedDataTransferJob ¶ added in v1.0.3
func (e *DDIExecution) SetLocationFromAssociatedDataTransferJob(ctx context.Context) (string, error)
SetLocationFromAssociatedTransferJob sets the location of this component according to an associated data transfer to DDI job location
func (*DDIExecution) SetLocationFromAssociatedHPCJob ¶
func (e *DDIExecution) SetLocationFromAssociatedHPCJob(ctx context.Context) (string, error)
SetLocationFromAssociatedHPCJob sets the location of this component according to an associated HPC location