Documentation
¶
Index ¶
- Constants
- Variables
- func CompareFloat64(v1 float64, v2 float64) int
- func CompareInt64(v1 int64, v2 int64) int
- func CompareUint32(v1 uint32, v2 uint32) int
- func CompareUint64(v1 uint64, v2 uint64) int
- func CopyAndMerge(target ard.Value, source ard.Value, copiedNames []string, targets ard.Map) (ard.Value, bool)
- func CopyTemplate(context *tosca.Context)
- func NormalizeFunctionCallArguments(functionCall *tosca.FunctionCall, context *tosca.Context)
- func ReadArtifact(context *tosca.Context) tosca.EntityPtr
- func ReadArtifactDefinition(context *tosca.Context) tosca.EntityPtr
- func ReadArtifactType(context *tosca.Context) tosca.EntityPtr
- func ReadAttributeDefinition(context *tosca.Context) tosca.EntityPtr
- func ReadAttributeMapping(context *tosca.Context) tosca.EntityPtr
- func ReadAttributeValue(context *tosca.Context) tosca.EntityPtr
- func ReadCapabilityAssignment(context *tosca.Context) tosca.EntityPtr
- func ReadCapabilityDefinition(context *tosca.Context) tosca.EntityPtr
- func ReadCapabilityFilter(context *tosca.Context) tosca.EntityPtr
- func ReadCapabilityMapping(context *tosca.Context) tosca.EntityPtr
- func ReadCapabilityType(context *tosca.Context) tosca.EntityPtr
- func ReadConditionClause(context *tosca.Context) tosca.EntityPtr
- func ReadConstraintClause(context *tosca.Context) tosca.EntityPtr
- func ReadDataType(context *tosca.Context) tosca.EntityPtr
- func ReadEventFilter(context *tosca.Context) tosca.EntityPtr
- func ReadGroup(context *tosca.Context) tosca.EntityPtr
- func ReadGroupType(context *tosca.Context) tosca.EntityPtr
- func ReadImport(context *tosca.Context) tosca.EntityPtr
- func ReadInterfaceAssignment(context *tosca.Context) tosca.EntityPtr
- func ReadInterfaceDefinition(context *tosca.Context) tosca.EntityPtr
- func ReadInterfaceImplementation(context *tosca.Context) tosca.EntityPtr
- func ReadInterfaceMapping(context *tosca.Context) tosca.EntityPtr
- func ReadInterfaceType(context *tosca.Context) tosca.EntityPtr
- func ReadMetadata(context *tosca.Context) tosca.EntityPtr
- func ReadNodeFilter(context *tosca.Context) tosca.EntityPtr
- func ReadNodeTemplate(context *tosca.Context) tosca.EntityPtr
- func ReadNodeType(context *tosca.Context) tosca.EntityPtr
- func ReadNotificationAssignment(context *tosca.Context) tosca.EntityPtr
- func ReadNotificationDefinition(context *tosca.Context) tosca.EntityPtr
- func ReadOperationAssignment(context *tosca.Context) tosca.EntityPtr
- func ReadOperationDefinition(context *tosca.Context) tosca.EntityPtr
- func ReadOutputMapping(context *tosca.Context) tosca.EntityPtr
- func ReadParameterDefinition(context *tosca.Context) tosca.EntityPtr
- func ReadPolicy(context *tosca.Context) tosca.EntityPtr
- func ReadPolicyType(context *tosca.Context) tosca.EntityPtr
- func ReadPropertyDefinition(context *tosca.Context) tosca.EntityPtr
- func ReadPropertyFilter(context *tosca.Context) tosca.EntityPtr
- func ReadPropertyMapping(context *tosca.Context) tosca.EntityPtr
- func ReadRange(context *tosca.Context) tosca.EntityPtr
- func ReadRangeEntity(context *tosca.Context) tosca.EntityPtr
- func ReadRelationshipAssignment(context *tosca.Context) tosca.EntityPtr
- func ReadRelationshipDefinition(context *tosca.Context) tosca.EntityPtr
- func ReadRelationshipTemplate(context *tosca.Context) tosca.EntityPtr
- func ReadRelationshipType(context *tosca.Context) tosca.EntityPtr
- func ReadRepository(context *tosca.Context) tosca.EntityPtr
- func ReadRequirementAssignment(context *tosca.Context) tosca.EntityPtr
- func ReadRequirementDefinition(context *tosca.Context) tosca.EntityPtr
- func ReadRequirementMapping(context *tosca.Context) tosca.EntityPtr
- func ReadScalarUnitBitrate(context *tosca.Context) tosca.EntityPtr
- func ReadScalarUnitFrequency(context *tosca.Context) tosca.EntityPtr
- func ReadScalarUnitSize(context *tosca.Context) tosca.EntityPtr
- func ReadScalarUnitTime(context *tosca.Context) tosca.EntityPtr
- func ReadSchema(context *tosca.Context) tosca.EntityPtr
- func ReadServiceTemplate(context *tosca.Context) tosca.EntityPtr
- func ReadSubstitutionMappings(context *tosca.Context) tosca.EntityPtr
- func ReadTimestamp(context *tosca.Context) tosca.EntityPtr
- func ReadTopologyTemplate(context *tosca.Context) tosca.EntityPtr
- func ReadTriggerDefinition(context *tosca.Context) tosca.EntityPtr
- func ReadTriggerDefinitionCondition(context *tosca.Context) tosca.EntityPtr
- func ReadUnit(context *tosca.Context) tosca.EntityPtr
- func ReadValue(context *tosca.Context) tosca.EntityPtr
- func ReadVersion(context *tosca.Context) tosca.EntityPtr
- func ReadWorkflowActivityCallOperation(context *tosca.Context) tosca.EntityPtr
- func ReadWorkflowActivityDefinition(context *tosca.Context) tosca.EntityPtr
- func ReadWorkflowDefinition(context *tosca.Context) tosca.EntityPtr
- func ReadWorkflowPreconditionDefinition(context *tosca.Context) tosca.EntityPtr
- func ReadWorkflowStepDefinition(context *tosca.Context) tosca.EntityPtr
- func ToFunctionCall(context *tosca.Context) bool
- type Artifact
- type ArtifactDefinition
- type ArtifactDefinitions
- type ArtifactType
- type ArtifactTypes
- type Artifacts
- type AttributeDefinition
- type AttributeDefinitions
- type AttributeMapping
- type AttributeMappings
- type CapabilityAssignment
- func (self *CapabilityAssignment) GetDefinition(nodeTemplate *NodeTemplate) (*CapabilityDefinition, bool)
- func (self *CapabilityAssignment) GetKey() string
- func (self *CapabilityAssignment) Normalize(normalNodeTemplate *normal.NodeTemplate, definition *CapabilityDefinition) *normal.Capability
- func (self *CapabilityAssignment) Render(definition *CapabilityDefinition)
- type CapabilityAssignments
- type CapabilityDefinition
- type CapabilityDefinitions
- type CapabilityFilter
- type CapabilityFilters
- type CapabilityMapping
- type CapabilityMappings
- type CapabilityType
- type CapabilityTypes
- type ConditionClause
- type ConditionClauses
- type ConstraintClause
- type ConstraintClauses
- func (self ConstraintClauses) Append(constraints ConstraintClauses) ConstraintClauses
- func (self ConstraintClauses) Normalize(context *tosca.Context) normal.FunctionCalls
- func (self ConstraintClauses) NormalizeConstrainable(context *tosca.Context, normalConstrainable normal.Constrainable)
- func (self ConstraintClauses) NormalizeListEntries(context *tosca.Context, normalList *normal.List)
- func (self ConstraintClauses) NormalizeMapKeys(context *tosca.Context, normalMap *normal.Map)
- func (self ConstraintClauses) NormalizeMapValues(context *tosca.Context, normalMap *normal.Map)
- func (self ConstraintClauses) Render(dataType *DataType)
- type DataType
- func (self *DataType) Complete(context *tosca.Context)
- func (self *DataType) GetInternal() (ard.TypeName, ard.TypeValidator, tosca.Reader, bool)
- func (self *DataType) GetInternalTypeName() (ard.TypeName, bool)
- func (self *DataType) GetParent() tosca.EntityPtr
- func (self *DataType) GetTypeInformation() *normal.TypeInformation
- func (self *DataType) Inherit()
- func (self *DataType) Render()
- type DataTypes
- type Entity
- type EventFilter
- type Group
- type GroupType
- type GroupTypes
- type Groups
- type HasComparer
- type Import
- type Imports
- type InterfaceAssignment
- func (self *InterfaceAssignment) GetDefinitionForGroup(group *Group) (*InterfaceDefinition, bool)
- func (self *InterfaceAssignment) GetDefinitionForNodeTemplate(nodeTemplate *NodeTemplate) (*InterfaceDefinition, bool)
- func (self *InterfaceAssignment) GetDefinitionForRelationship(relationship *RelationshipAssignment, ...) (*InterfaceDefinition, bool)
- func (self *InterfaceAssignment) GetKey() string
- func (self *InterfaceAssignment) Normalize(normalInterface *normal.Interface, definition *InterfaceDefinition)
- func (self *InterfaceAssignment) Render(definition *InterfaceDefinition)
- type InterfaceAssignments
- func (self InterfaceAssignments) CopyUnassigned(assignments InterfaceAssignments)
- func (self InterfaceAssignments) NormalizeForGroup(group *Group, normalGroup *normal.Group)
- func (self InterfaceAssignments) NormalizeForNodeTemplate(nodeTemplate *NodeTemplate, normalNodeTemplate *normal.NodeTemplate)
- func (self InterfaceAssignments) NormalizeForRelationship(relationship *RelationshipAssignment, ...)
- func (self InterfaceAssignments) Render(definitions InterfaceDefinitions, context *tosca.Context)
- type InterfaceDefinition
- type InterfaceDefinitions
- type InterfaceImplementation
- type InterfaceMapping
- type InterfaceMappings
- type InterfaceType
- type InterfaceTypes
- type Metadata
- type NodeFilter
- type NodeTemplate
- type NodeTemplates
- type NodeType
- type NodeTypes
- type NotificationAssignment
- type NotificationAssignments
- type NotificationDefinition
- type NotificationDefinitions
- type OperationAssignment
- type OperationAssignments
- type OperationDefinition
- type OperationDefinitions
- type OutputMapping
- type OutputMappings
- type ParameterDefinition
- type ParameterDefinitions
- type Policies
- type Policy
- type PolicyType
- type PolicyTypes
- type PropertyDefinition
- type PropertyDefinitions
- type PropertyFilter
- type PropertyFilters
- type PropertyMapping
- type PropertyMappings
- type Range
- type RangeEntity
- type RelationshipAssignment
- type RelationshipDefinition
- type RelationshipTemplate
- type RelationshipTemplates
- type RelationshipType
- type RelationshipTypes
- type Repositories
- type Repository
- type RequirementAssignment
- type RequirementAssignments
- type RequirementDefinition
- type RequirementDefinitions
- type RequirementMapping
- type RequirementMappings
- type ScalarUnit
- type ScalarUnitMeasures
- type Schema
- type ServiceTemplate
- type SubstitutionMappings
- type Timestamp
- type TopologyTemplate
- type TriggerDefinition
- type TriggerDefinitionCondition
- type TriggerDefinitions
- type Type
- type Unit
- type Value
- func (self *Value) GetKey() string
- func (self *Value) Normalize() normal.Constrainable
- func (self *Value) RenderAttribute(dataType *DataType, definition *AttributeDefinition, bare bool, allowNil bool)
- func (self *Value) RenderDataType(dataTypeName string)
- func (self *Value) RenderProperty(dataType *DataType, definition *PropertyDefinition)
- func (self *Value) String() string
- type ValueList
- type ValueMap
- type Values
- func (self Values) CopyUnassigned(values Values)
- func (self Values) Normalize(normalConstrainables normal.Constrainables)
- func (self Values) RenderAttributes(definitions AttributeDefinitions, context *tosca.Context)
- func (self Values) RenderMissingValue(definition *AttributeDefinition, kind string, required bool, ...)
- func (self Values) RenderProperties(definitions PropertyDefinitions, kind string, context *tosca.Context)
- type Version
- type WorkflowActivityCallOperation
- type WorkflowActivityDefinition
- type WorkflowActivityDefinitions
- type WorkflowDefinition
- type WorkflowDefinitions
- type WorkflowPreconditionDefinition
- type WorkflowPreconditionDefinitions
- type WorkflowStepDefinition
- func (self *WorkflowStepDefinition) GetKey() string
- func (self *WorkflowStepDefinition) Normalize(normalWorkflow *normal.Workflow) *normal.WorkflowStep
- func (self *WorkflowStepDefinition) NormalizeNext(normalWorkflowStep *normal.WorkflowStep, normalWorkflow *normal.Workflow)
- func (self *WorkflowStepDefinition) Render(definitions WorkflowStepDefinitions)
- type WorkflowStepDefinitions
Constants ¶
const TimestampFormat = "%04d-%02d-%02dT%02d:%02d:%02d%s%s"
const TimestampTimezoneFormat = "%s%02d:%02d"
Variables ¶
var ConstraintClauseNativeArgumentIndexes = map[string][]uint{
"tosca.constraint.equal": {0},
"tosca.constraint.greater_than": {0},
"tosca.constraint.greater_or_equal": {0},
"tosca.constraint.less_than": {0},
"tosca.constraint.less_or_equal": {0},
"tosca.constraint.in_range": {0, 1},
}
var ConstraintClauseScriptlets = map[string]string{ "tosca.constraint.equal": profile.Profile["/tosca/implicit/2.0/js/constraints/equal.js"], "tosca.constraint.greater_than": profile.Profile["/tosca/implicit/2.0/js/constraints/greater_than.js"], "tosca.constraint.greater_or_equal": profile.Profile["/tosca/implicit/2.0/js/constraints/greater_or_equal.js"], "tosca.constraint.less_than": profile.Profile["/tosca/implicit/2.0/js/constraints/less_than.js"], "tosca.constraint.less_or_equal": profile.Profile["/tosca/implicit/2.0/js/constraints/less_or_equal.js"], "tosca.constraint.in_range": profile.Profile["/tosca/implicit/2.0/js/constraints/in_range.js"], "tosca.constraint.valid_values": profile.Profile["/tosca/implicit/2.0/js/constraints/valid_values.js"], "tosca.constraint.length": profile.Profile["/tosca/implicit/2.0/js/constraints/length.js"], "tosca.constraint.min_length": profile.Profile["/tosca/implicit/2.0/js/constraints/min_length.js"], "tosca.constraint.max_length": profile.Profile["/tosca/implicit/2.0/js/constraints/max_length.js"], "tosca.constraint.pattern": profile.Profile["/tosca/implicit/2.0/js/constraints/pattern.js"], "tosca.constraint.schema": profile.Profile["/tosca/implicit/2.0/js/constraints/schema.js"], }
Built-in constraint functions
var DefaultScriptletNamespace = tosca.NewScriptletNamespace()
var FunctionScriptlets = map[string]string{ "tosca.function.concat": profile.Profile["/tosca/implicit/2.0/js/functions/concat.js"], "tosca.function.join": profile.Profile["/tosca/implicit/2.0/js/functions/join.js"], "tosca.function.token": profile.Profile["/tosca/implicit/2.0/js/functions/token.js"], "tosca.function.get_input": profile.Profile["/tosca/implicit/2.0/js/functions/get_input.js"], "tosca.function.get_property": profile.Profile["/tosca/implicit/2.0/js/functions/get_property.js"], "tosca.function.get_attribute": profile.Profile["/tosca/implicit/2.0/js/functions/get_attribute.js"], "tosca.function.get_operation_output": profile.Profile["/tosca/implicit/2.0/js/functions/get_operation_output.js"], "tosca.function.get_nodes_of_type": profile.Profile["/tosca/implicit/2.0/js/functions/get_nodes_of_type.js"], "tosca.function.get_artifact": profile.Profile["/tosca/implicit/2.0/js/functions/get_artifact.js"], }
var Grammar = tosca.NewGrammar()
var ScalarUnitBitrateMeasures = ScalarUnitMeasures{
"bps": 1,
"Kbps": 1000,
"Kibps": 1024,
"Mbps": 1000000,
"Mibps": 1048576,
"Gbps": 1000000000,
"Gibps": 1073741824,
"Tbps": 1000000000000,
"Tibps": 1099511627776,
"Bps": 8,
"KBps": 8000,
"KiBps": 8192,
"MBps": 8000000,
"MiBps": 8388608,
"GBps": 8000000000,
"GiBps": 8589934592,
"TBps": 8000000000000,
"TiBps": 8796093022208,
}
Case-sensitive!
var ScalarUnitBitrateRE = regexp.MustCompile(
`^(?P<scalar>[0-9]*\.?[0-9]+(?:e[-+]?[0-9]+)?)\s*` +
`(?P<unit>bps|Kbps|Kibps|Mbps|Mibps|Gbps|Gibps|Tbps|Tibps|Bps|KBps|KiBps|MBps|MiBps|GBps|GiBps|TBps|TiBps)$`)
var ScalarUnitFrequencyMeasures = ScalarUnitMeasures{
"Hz": 1,
"kHz": 1000,
"MHz": 1000000,
"GHz": 1000000000,
}
var ScalarUnitFrequencyRE = regexp.MustCompile(
`^(?P<scalar>[0-9]*\.?[0-9]+(?:e[-+]?[0-9]+)?)\s*` +
`(?i)(?P<unit>Hz|kHz|MHz|GHz)$`)
var ScalarUnitSizeMeasures = ScalarUnitMeasures{
"B": 1,
"kB": 1000,
"KiB": 1024,
"MB": 1000000,
"MiB": 1048576,
"GB": 1000000000,
"GiB": 1073741824,
"TB": 1000000000000,
"TiB": 1099511627776,
}
var ScalarUnitSizeRE = regexp.MustCompile(
`^(?P<scalar>[0-9]*\.?[0-9]+(?:e[-+]?[0-9]+)?)\s*` +
`(?i)(?P<unit>B|kB|KiB|MB|MiB|GB|GiB|TB|TiB)$`)
var ScalarUnitTimeMeasures = ScalarUnitMeasures{
"ns": 0.000000001,
"us": 0.000001,
"ms": 0.001,
"s": 1,
"m": 60,
"h": 3600,
"d": 86400,
}
var ScalarUnitTimeRE = regexp.MustCompile(
`^(?P<scalar>[0-9]*\.?[0-9]+(?:e[-+]?[0-9]+)?)\s*` +
`(?i)(?P<unit>ns|us|ms|s|m|h|d)$`)
var ScalarUnitTypeZeroes = map[ard.TypeName]ard.Value{ "scalar-unit.size": int(0), "scalar-unit.time": float64(0.0), "scalar-unit.frequency": float64(0.0), "scalar-unit.bitrate": float64(0.0), }
var TimestampLongRE = regexp.MustCompile(
`^(?P<year>[0-9][0-9][0-9][0-9])-(?P<month>[0-9][0-9]?)-(?P<day>[0-9][0-9]?)` +
`(?:[Tt]|[ \t]+)` +
`(?P<hour>[0-9][0-9]?):(?P<minute>[0-9][0-9]):(?P<second>[0-9][0-9])(?:(?P<fraction>\.[0-9]*))?` +
`(?:(?:[ \t]*)(?:Z|(?P<tzhour>[-+][0-9][0-9]?)(?::(?P<tzminute>[0-9][0-9]))?))?$`)
var TimestampShortRE = regexp.MustCompile(`^(?P<year>[0-9][0-9][0-9][0-9])-(?P<month>[0-9][0-9])-(?P<day>[0-9][0-9])$`)
var VersionRE = regexp.MustCompile(
`^(?P<major>\d+)\.(?P<minor>\d+)(?:\.(?P<fix>\d+)` +
`(?:(?:\.(?P<qualifier>\w+))(?:-(?P<build>\d+))?)?)?$`)
Functions ¶
func CompareFloat64 ¶
func CompareInt64 ¶
func CompareUint32 ¶
func CompareUint64 ¶
func CopyAndMerge ¶
func CopyTemplate ¶
Implements the "copy" feature for node templates and relationship templates
func NormalizeFunctionCallArguments ¶
func NormalizeFunctionCallArguments(functionCall *tosca.FunctionCall, context *tosca.Context)
func ReadArtifact ¶
tosca.Reader signature
func ReadArtifactDefinition ¶
tosca.Reader signature
func ReadArtifactType ¶
tosca.Reader signature
func ReadAttributeDefinition ¶
tosca.Reader signature
func ReadAttributeMapping ¶
tosca.Reader signature
func ReadAttributeValue ¶
tosca.Reader signature [TOSCA-Simple-Profile-YAML-v1.2] @ 3.6.12.2.2 [TOSCA-Simple-Profile-YAML-v1.1] @ 3.5.11.2.2
func ReadCapabilityAssignment ¶
tosca.Reader signature
func ReadCapabilityDefinition ¶
tosca.Reader signature
func ReadCapabilityFilter ¶
tosca.Reader signature
func ReadCapabilityMapping ¶
tosca.Reader signature
func ReadCapabilityType ¶
tosca.Reader signature
func ReadConditionClause ¶
tosca.Reader signature
func ReadConstraintClause ¶
tosca.Reader signature
func ReadDataType ¶
tosca.Reader signature
func ReadEventFilter ¶
tosca.Reader signature
func ReadGroupType ¶
tosca.Reader signature
func ReadInterfaceAssignment ¶
tosca.Reader signature
func ReadInterfaceDefinition ¶
tosca.Reader signature
func ReadInterfaceImplementation ¶
tosca.Reader signature
func ReadInterfaceMapping ¶
tosca.Reader signature
func ReadInterfaceType ¶
tosca.Reader signature
func ReadMetadata ¶
tosca.Reader signature
func ReadNodeFilter ¶
tosca.Reader signature
func ReadNodeTemplate ¶
tosca.Reader signature
func ReadNodeType ¶
tosca.Reader signature
func ReadNotificationAssignment ¶
tosca.Reader signature
func ReadNotificationDefinition ¶
tosca.Reader signature
func ReadOperationAssignment ¶
tosca.Reader signature
func ReadOperationDefinition ¶
tosca.Reader signature
func ReadOutputMapping ¶ added in v0.16.0
tosca.Reader signature
func ReadParameterDefinition ¶
tosca.Reader signature
func ReadPolicyType ¶
tosca.Reader signature
func ReadPropertyDefinition ¶
tosca.Reader signature
func ReadPropertyFilter ¶
tosca.Reader signature
func ReadPropertyMapping ¶
tosca.Reader signature
func ReadRangeEntity ¶
tosca.Reader signature
func ReadRelationshipAssignment ¶
tosca.Reader signature
func ReadRelationshipDefinition ¶
tosca.Reader signature
func ReadRelationshipTemplate ¶
tosca.Reader signature
func ReadRelationshipType ¶
tosca.Reader signature
func ReadRepository ¶
tosca.Reader signature
func ReadRequirementAssignment ¶
tosca.Reader signature
func ReadRequirementDefinition ¶
tosca.Reader signature
func ReadRequirementMapping ¶
tosca.Reader signature
func ReadScalarUnitBitrate ¶
tosca.Reader signature
func ReadScalarUnitFrequency ¶
tosca.Reader signature
func ReadScalarUnitSize ¶
tosca.Reader signature
func ReadScalarUnitTime ¶
tosca.Reader signature
func ReadServiceTemplate ¶
tosca.Reader signature
func ReadSubstitutionMappings ¶
tosca.Reader signature
func ReadTimestamp ¶
tosca.Reader signature
func ReadTopologyTemplate ¶
tosca.Reader signature
func ReadTriggerDefinition ¶
tosca.Reader signature
func ReadTriggerDefinitionCondition ¶
tosca.Reader signature
func ReadWorkflowActivityCallOperation ¶
tosca.Reader signature
func ReadWorkflowActivityDefinition ¶
tosca.Reader signature
func ReadWorkflowDefinition ¶
tosca.Reader signature
func ReadWorkflowPreconditionDefinition ¶
tosca.Reader signature
func ReadWorkflowStepDefinition ¶
tosca.Reader signature
func ToFunctionCall ¶
Types ¶
type Artifact ¶
type Artifact struct {
*ArtifactDefinition `name:"artifact"`
}
func NewArtifact ¶
func (*Artifact) Copy ¶
func (self *Artifact) Copy(definition *ArtifactDefinition)
type ArtifactDefinition ¶
type ArtifactDefinition struct { *Entity `name:"artifact definition"` Name string ArtifactTypeName *string `read:"type"` // required only if cannot be inherited Description *string `read:"description"` ArtifactVersion *string `read:"artifact_version"` // introduced in TOSCA 1.3 Properties Values `read:"properties,Value"` // ERRATUM: ommited in TOSCA 1.0-1.2 (appears in artifact type) RepositoryName *string `read:"repository"` File *string `read:"file"` // required only if cannot be inherited DeployPath *string `read:"deploy_path"` ChecksumAlgorithm *string `read:"checksum_algorithm"` // introduced in TOSCA 1.3 Checksum *string `read:"checksum"` // introduced in TOSCA 1.3 ArtifactType *ArtifactType `lookup:"type,ArtifactTypeName" json:"-" yaml:"-"` Repository *Repository `lookup:"repository,RepositoryName" json:"-" yaml:"-"` // contains filtered or unexported fields }
func NewArtifactDefinition ¶
func NewArtifactDefinition(context *tosca.Context) *ArtifactDefinition
func (*ArtifactDefinition) GetExtension ¶
func (self *ArtifactDefinition) GetExtension() string
func (*ArtifactDefinition) GetKey ¶
func (self *ArtifactDefinition) GetKey() string
tosca.Mappable interface
func (*ArtifactDefinition) GetURL ¶
func (self *ArtifactDefinition) GetURL() urlpkg.URL
func (*ArtifactDefinition) Inherit ¶
func (self *ArtifactDefinition) Inherit(parentDefinition *ArtifactDefinition)
type ArtifactDefinitions ¶
type ArtifactDefinitions map[string]*ArtifactDefinition
func (ArtifactDefinitions) Inherit ¶
func (self ArtifactDefinitions) Inherit(parentDefinitions ArtifactDefinitions)
type ArtifactType ¶
type ArtifactType struct { *Type `name:"artifact type"` PropertyDefinitions PropertyDefinitions `read:"properties,PropertyDefinition" inherit:"properties,Parent"` MIMEType *string `read:"mime_type" inherit:"mime_type,Parent"` FileExtension *[]string `read:"file_ext" inherit:"file_ext,Parent"` Parent *ArtifactType `lookup:"derived_from,ParentName" json:"-" yaml:"-"` }
func NewArtifactType ¶
func NewArtifactType(context *tosca.Context) *ArtifactType
func (*ArtifactType) GetParent ¶
func (self *ArtifactType) GetParent() tosca.EntityPtr
tosca.Hierarchical interface
type ArtifactTypes ¶
type ArtifactTypes []*ArtifactType
type Artifacts ¶
func (Artifacts) Normalize ¶
func (self Artifacts) Normalize(normalNodeTemplate *normal.NodeTemplate)
type AttributeDefinition ¶
type AttributeDefinition struct { *Entity `name:"attribute definition"` Name string Metadata Metadata `read:"metadata,Metadata"` // introduced in TOSCA 1.3 Description *string `read:"description"` DataTypeName *string `read:"type"` // required only if cannot be inherited or discovered KeySchema *Schema `read:"key_schema,Schema"` // introduced in TOSCA 1.3 EntrySchema *Schema `read:"entry_schema,Schema"` // required if list or map Default *Value `read:"default,Value"` Status *string `read:"status"` DataType *DataType `lookup:"type,DataTypeName" json:"-" yaml:"-"` // contains filtered or unexported fields }
func NewAttributeDefinition ¶
func NewAttributeDefinition(context *tosca.Context) *AttributeDefinition
func (*AttributeDefinition) GetKey ¶
func (self *AttributeDefinition) GetKey() string
tosca.Mappable interface
func (*AttributeDefinition) GetTypeInformation ¶
func (self *AttributeDefinition) GetTypeInformation() *normal.TypeInformation
func (*AttributeDefinition) Inherit ¶
func (self *AttributeDefinition) Inherit(parentDefinition *AttributeDefinition)
func (*AttributeDefinition) Render ¶
func (self *AttributeDefinition) Render()
parser.Renderable interface
type AttributeDefinitions ¶
type AttributeDefinitions map[string]*AttributeDefinition
func (AttributeDefinitions) Inherit ¶
func (self AttributeDefinitions) Inherit(parentDefinitions AttributeDefinitions)
type AttributeMapping ¶
type AttributeMapping struct { *Entity `name:"attribute mapping"` NodeTemplateName *string `require:"0"` AttributeName *string `require:"1"` NodeTemplate *NodeTemplate `lookup:"0,NodeTemplateName" json:"-" yaml:"-"` }
func NewAttributeMapping ¶
func NewAttributeMapping(context *tosca.Context) *AttributeMapping
func (*AttributeMapping) Render ¶
func (self *AttributeMapping) Render()
parser.Renderable interface
type AttributeMappings ¶
type AttributeMappings []*AttributeMapping
type CapabilityAssignment ¶
type CapabilityAssignment struct { *Entity `name:"capability"` Name string Properties Values `read:"properties,Value"` Attributes Values `read:"attributes,AttributeValue"` Occurrences *RangeEntity `read:"occurrences,RangeEntity"` // introduced in TOSCA 1.3 }
func NewCapabilityAssignment ¶
func NewCapabilityAssignment(context *tosca.Context) *CapabilityAssignment
func (*CapabilityAssignment) GetDefinition ¶
func (self *CapabilityAssignment) GetDefinition(nodeTemplate *NodeTemplate) (*CapabilityDefinition, bool)
func (*CapabilityAssignment) GetKey ¶
func (self *CapabilityAssignment) GetKey() string
tosca.Mappable interface
func (*CapabilityAssignment) Normalize ¶
func (self *CapabilityAssignment) Normalize(normalNodeTemplate *normal.NodeTemplate, definition *CapabilityDefinition) *normal.Capability
func (*CapabilityAssignment) Render ¶
func (self *CapabilityAssignment) Render(definition *CapabilityDefinition)
type CapabilityAssignments ¶
type CapabilityAssignments map[string]*CapabilityAssignment
func (CapabilityAssignments) Normalize ¶
func (self CapabilityAssignments) Normalize(nodeTemplate *NodeTemplate, n *normal.NodeTemplate)
func (CapabilityAssignments) Render ¶
func (self CapabilityAssignments) Render(definitions CapabilityDefinitions, context *tosca.Context)
type CapabilityDefinition ¶
type CapabilityDefinition struct { *Entity `name:"capability definition"` Name string Description *string `read:"description"` CapabilityTypeName *string `read:"type"` // required only if cannot be inherited PropertyDefinitions PropertyDefinitions `read:"properties,PropertyDefinition" inherit:"properties,CapabilityType"` AttributeDefinitions AttributeDefinitions `read:"attributes,PropertyDefinition" inherit:"attributes,CapabilityType"` ValidSourceNodeTypeNames *[]string `read:"valid_source_types" inherit:"valid_source_types,CapabilityType"` Occurrences *RangeEntity `read:"occurrences,RangeEntity"` CapabilityType *CapabilityType `lookup:"type,CapabilityTypeName" json:"-" yaml:"-"` ValidSourceNodeTypes NodeTypes `lookup:"valid_source_types,ValidSourceNodeTypeNames" apply:"valid_source_types,CapabilityType" json:"-" yaml:"-"` // contains filtered or unexported fields }
func NewCapabilityDefinition ¶
func NewCapabilityDefinition(context *tosca.Context) *CapabilityDefinition
func (*CapabilityDefinition) GetKey ¶
func (self *CapabilityDefinition) GetKey() string
tosca.Mappable interface
func (*CapabilityDefinition) Inherit ¶
func (self *CapabilityDefinition) Inherit(parentDefinition *CapabilityDefinition)
func (*CapabilityDefinition) Render ¶
func (self *CapabilityDefinition) Render()
parser.Renderable interface
type CapabilityDefinitions ¶
type CapabilityDefinitions map[string]*CapabilityDefinition
func (CapabilityDefinitions) Inherit ¶
func (self CapabilityDefinitions) Inherit(parentDefinitions CapabilityDefinitions)
type CapabilityFilter ¶
type CapabilityFilter struct { *Entity `name:"capability filter"` Name string PropertyFilters PropertyFilters `read:"properties,PropertyFilter"` }
func NewCapabilityFilter ¶
func NewCapabilityFilter(context *tosca.Context) *CapabilityFilter
func (CapabilityFilter) Normalize ¶
func (self CapabilityFilter) Normalize(normalRequirement *normal.Requirement) normal.FunctionCallMap
type CapabilityFilters ¶
type CapabilityFilters []*CapabilityFilter
func (CapabilityFilters) Normalize ¶
func (self CapabilityFilters) Normalize(normalRequirement *normal.Requirement)
type CapabilityMapping ¶
type CapabilityMapping struct { *Entity `name:"capability mapping"` NodeTemplateName *string `require:"0"` CapabilityName *string `require:"1"` NodeTemplate *NodeTemplate `lookup:"0,NodeTemplateName" json:"-" yaml:"-"` }
func NewCapabilityMapping ¶
func NewCapabilityMapping(context *tosca.Context) *CapabilityMapping
func (*CapabilityMapping) Render ¶
func (self *CapabilityMapping) Render()
parser.Renderable interface
type CapabilityMappings ¶
type CapabilityMappings []*CapabilityMapping
type CapabilityType ¶
type CapabilityType struct { *Type `name:"capability type"` PropertyDefinitions PropertyDefinitions `read:"properties,PropertyDefinition" inherit:"properties,Parent"` AttributeDefinitions AttributeDefinitions `read:"attributes,AttributeDefinition" inherit:"attributes,Parent"` ValidSourceNodeTypeNames *[]string `read:"valid_source_types" inherit:"valid_source_types,Parent"` Parent *CapabilityType `lookup:"derived_from,ParentName" json:"-" yaml:"-"` ValidSourceNodeTypes NodeTypes `lookup:"valid_source_types,ValidSourceNodeTypeNames" inherit:"valid_source_types,Parent" json:"-" yaml:"-"` }
func NewCapabilityType ¶
func NewCapabilityType(context *tosca.Context) *CapabilityType
func (*CapabilityType) GetParent ¶
func (self *CapabilityType) GetParent() tosca.EntityPtr
tosca.Hierarchical interface
type CapabilityTypes ¶
type CapabilityTypes []*CapabilityType
type ConditionClause ¶
type ConditionClause struct {
*Entity `name:"condition clause"`
}
func NewConditionClause ¶
func NewConditionClause(context *tosca.Context) *ConditionClause
type ConditionClauses ¶
type ConditionClauses []*ConditionClause
type ConstraintClause ¶
type ConstraintClause struct { *Entity `name:"constraint clause"` Operator string Arguments ard.List NativeArgumentIndexes []uint DataType *DataType `traverse:"ignore" json:"-" yaml:"-"` }
func NewConstraintClause ¶
func NewConstraintClause(context *tosca.Context) *ConstraintClause
func (*ConstraintClause) IsNativeArgument ¶
func (self *ConstraintClause) IsNativeArgument(index uint) bool
func (*ConstraintClause) ToFunctionCall ¶
func (self *ConstraintClause) ToFunctionCall(context *tosca.Context, strict bool) *tosca.FunctionCall
type ConstraintClauses ¶
type ConstraintClauses []*ConstraintClause
func (ConstraintClauses) Append ¶
func (self ConstraintClauses) Append(constraints ConstraintClauses) ConstraintClauses
func (ConstraintClauses) Normalize ¶
func (self ConstraintClauses) Normalize(context *tosca.Context) normal.FunctionCalls
func (ConstraintClauses) NormalizeConstrainable ¶
func (self ConstraintClauses) NormalizeConstrainable(context *tosca.Context, normalConstrainable normal.Constrainable)
func (ConstraintClauses) NormalizeListEntries ¶
func (self ConstraintClauses) NormalizeListEntries(context *tosca.Context, normalList *normal.List)
func (ConstraintClauses) NormalizeMapKeys ¶
func (self ConstraintClauses) NormalizeMapKeys(context *tosca.Context, normalMap *normal.Map)
func (ConstraintClauses) NormalizeMapValues ¶
func (self ConstraintClauses) NormalizeMapValues(context *tosca.Context, normalMap *normal.Map)
func (ConstraintClauses) Render ¶
func (self ConstraintClauses) Render(dataType *DataType)
type DataType ¶
type DataType struct { *Type `name:"data type"` PropertyDefinitions PropertyDefinitions `read:"properties,PropertyDefinition" inherit:"properties,Parent"` ConstraintClauses ConstraintClauses `read:"constraints,[]ConstraintClause"` KeySchema *Schema `read:"key_schema,Schema"` // introduced in TOSCA 1.3 EntrySchema *Schema `read:"entry_schema,Schema"` // introduced in TOSCA 1.3 Parent *DataType `lookup:"derived_from,ParentName" json:"-" yaml:"-"` }
func NewDataType ¶
func (*DataType) Complete ¶
Note that this may change the data (if it's a map), but that should be fine, because we intend for the data to be complete. For the same reason, this action is idempotent (subsequent calls to the same data will not have an effect).
func (*DataType) GetInternal ¶
func (*DataType) GetInternalTypeName ¶
func (*DataType) GetTypeInformation ¶
func (self *DataType) GetTypeInformation() *normal.TypeInformation
type Entity ¶
func (*Entity) GetContext ¶
tosca.Contextual interface
type EventFilter ¶
type EventFilter struct { *Entity `name:"event filter" json:"-" yaml:"-"` NodeTemplateNameOrTypeName *string `read:"node"` RequirementName *string `read:"requirement"` CapabilityName *string `read:"capability"` NodeTemplate *NodeTemplate `lookup:"node,NodeTemplateNameOrTypeName" json:"-" yaml:"-"` NodeType *NodeType `lookup:"node,NodeTemplateNameOrTypeName" json:"-" yaml:"-"` }
func NewEventFilter ¶
func NewEventFilter(context *tosca.Context) *EventFilter
type Group ¶
type Group struct { *Entity `name:"group"` Name string `namespace:""` GroupTypeName *string `read:"type" require:""` Metadata Metadata `read:"metadata,Metadata"` // introduced in TOSCA 1.1 Description *string `read:"description"` Properties Values `read:"properties,Value"` Interfaces InterfaceAssignments // removed in TOSCA 1.3 MemberNodeTemplateNames *[]string `read:"members"` GroupType *GroupType `lookup:"type,GroupTypeName" json:"-" yaml:"-"` MemberNodeTemplates []*NodeTemplate `lookup:"members,MemberNodeTemplateNames" json:"-" yaml:"-"` }
type GroupType ¶
type GroupType struct { *Type `name:"group type"` PropertyDefinitions PropertyDefinitions `read:"properties,PropertyDefinition" inherit:"properties,Parent"` CapabilityDefinitions CapabilityDefinitions `read:"capabilities,CapabilityDefinition" inherit:"capabilities,Parent"` RequirementDefinitions RequirementDefinitions `read:"requirements,{}RequirementDefinition" inherit:"requirements,Parent"` // sequenced list, but we read it into map InterfaceDefinitions InterfaceDefinitions `inherit:"interfaces,Parent"` // removed in TOSCA 1.3 MemberNodeTypeNames *[]string `read:"members" inherit:"members,Parent"` Parent *GroupType `lookup:"derived_from,ParentName" inherit:"members,Parent" json:"-" yaml:"-"` MemberNodeTypes NodeTypes `lookup:"members,MemberNodeTypeNames" inherit:"members,Parent" json:"-" yaml:"-"` }
func NewGroupType ¶
type GroupTypes ¶
type GroupTypes []*GroupType
func (GroupTypes) IsCompatible ¶
func (self GroupTypes) IsCompatible(groupType *GroupType) bool
func (GroupTypes) ValidateSubset ¶
func (self GroupTypes) ValidateSubset(subset GroupTypes, context *tosca.Context) bool
type Groups ¶
type Groups []*Group
func (Groups) Normalize ¶
func (self Groups) Normalize(normalServiceTemplate *normal.ServiceTemplate)
type HasComparer ¶
type HasComparer interface {
SetComparer(comparer string)
}
type Import ¶
type Import struct { *Entity `name:"import" json:"-" yaml:"-"` URL *string `read:"url" require:""` // renamed in TOSCA 2.0 RepositoryName *string `read:"repository"` Namespace *string `read:"namespace"` // renamed in TOSCA 2.0 NamespaceURI *string /// removed in TOSCA 2.0 Repository *Repository `lookup:"repository,RepositoryName" json:"-" yaml:"-"` }
func (*Import) NewImportSpec ¶
func (self *Import) NewImportSpec(unit *Unit) (*tosca.ImportSpec, bool)
type InterfaceAssignment ¶
type InterfaceAssignment struct { *Entity `name:"interface" json:"-" yaml:"-"` Name string Inputs Values `read:"inputs,Value"` Operations OperationAssignments `read:"operations,OperationAssignment"` // keyword since TOSCA 1.3 Notifications NotificationAssignments `read:"notifications,NotificationAssignment"` // introduced in TOSCA 1.3 }
func NewInterfaceAssignment ¶
func NewInterfaceAssignment(context *tosca.Context) *InterfaceAssignment
func (*InterfaceAssignment) GetDefinitionForGroup ¶
func (self *InterfaceAssignment) GetDefinitionForGroup(group *Group) (*InterfaceDefinition, bool)
func (*InterfaceAssignment) GetDefinitionForNodeTemplate ¶
func (self *InterfaceAssignment) GetDefinitionForNodeTemplate(nodeTemplate *NodeTemplate) (*InterfaceDefinition, bool)
func (*InterfaceAssignment) GetDefinitionForRelationship ¶
func (self *InterfaceAssignment) GetDefinitionForRelationship(relationship *RelationshipAssignment, relationshipDefinition *RelationshipDefinition) (*InterfaceDefinition, bool)
func (*InterfaceAssignment) GetKey ¶
func (self *InterfaceAssignment) GetKey() string
tosca.Mappable interface
func (*InterfaceAssignment) Normalize ¶
func (self *InterfaceAssignment) Normalize(normalInterface *normal.Interface, definition *InterfaceDefinition)
func (*InterfaceAssignment) Render ¶
func (self *InterfaceAssignment) Render(definition *InterfaceDefinition)
type InterfaceAssignments ¶
type InterfaceAssignments map[string]*InterfaceAssignment
func (InterfaceAssignments) CopyUnassigned ¶
func (self InterfaceAssignments) CopyUnassigned(assignments InterfaceAssignments)
func (InterfaceAssignments) NormalizeForGroup ¶
func (self InterfaceAssignments) NormalizeForGroup(group *Group, normalGroup *normal.Group)
func (InterfaceAssignments) NormalizeForNodeTemplate ¶
func (self InterfaceAssignments) NormalizeForNodeTemplate(nodeTemplate *NodeTemplate, normalNodeTemplate *normal.NodeTemplate)
func (InterfaceAssignments) NormalizeForRelationship ¶
func (self InterfaceAssignments) NormalizeForRelationship(relationship *RelationshipAssignment, relationshipDefinition *RelationshipDefinition, normalRelationship *normal.Relationship)
func (InterfaceAssignments) Render ¶
func (self InterfaceAssignments) Render(definitions InterfaceDefinitions, context *tosca.Context)
type InterfaceDefinition ¶
type InterfaceDefinition struct { *Entity `name:"interface definition" json:"-" yaml:"-"` Name string InterfaceTypeName *string `read:"type"` // required only if cannot be inherited InputDefinitions PropertyDefinitions `read:"inputs,PropertyDefinition" inherit:"inputs,InterfaceType"` OperationDefinitions OperationDefinitions `read:"operations,OperationDefinition" inherit:"operations,InterfaceType"` // keyword since TOSCA 1.3 NotificationDefinitions NotificationDefinitions `read:"notifications,NotificationDefinition" inherit:"notifications,InterfaceType"` // introduced in TOSCA 1.3 InterfaceType *InterfaceType `lookup:"type,InterfaceTypeName" json:"-" yaml:"-"` // contains filtered or unexported fields }
func NewInterfaceDefinition ¶
func NewInterfaceDefinition(context *tosca.Context) *InterfaceDefinition
func (*InterfaceDefinition) GetKey ¶
func (self *InterfaceDefinition) GetKey() string
tosca.Mappable interface
func (*InterfaceDefinition) Inherit ¶
func (self *InterfaceDefinition) Inherit(parentDefinition *InterfaceDefinition)
func (*InterfaceDefinition) Render ¶
func (self *InterfaceDefinition) Render()
parser.Renderable interface
type InterfaceDefinitions ¶
type InterfaceDefinitions map[string]*InterfaceDefinition
func (InterfaceDefinitions) Inherit ¶
func (self InterfaceDefinitions) Inherit(parentDefinitions InterfaceDefinitions)
type InterfaceImplementation ¶
type InterfaceImplementation struct { *Entity `name:"interface implementation"` Primary *string `read:"primary"` Dependencies *[]string `read:"dependencies"` Timeout *int64 `read:"timeout"` // introduced in TOSCA 1.2 OperationHost *string `read:"operation_host"` // introduced in TOSCA 1.2 }
func NewInterfaceImplementation ¶
func NewInterfaceImplementation(context *tosca.Context) *InterfaceImplementation
func (*InterfaceImplementation) NormalizeNotification ¶
func (self *InterfaceImplementation) NormalizeNotification(normalNotification *normal.Notification)
func (*InterfaceImplementation) NormalizeOperation ¶
func (self *InterfaceImplementation) NormalizeOperation(normalOperation *normal.Operation)
func (*InterfaceImplementation) Render ¶
func (self *InterfaceImplementation) Render(definition *InterfaceImplementation)
type InterfaceMapping ¶
type InterfaceMapping struct { *Entity `name:"interface mapping"` NodeTemplateName *string `require:"0"` InterfaceName *string `require:"1"` NodeTemplate *NodeTemplate `lookup:"0,NodeTemplateName" json:"-" yaml:"-"` }
func NewInterfaceMapping ¶
func NewInterfaceMapping(context *tosca.Context) *InterfaceMapping
func (*InterfaceMapping) Render ¶
func (self *InterfaceMapping) Render()
parser.Renderable interface
type InterfaceMappings ¶
type InterfaceMappings []*InterfaceMapping
type InterfaceType ¶
type InterfaceType struct { *Type `name:"interface type"` InputDefinitions PropertyDefinitions `read:"inputs,PropertyDefinition" inherit:"inputs,Parent"` OperationDefinitions OperationDefinitions `read:"operations,OperationDefinition" inherit:"operations,Parent"` NotificationDefinitions NotificationDefinitions `read:"notifications,NotificationDefinition" inherit:"notifications,Parent"` // introduced in TOSCA 1.3 Parent *InterfaceType `lookup:"derived_from,ParentName" json:"-" yaml:"-"` }
func NewInterfaceType ¶
func NewInterfaceType(context *tosca.Context) *InterfaceType
func (*InterfaceType) GetParent ¶
func (self *InterfaceType) GetParent() tosca.EntityPtr
tosca.Hierarchical interface
type InterfaceTypes ¶
type InterfaceTypes []*InterfaceType
type NodeFilter ¶
type NodeFilter struct { *Entity `name:"node filter"` PropertyFilters PropertyFilters `read:"properties,PropertyFilter"` CapabilityFilters CapabilityFilters `read:"capabilities,{}CapabilityFilter"` }
func NewNodeFilter ¶
func NewNodeFilter(context *tosca.Context) *NodeFilter
func (*NodeFilter) Normalize ¶
func (self *NodeFilter) Normalize(normalRequirement *normal.Requirement)
type NodeTemplate ¶
type NodeTemplate struct { *Entity `name:"node template"` Name string `namespace:""` Directives *[]string `read:"directives"` CopyNodeTemplateName *string `read:"copy"` NodeTypeName *string `read:"type" require:""` Metadata Metadata `read:"metadata,Metadata"` // introduced in TOSCA 1.1 Description *string `read:"description"` Properties Values `read:"properties,Value"` Attributes Values `read:"attributes,AttributeValue"` Capabilities CapabilityAssignments `read:"capabilities,CapabilityAssignment"` Requirements RequirementAssignments `read:"requirements,{}RequirementAssignment"` RequirementTargetsNodeFilter *NodeFilter `read:"node_filter,NodeFilter"` Interfaces InterfaceAssignments `read:"interfaces,InterfaceAssignment"` Artifacts Artifacts `read:"artifacts,Artifact"` CopyNodeTemplate *NodeTemplate `lookup:"copy,CopyNodeTemplateName" json:"-" yaml:"-"` NodeType *NodeType `lookup:"type,NodeTypeName" json:"-" yaml:"-"` // contains filtered or unexported fields }
func NewNodeTemplate ¶
func NewNodeTemplate(context *tosca.Context) *NodeTemplate
func (*NodeTemplate) Normalize ¶
func (self *NodeTemplate) Normalize(normalServiceTemplate *normal.ServiceTemplate) *normal.NodeTemplate
type NodeTemplates ¶
type NodeTemplates []*NodeTemplate
func (NodeTemplates) Normalize ¶
func (self NodeTemplates) Normalize(normalServiceTemplate *normal.ServiceTemplate)
type NodeType ¶
type NodeType struct { *Type `name:"node type"` PropertyDefinitions PropertyDefinitions `read:"properties,PropertyDefinition" inherit:"properties,Parent"` AttributeDefinitions AttributeDefinitions `read:"attributes,AttributeDefinition" inherit:"attributes,Parent"` CapabilityDefinitions CapabilityDefinitions `read:"capabilities,CapabilityDefinition" inherit:"capabilities,Parent"` RequirementDefinitions RequirementDefinitions `read:"requirements,{}RequirementDefinition" inherit:"requirements,Parent"` // sequenced list, but we read it into map InterfaceDefinitions InterfaceDefinitions `read:"interfaces,InterfaceDefinition" inherit:"interfaces,Parent"` ArtifactDefinitions ArtifactDefinitions `read:"artifacts,ArtifactDefinition" inherit:"artifacts,Parent"` Parent *NodeType `lookup:"derived_from,ParentName" json:"-" yaml:"-"` }
func NewNodeType ¶
type NotificationAssignment ¶
type NotificationAssignment struct { *Entity `name:"notification"` Name string Description *string `read:"description"` Implementation *InterfaceImplementation `read:"implementation,InterfaceImplementation"` Outputs OutputMappings `read:"outputs,OutputMapping"` }
func NewNotificationAssignment ¶
func NewNotificationAssignment(context *tosca.Context) *NotificationAssignment
func (*NotificationAssignment) GetKey ¶
func (self *NotificationAssignment) GetKey() string
tosca.Mappable interface
func (*NotificationAssignment) Normalize ¶
func (self *NotificationAssignment) Normalize(normalInterface *normal.Interface) *normal.Notification
type NotificationAssignments ¶
type NotificationAssignments map[string]*NotificationAssignment
func (NotificationAssignments) CopyUnassigned ¶
func (self NotificationAssignments) CopyUnassigned(assignments NotificationAssignments)
func (NotificationAssignments) Normalize ¶
func (self NotificationAssignments) Normalize(normalInterface *normal.Interface)
func (NotificationAssignments) Render ¶
func (self NotificationAssignments) Render(definitions NotificationDefinitions, context *tosca.Context)
type NotificationDefinition ¶
type NotificationDefinition struct { *Entity `name:"notification definition"` Name string Description *string `read:"description"` Implementation *InterfaceImplementation `read:"implementation,InterfaceImplementation"` Outputs OutputMappings `read:"outputs,OutputMapping"` }
func NewNotificationDefinition ¶
func NewNotificationDefinition(context *tosca.Context) *NotificationDefinition
func (*NotificationDefinition) GetKey ¶
func (self *NotificationDefinition) GetKey() string
tosca.Mappable interface
func (*NotificationDefinition) Inherit ¶
func (self *NotificationDefinition) Inherit(parentDefinition *NotificationDefinition)
type NotificationDefinitions ¶
type NotificationDefinitions map[string]*NotificationDefinition
func (NotificationDefinitions) Inherit ¶
func (self NotificationDefinitions) Inherit(parentDefinitions NotificationDefinitions)
type OperationAssignment ¶
type OperationAssignment struct { *Entity `name:"operation"` Name string Description *string `read:"description"` Implementation *InterfaceImplementation `read:"implementation,InterfaceImplementation"` Inputs Values `read:"inputs,Value"` Outputs OutputMappings `read:"outputs,OutputMapping"` // introduced in TOSCA 1.3 }
func NewOperationAssignment ¶
func NewOperationAssignment(context *tosca.Context) *OperationAssignment
func (*OperationAssignment) GetKey ¶
func (self *OperationAssignment) GetKey() string
tosca.Mappable interface
type OperationAssignments ¶
type OperationAssignments map[string]*OperationAssignment
func (OperationAssignments) CopyUnassigned ¶
func (self OperationAssignments) CopyUnassigned(assignments OperationAssignments)
func (OperationAssignments) Normalize ¶
func (self OperationAssignments) Normalize(normalInterface *normal.Interface)
func (OperationAssignments) Render ¶
func (self OperationAssignments) Render(definitions OperationDefinitions, context *tosca.Context)
type OperationDefinition ¶
type OperationDefinition struct { *Entity `name:"operation definition"` Name string Description *string `read:"description"` Implementation *InterfaceImplementation `read:"implementation,InterfaceImplementation"` InputDefinitions PropertyDefinitions `read:"inputs,PropertyDefinition"` Outputs OutputMappings `read:"outputs,OutputMapping"` // introduced in TOSCA 1.3 }
func NewOperationDefinition ¶
func NewOperationDefinition(context *tosca.Context) *OperationDefinition
func (*OperationDefinition) GetKey ¶
func (self *OperationDefinition) GetKey() string
tosca.Mappable interface
func (*OperationDefinition) Inherit ¶
func (self *OperationDefinition) Inherit(parentDefinition *OperationDefinition)
func (*OperationDefinition) Normalize ¶
func (self *OperationDefinition) Normalize(normalOperation *normal.Operation)
type OperationDefinitions ¶
type OperationDefinitions map[string]*OperationDefinition
func (OperationDefinitions) Inherit ¶
func (self OperationDefinitions) Inherit(parentDefinitions OperationDefinitions)
type OutputMapping ¶ added in v0.16.0
type OutputMapping struct { *Entity `name:"output mapping"` Name string NodeTemplateName *string `require:"0"` AttributeName *string `require:"1"` }
func NewOutputMapping ¶ added in v0.16.0
func NewOutputMapping(context *tosca.Context) *OutputMapping
func (*OutputMapping) GetKey ¶ added in v0.16.0
func (self *OutputMapping) GetKey() string
tosca.Mappable interface
func (*OutputMapping) Normalize ¶ added in v0.16.0
func (self *OutputMapping) Normalize(name string, normalNodeTemplate *normal.NodeTemplate, normalAttributeMappings normal.AttributeMappings)
type OutputMappings ¶ added in v0.16.0
type OutputMappings map[string]*OutputMapping
func (OutputMappings) CopyUnassigned ¶ added in v0.16.0
func (self OutputMappings) CopyUnassigned(outputMappings OutputMappings)
func (OutputMappings) Inherit ¶ added in v0.16.0
func (self OutputMappings) Inherit(parent OutputMappings)
func (OutputMappings) Normalize ¶ added in v0.16.0
func (self OutputMappings) Normalize(normalNodeTemplate *normal.NodeTemplate, normalAttributeMappings normal.AttributeMappings)
type ParameterDefinition ¶
type ParameterDefinition struct { *PropertyDefinition `name:"parameter definition"` Value *Value `read:"value,Value"` }
func NewParameterDefinition ¶
func NewParameterDefinition(context *tosca.Context) *ParameterDefinition
func (*ParameterDefinition) Normalize ¶
func (self *ParameterDefinition) Normalize(context *tosca.Context) normal.Constrainable
func (*ParameterDefinition) Render ¶
func (self *ParameterDefinition) Render(kind string)
type ParameterDefinitions ¶
type ParameterDefinitions map[string]*ParameterDefinition
func (ParameterDefinitions) Normalize ¶
func (self ParameterDefinitions) Normalize(c normal.Constrainables, context *tosca.Context)
type Policies ¶
type Policies []*Policy
func (Policies) Normalize ¶
func (self Policies) Normalize(normalServiceTemplate *normal.ServiceTemplate)
type Policy ¶
type Policy struct { *Entity `name:"policy"` Name string `namespace:""` PolicyTypeName *string `read:"type" require:""` Metadata Metadata `read:"metadata,Metadata"` // introduced in TOSCA 1.1 Description *string `read:"description"` Properties Values `read:"properties,Value"` TargetNodeTemplateOrGroupNames *[]string `read:"targets"` TriggerDefinitions TriggerDefinitions `read:"triggers,TriggerDefinition" inherit:"triggers,PolicyType"` // introduced in TOSCA 1.1 PolicyType *PolicyType `lookup:"type,PolicyTypeName" json:"-" yaml:"-"` TargetNodeTemplates NodeTemplates `lookup:"targets,TargetNodeTemplateOrGroupNames" json:"-" yaml:"-"` TargetGroups Groups `lookup:"targets,TargetNodeTemplateOrGroupNames" json:"-" yaml:"-"` }
type PolicyType ¶
type PolicyType struct { *Type `name:"policy type"` PropertyDefinitions PropertyDefinitions `read:"properties,PropertyDefinition" inherit:"properties,Parent"` TargetNodeTypeOrGroupTypeNames *[]string `read:"targets" inherit:"targets,Parent"` TriggerDefinitions TriggerDefinitions `read:"triggers,TriggerDefinition" inherit:"triggers,Parent"` // introduced in TOSCA 1.1 Parent *PolicyType `lookup:"derived_from,ParentName" json:"-" yaml:"-"` TargetNodeTypes NodeTypes `lookup:"targets,TargetNodeTypeOrGroupTypeNames" inherit:"targets,Parent" json:"-" yaml:"-"` TargetGroupTypes GroupTypes `lookup:"targets,TargetNodeTypeOrGroupTypeNames" inherit:"targets,Parent" json:"-" yaml:"-"` }
func NewPolicyType ¶
func NewPolicyType(context *tosca.Context) *PolicyType
func (*PolicyType) GetParent ¶
func (self *PolicyType) GetParent() tosca.EntityPtr
tosca.Hierarchical interface
type PolicyTypes ¶
type PolicyTypes []*PolicyType
type PropertyDefinition ¶
type PropertyDefinition struct { *AttributeDefinition `name:"property definition"` Required *bool `read:"required"` ConstraintClauses ConstraintClauses `read:"constraints,[]ConstraintClause"` }
func NewPropertyDefinition ¶
func NewPropertyDefinition(context *tosca.Context) *PropertyDefinition
func (*PropertyDefinition) Inherit ¶
func (self *PropertyDefinition) Inherit(parentDefinition *PropertyDefinition)
func (*PropertyDefinition) IsRequired ¶
func (self *PropertyDefinition) IsRequired() bool
func (*PropertyDefinition) Render ¶
func (self *PropertyDefinition) Render()
parser.Renderable interface
type PropertyDefinitions ¶
type PropertyDefinitions map[string]*PropertyDefinition
func (PropertyDefinitions) Inherit ¶
func (self PropertyDefinitions) Inherit(parentDefinitions PropertyDefinitions)
type PropertyFilter ¶
type PropertyFilter struct { *Entity `name:"property filter"` Name string ConstraintClauses ConstraintClauses }
func NewPropertyFilter ¶
func NewPropertyFilter(context *tosca.Context) *PropertyFilter
func (*PropertyFilter) GetKey ¶
func (self *PropertyFilter) GetKey() string
tosca.Mappable interface
func (*PropertyFilter) Normalize ¶
func (self *PropertyFilter) Normalize(normalFunctionCallMap normal.FunctionCallMap) normal.FunctionCalls
type PropertyFilters ¶
type PropertyFilters map[string]*PropertyFilter
func (PropertyFilters) Normalize ¶
func (self PropertyFilters) Normalize(normalFunctionCallMap normal.FunctionCallMap)
type PropertyMapping ¶
type PropertyMapping struct { *Entity `name:"property mapping"` NodeTemplateName *string `require:"0"` PropertyName *string `require:"1"` NodeTemplate *NodeTemplate `lookup:"0,NodeTemplateName" json:"-" yaml:"-"` }
func NewPropertyMapping ¶
func NewPropertyMapping(context *tosca.Context) *PropertyMapping
type PropertyMappings ¶
type PropertyMappings []*PropertyMapping
type Range ¶
type RangeEntity ¶
func NewRangeEntity ¶
func NewRangeEntity(context *tosca.Context) *RangeEntity
type RelationshipAssignment ¶
type RelationshipAssignment struct { *Entity `name:"relationship"` RelationshipTemplateNameOrTypeName *string `read:"type"` Properties Values `read:"properties,Value"` Attributes Values `read:"attributes,AttributeValue"` // missing in spec Interfaces InterfaceAssignments `read:"interfaces,InterfaceAssignment"` RelationshipTemplate *RelationshipTemplate `lookup:"type,RelationshipTemplateNameOrTypeName" json:"-" yaml:"-"` RelationshipType *RelationshipType `lookup:"type,RelationshipTemplateNameOrTypeName" json:"-" yaml:"-"` }
func NewRelationshipAssignment ¶
func NewRelationshipAssignment(context *tosca.Context) *RelationshipAssignment
func (*RelationshipAssignment) GetType ¶
func (self *RelationshipAssignment) GetType(definition *RelationshipDefinition) *RelationshipType
func (*RelationshipAssignment) Normalize ¶
func (self *RelationshipAssignment) Normalize(definition *RelationshipDefinition, normalRelationship *normal.Relationship)
func (*RelationshipAssignment) Render ¶
func (self *RelationshipAssignment) Render(definition *RelationshipDefinition)
type RelationshipDefinition ¶
type RelationshipDefinition struct { *Entity `name:"relationship definition"` RelationshipTypeName *string `read:"type"` // required only if cannot be inherited InterfaceDefinitions InterfaceDefinitions `read:"interfaces,InterfaceDefinition" inherit:"interfaces,RelationshipType"` RelationshipType *RelationshipType `lookup:"type,RelationshipTypeName" json:"-" yaml:"-"` // contains filtered or unexported fields }
func NewRelationshipDefinition ¶
func NewRelationshipDefinition(context *tosca.Context) *RelationshipDefinition
func (*RelationshipDefinition) Inherit ¶
func (self *RelationshipDefinition) Inherit(parentDefinition *RelationshipDefinition)
func (*RelationshipDefinition) NewDefaultAssignment ¶
func (self *RelationshipDefinition) NewDefaultAssignment(context *tosca.Context) *RelationshipAssignment
func (*RelationshipDefinition) Render ¶
func (self *RelationshipDefinition) Render()
parser.Renderable interface
type RelationshipTemplate ¶
type RelationshipTemplate struct { *Entity `name:"relationship template"` Name string `namespace:""` CopyRelationshipTemplateName *string `read:"copy"` RelationshipTypeName *string `read:"type" require:""` Metadata Metadata `read:"metadata,Metadata"` // introduced in TOSCA 1.1 Description *string `read:"description"` Properties Values `read:"properties,Value"` Attributes Values `read:"attributes,AttributeValue"` Interfaces InterfaceAssignments `read:"interfaces,InterfaceAssignment"` CopyRelationshipTemplate *RelationshipTemplate `lookup:"copy,CopyRelationshipTemplateName" json:"-" yaml:"-"` RelationshipType *RelationshipType `lookup:"type,RelationshipTypeName" json:"-" yaml:"-"` // contains filtered or unexported fields }
func NewRelationshipTemplate ¶
func NewRelationshipTemplate(context *tosca.Context) *RelationshipTemplate
func (*RelationshipTemplate) Normalize ¶ added in v0.16.0
func (self *RelationshipTemplate) Normalize(normalRelationship *normal.Relationship)
func (*RelationshipTemplate) PreRead ¶
func (self *RelationshipTemplate) PreRead()
tosca.PreReadable interface
func (*RelationshipTemplate) Render ¶
func (self *RelationshipTemplate) Render()
parser.Renderable interface
type RelationshipTemplates ¶
type RelationshipTemplates []*RelationshipTemplate
type RelationshipType ¶
type RelationshipType struct { *Type `name:"relationship type"` PropertyDefinitions PropertyDefinitions `read:"properties,PropertyDefinition" inherit:"properties,Parent"` AttributeDefinitions AttributeDefinitions `read:"attributes,AttributeDefinition" inherit:"attributes,Parent"` InterfaceDefinitions InterfaceDefinitions `read:"interfaces,InterfaceDefinition" inherit:"interfaces,Parent"` ValidTargetCapabilityTypeNames *[]string `read:"valid_target_types" inherit:"valid_target_types,Parent"` Parent *RelationshipType `lookup:"derived_from,ParentName" json:"-" yaml:"-"` ValidTargetCapabilityTypes CapabilityTypes `lookup:"valid_target_types,ValidTargetCapabilityTypeNames" inherit:"valid_target_types,Parent" json:"-" yaml:"-"` }
func NewRelationshipType ¶
func NewRelationshipType(context *tosca.Context) *RelationshipType
func (*RelationshipType) GetParent ¶
func (self *RelationshipType) GetParent() tosca.EntityPtr
tosca.Hierarchical interface
type RelationshipTypes ¶
type RelationshipTypes []*RelationshipType
type Repositories ¶
type Repositories []*Repository
type Repository ¶
type Repository struct { *Entity `name:"repository"` Name string `namespace:""` Description *string `read:"description"` URL *string `read:"url" require:""` Credential *Value `read:"credential,Value"` // tosca:Credential // contains filtered or unexported fields }
func NewRepository ¶
func NewRepository(context *tosca.Context) *Repository
func (*Repository) GetURL ¶
func (self *Repository) GetURL() urlpkg.URL
type RequirementAssignment ¶
type RequirementAssignment struct { *Entity `name:"requirement"` Name string TargetCapabilityNameOrTypeName *string `read:"capability"` TargetNodeTemplateNameOrTypeName *string `read:"node"` TargetNodeFilter *NodeFilter `read:"node_filter,NodeFilter"` Relationship *RelationshipAssignment `read:"relationship,RelationshipAssignment"` Occurrences *RangeEntity `read:"occurrences,RangeEntity"` // introduced in TOSCA 1.3 TargetCapabilityType *CapabilityType `lookup:"capability,?TargetCapabilityNameOrTypeName" json:"-" yaml:"-"` TargetNodeTemplate *NodeTemplate `lookup:"node,TargetNodeTemplateNameOrTypeName" json:"-" yaml:"-"` TargetNodeType *NodeType `lookup:"node,TargetNodeTemplateNameOrTypeName" json:"-" yaml:"-"` }
func NewDefaultRequirementAssignment ¶
func NewDefaultRequirementAssignment(index int, definition *RequirementDefinition, context *tosca.Context) *RequirementAssignment
func NewRequirementAssignment ¶
func NewRequirementAssignment(context *tosca.Context) *RequirementAssignment
func (*RequirementAssignment) GetDefinition ¶
func (self *RequirementAssignment) GetDefinition(nodeTemplate *NodeTemplate) (*RequirementDefinition, bool)
func (*RequirementAssignment) Normalize ¶
func (self *RequirementAssignment) Normalize(nodeTemplate *NodeTemplate, normalNodeTemplate *normal.NodeTemplate) *normal.Requirement
type RequirementAssignments ¶
type RequirementAssignments []*RequirementAssignment
func (RequirementAssignments) Normalize ¶
func (self RequirementAssignments) Normalize(nodeTemplate *NodeTemplate, normalNodeTemplate *normal.NodeTemplate)
func (*RequirementAssignments) Render ¶
func (self *RequirementAssignments) Render(definitions RequirementDefinitions, context *tosca.Context)
type RequirementDefinition ¶
type RequirementDefinition struct { *Entity `name:"requirement definition"` Name string TargetCapabilityTypeName *string `read:"capability"` // required only if cannot be inherited TargetNodeTypeName *string `read:"node"` RelationshipDefinition *RelationshipDefinition `read:"relationship,RelationshipDefinition"` Occurrences *RangeEntity `read:"occurrences,RangeEntity"` TargetCapabilityType *CapabilityType `lookup:"capability,TargetCapabilityTypeName" json:"-" yaml:"-"` TargetNodeType *NodeType `lookup:"node,TargetNodeTypeName" json:"-" yaml:"-"` // contains filtered or unexported fields }
func NewRequirementDefinition ¶
func NewRequirementDefinition(context *tosca.Context) *RequirementDefinition
func (*RequirementDefinition) GetKey ¶
func (self *RequirementDefinition) GetKey() string
tosca.Mappable interface
func (*RequirementDefinition) Inherit ¶
func (self *RequirementDefinition) Inherit(parentDefinition *RequirementDefinition)
func (RequirementDefinition) Render ¶
func (self RequirementDefinition) Render()
parser.Renderable interface
type RequirementDefinitions ¶
type RequirementDefinitions map[string]*RequirementDefinition
func (RequirementDefinitions) Inherit ¶
func (self RequirementDefinitions) Inherit(parentDefinitions RequirementDefinitions)
type RequirementMapping ¶
type RequirementMapping struct { *Entity `name:"requirement mapping"` NodeTemplateName *string `require:"0"` RequirementName *string `require:"1"` NodeTemplate *NodeTemplate `lookup:"0,NodeTemplateName" json:"-" yaml:"-"` }
func NewRequirementMapping ¶
func NewRequirementMapping(context *tosca.Context) *RequirementMapping
func (*RequirementMapping) Render ¶
func (self *RequirementMapping) Render()
parser.Renderable interface
type RequirementMappings ¶
type RequirementMappings []*RequirementMapping
type ScalarUnit ¶
type ScalarUnit struct { CanonicalString string `json:"$string" yaml:"$string"` CanonicalNumber interface{} `json:"$number" yaml:"$number"` // float64 or uint64 OriginalString string `json:"$originalString" yaml:"$originalString"` Scalar float64 `json:"scalar" yaml:"scalar"` Unit string `json:"unit" yaml:"unit"` // contains filtered or unexported fields }
func ReadScalarUnit ¶
func (*ScalarUnit) Compare ¶
func (self *ScalarUnit) Compare(data interface{}) (int, error)
type ScalarUnitMeasures ¶
type Schema ¶
type Schema struct { *Entity `name:"schema"` DataTypeName *string `read:"type" require:""` Description *string `read:"description"` ConstraintClauses ConstraintClauses `read:"constraints,[]ConstraintClause"` DataType *DataType `lookup:"type,DataTypeName" json:"-" yaml:"-"` // contains filtered or unexported fields }
func (*Schema) GetConstraints ¶
func (self *Schema) GetConstraints() ConstraintClauses
func (*Schema) LookupDataType ¶
type ServiceTemplate ¶
type ServiceTemplate struct { *Unit `name:"service template"` TopologyTemplate *TopologyTemplate `read:"topology_template,TopologyTemplate"` }
func NewServiceTemplate ¶
func NewServiceTemplate(context *tosca.Context) *ServiceTemplate
func (*ServiceTemplate) NormalizeServiceTemplate ¶
func (self *ServiceTemplate) NormalizeServiceTemplate() *normal.ServiceTemplate
normal.Normalizable interface
type SubstitutionMappings ¶
type SubstitutionMappings struct { *Entity `name:"substitution mappings"` NodeTypeName *string `read:"node_type" require:""` CapabilityMappings CapabilityMappings `read:"capabilities,CapabilityMapping"` RequirementMappings RequirementMappings `read:"requirements,RequirementMapping"` PropertyMappings PropertyMappings `read:"properties,PropertyMapping"` // introduced in TOSCA 1.2 AttributeMappings AttributeMappings `read:"attributes,AttributeMapping"` // introduced in TOSCA 1.3 InterfaceMappings InterfaceMappings `read:"interfaces,InterfaceMapping"` // introduced in TOSCA 1.2 SubstitutionFilter NodeFilter `read:"substitution_filter,NodeFilter"` // introduced in TOSCA 1.3 NodeType *NodeType `lookup:"node_type,NodeTypeName" json:"-" yaml:"-"` }
func NewSubstitutionMappings ¶
func NewSubstitutionMappings(context *tosca.Context) *SubstitutionMappings
func (*SubstitutionMappings) IsRequirementMapped ¶
func (self *SubstitutionMappings) IsRequirementMapped(nodeTemplate *NodeTemplate, requirementName string) bool
func (*SubstitutionMappings) Normalize ¶
func (self *SubstitutionMappings) Normalize(normalServiceTemplate *normal.ServiceTemplate) *normal.Substitution
type Timestamp ¶
type Timestamp struct { CanonicalNumber int64 `json:"$number" yaml:"$number"` CanonicalString string `json:"$string" yaml:"$string"` OriginalString string `json:"$originalString" yaml:"$originalString"` Year uint32 `json:"year" yaml:"year"` Month uint32 `json:"month" yaml:"month"` Day uint32 `json:"day" yaml:"day"` Hour uint32 `json:"hour" yaml:"hour"` Minute uint32 `json:"minute" yaml:"minute"` Second uint32 `json:"second" yaml:"second"` Fraction float64 `json:"fraction" yaml:"fraction"` TZSign string `json:"tzSign" yaml:"tzSign"` TZHour uint32 `json:"tzHour" yaml:"tzHour"` TZMinute uint32 `json:"tzMinute" yaml:"tzMinute"` }
type TopologyTemplate ¶
type TopologyTemplate struct { *Entity `name:"topology template"` Description *string `read:"description"` NodeTemplates NodeTemplates `read:"node_templates,NodeTemplate"` RelationshipTemplates RelationshipTemplates `read:"relationship_templates,RelationshipTemplate"` Groups Groups `read:"groups,Group"` Policies Policies `read:"policies,<>Policy"` InputParameterDefinitions ParameterDefinitions `read:"inputs,ParameterDefinition"` OutputParameterDefinitions ParameterDefinitions `read:"outputs,ParameterDefinition"` WorkflowDefinitions WorkflowDefinitions `read:"workflows,WorkflowDefinition"` SubstitutionMappings *SubstitutionMappings `read:"substitution_mappings,SubstitutionMappings"` }
func NewTopologyTemplate ¶
func NewTopologyTemplate(context *tosca.Context) *TopologyTemplate
func (*TopologyTemplate) GetNodeTemplatesOfType ¶
func (self *TopologyTemplate) GetNodeTemplatesOfType(nodeType *NodeType) []*NodeTemplate
func (*TopologyTemplate) Normalize ¶
func (self *TopologyTemplate) Normalize(normalServiceTemplate *normal.ServiceTemplate)
func (*TopologyTemplate) Render ¶
func (self *TopologyTemplate) Render()
parser.Renderable interface
type TriggerDefinition ¶
type TriggerDefinition struct { *Entity `name:"trigger definition" json:"-" yaml:"-"` Name string Description *string `read:"description"` Event *string `read:"event" require:""` Schedule *Value `read:"schedule,Value"` // tosca:TimeInterval TargetFilter *EventFilter `read:"target_filter,EventFilter"` Condition *TriggerDefinitionCondition `read:"condition,TriggerDefinitionCondition"` Action WorkflowActivityDefinitions `read:"action,[]WorkflowActivityDefinition" require:""` }
func NewTriggerDefinition ¶
func NewTriggerDefinition(context *tosca.Context) *TriggerDefinition
func (*TriggerDefinition) GetKey ¶
func (self *TriggerDefinition) GetKey() string
tosca.Mappable interface
func (*TriggerDefinition) Normalize ¶
func (self *TriggerDefinition) Normalize(normalPolicy *normal.Policy) *normal.PolicyTrigger
func (*TriggerDefinition) Render ¶
func (self *TriggerDefinition) Render()
parser.Renderable interface
type TriggerDefinitionCondition ¶
type TriggerDefinitionCondition struct { *Entity `name:"trigger definition condition" json:"-" yaml:"-"` ConstraintClauses ConstraintClauses `read:"constraint,[]ConstraintClause"` // this should be "constraints"... Period *ScalarUnit `read:"period,scalar-unit.time"` Evaluations *int `read:"evaluations"` Method *string `read:"method"` }
func NewTriggerDefinitionCondition ¶
func NewTriggerDefinitionCondition(context *tosca.Context) *TriggerDefinitionCondition
type TriggerDefinitions ¶
type TriggerDefinitions map[string]*TriggerDefinition
func (TriggerDefinitions) Normalize ¶
func (self TriggerDefinitions) Normalize(normalPolicy *normal.Policy)
type Type ¶
type Type struct { *Entity `json:"-" yaml:"-"` Name string `namespace:""` ParentName *string `read:"derived_from"` Version *Version `read:"version,version"` Metadata Metadata `read:"metadata,!Metadata"` Description *string `read:"description"` // contains filtered or unexported fields }
func (*Type) GetDescription ¶
tosca.HasMetadata interface
func (*Type) GetMetadata ¶
tosca.HasMetadata interface
type Unit ¶
type Unit struct { *Entity `name:"unit"` ToscaDefinitionsVersion *string `read:"tosca_definitions_version" require:""` Profile *string `read:"profile"` // introduced in TOSCA 1.2 as "namespace", renamed in TOSCA 2.0 Metadata Metadata `read:"metadata,!Metadata"` Description *string `read:"description"` Repositories Repositories `read:"repositories,Repository"` Imports Imports `read:"imports,[]Import"` ArtifactTypes ArtifactTypes `read:"artifact_types,ArtifactType" hierarchy:""` CapabilityTypes CapabilityTypes `read:"capability_types,CapabilityType" hierarchy:""` DataTypes DataTypes `read:"data_types,DataType" hierarchy:""` GroupTypes GroupTypes `read:"group_types,GroupType" hierarchy:""` InterfaceTypes InterfaceTypes `read:"interface_types,InterfaceType" hierarchy:""` NodeTypes NodeTypes `read:"node_types,NodeType" hierarchy:""` PolicyTypes PolicyTypes `read:"policy_types,PolicyType" hierarchy:""` RelationshipTypes RelationshipTypes `read:"relationship_types,RelationshipType" hierarchy:""` }
func (*Unit) GetImportSpecs ¶
func (self *Unit) GetImportSpecs() []*tosca.ImportSpec
parser.Importer interface
func (*Unit) Normalize ¶
func (self *Unit) Normalize(normalServiceTemplate *normal.ServiceTemplate)
type Value ¶
type Value struct { *Entity `name:"value"` Name string ConstraintClauses ConstraintClauses Description *string // contains filtered or unexported fields }
func (*Value) Normalize ¶
func (self *Value) Normalize() normal.Constrainable
func (*Value) RenderAttribute ¶
func (self *Value) RenderAttribute(dataType *DataType, definition *AttributeDefinition, bare bool, allowNil bool)
func (*Value) RenderDataType ¶
func (*Value) RenderProperty ¶
func (self *Value) RenderProperty(dataType *DataType, definition *PropertyDefinition)
type ValueList ¶
type ValueList struct { EntryConstraints ConstraintClauses Slice []interface{} }
func NewValueList ¶
func NewValueList(definition *AttributeDefinition, length int, entryConstraints ConstraintClauses) *ValueList
type ValueMap ¶
type ValueMap struct { KeyConstraints ConstraintClauses ValueConstraints ConstraintClauses Map ard.Map }
func NewValueMap ¶
func NewValueMap(definition *AttributeDefinition, keyConstraints ConstraintClauses, valueConstraints ConstraintClauses) *ValueMap
type Values ¶
func (Values) CopyUnassigned ¶
func (Values) Normalize ¶
func (self Values) Normalize(normalConstrainables normal.Constrainables)
func (Values) RenderAttributes ¶
func (self Values) RenderAttributes(definitions AttributeDefinitions, context *tosca.Context)
func (Values) RenderMissingValue ¶
func (Values) RenderProperties ¶
func (self Values) RenderProperties(definitions PropertyDefinitions, kind string, context *tosca.Context)
type Version ¶
type Version struct { CanonicalString string `json:"$string" yaml:"$string"` OriginalString string `json:"$originalString" yaml:"$originalString"` Comparer string `json:"$comparer" yaml:"$comparer"` Major uint32 `json:"major" yaml:"major"` Minor uint32 `json:"minor" yaml:"minor"` Fix uint32 `json:"fix" yaml:"fix"` Qualifier string `json:"qualifier" yaml:"qualifier"` Build uint32 `json:"build" yaml:"build"` }
func (*Version) SetComparer ¶
HasComparer interface
type WorkflowActivityCallOperation ¶
type WorkflowActivityCallOperation struct { *Entity `name:"workflow activity call operation"` Name string CallOperationSpec *string CallInterface *InterfaceAssignment `json:"-" yaml:"-"` CallOperation *OperationAssignment `json:"-" yaml:"-"` }
func NewWorkflowActivityCallOperation ¶
func NewWorkflowActivityCallOperation(context *tosca.Context) *WorkflowActivityCallOperation
func (*WorkflowActivityCallOperation) Render ¶
func (self *WorkflowActivityCallOperation) Render(stepDefinition *WorkflowStepDefinition)
type WorkflowActivityDefinition ¶
type WorkflowActivityDefinition struct { *Entity `name:"workflow activity definition"` DelegateWorkflowDefinitionName *string InlineWorkflowDefinitionName *string SetNodeState *string CallOperationSpec *string DelegateWorkflowDefinition *WorkflowDefinition `lookup:"delegate,DelegateWorkflowDefinitionName" json:"-" yaml:"-"` InlineWorkflowDefinition *WorkflowDefinition `lookup:"inline,InlineWorkflowDefinitionName" json:"-" yaml:"-"` CallInterface *InterfaceAssignment `json:"-" yaml:"-"` CallOperation *OperationAssignment `json:"-" yaml:"-"` }
func NewWorkflowActivityDefinition ¶
func NewWorkflowActivityDefinition(context *tosca.Context) *WorkflowActivityDefinition
func (*WorkflowActivityDefinition) Normalize ¶
func (self *WorkflowActivityDefinition) Normalize(normalWorkflowStep *normal.WorkflowStep) *normal.WorkflowActivity
func (*WorkflowActivityDefinition) Render ¶
func (self *WorkflowActivityDefinition) Render(stepDefinition *WorkflowStepDefinition)
type WorkflowActivityDefinitions ¶
type WorkflowActivityDefinitions []*WorkflowActivityDefinition
type WorkflowDefinition ¶
type WorkflowDefinition struct { *Entity `name:"workflow definition"` Name string `namespace:""` Metadata Metadata `read:"metadata,Metadata"` Description *string `read:"description"` InputDefinitions PropertyDefinitions `read:"inputs,PropertyDefinition"` PreconditionDefinitions WorkflowPreconditionDefinitions `read:"preconditions,WorkflowPreconditionDefinition"` StepDefinitions WorkflowStepDefinitions `read:"steps,WorkflowStepDefinition"` }
func NewWorkflowDefinition ¶
func NewWorkflowDefinition(context *tosca.Context) *WorkflowDefinition
func (*WorkflowDefinition) GetKey ¶
func (self *WorkflowDefinition) GetKey() string
tosca.Mappable interface
func (*WorkflowDefinition) Normalize ¶
func (self *WorkflowDefinition) Normalize(normalServiceTemplate *normal.ServiceTemplate) *normal.Workflow
func (*WorkflowDefinition) Render ¶
func (self *WorkflowDefinition) Render()
parser.Renderable interface
type WorkflowDefinitions ¶
type WorkflowDefinitions map[string]*WorkflowDefinition
func (WorkflowDefinitions) Normalize ¶
func (self WorkflowDefinitions) Normalize(normalServiceTemplate *normal.ServiceTemplate)
type WorkflowPreconditionDefinition ¶
type WorkflowPreconditionDefinition struct { *Entity `name:"workflow precondition definition"` TargetNodeTemplateOrGroupName *string `read:"target" require:""` TargetNodeRequirementName *string `read:"target_relationship"` ConditionClauses ConditionClauses `read:"condition,[]ConditionClause"` TargetNodeTemplate *NodeTemplate `lookup:"target,TargetNodeTemplateOrGroupName" json:"-" yaml:"-"` TargetGroup *Group `lookup:"target,TargetNodeTemplateOrGroupName" json:"-" yaml:"-"` }
func NewWorkflowPreconditionDefinition ¶
func NewWorkflowPreconditionDefinition(context *tosca.Context) *WorkflowPreconditionDefinition
type WorkflowPreconditionDefinitions ¶
type WorkflowPreconditionDefinitions []*WorkflowPreconditionDefinition
type WorkflowStepDefinition ¶
type WorkflowStepDefinition struct { *Entity `name:"workflow step definition"` Name string TargetNodeTemplateOrGroupName *string `read:"target" require:""` TargetNodeRequirementName *string `read:"target_relationship"` OperationHost *string `read:"operation_host"` FilterConditionClauses ConditionClauses `read:"filter,[]ConditionClause"` // spec is wrong, says constraint clause ActivityDefinitions WorkflowActivityDefinitions `read:"activities,[]WorkflowActivityDefinition" require:""` OnSuccessStepNames *[]string `read:"on_success"` OnFailureStepNames *[]string `read:"on_failure"` TargetNodeTemplate *NodeTemplate `lookup:"target,TargetNodeTemplateOrGroupName" json:"-" yaml:"-"` TargetGroup *Group `lookup:"target,TargetNodeTemplateOrGroupName" json:"-" yaml:"-"` OnSuccessSteps []*WorkflowStepDefinition // custom lookup OnFailureSteps []*WorkflowStepDefinition // custom lookup }
func NewWorkflowStepDefinition ¶
func NewWorkflowStepDefinition(context *tosca.Context) *WorkflowStepDefinition
func (*WorkflowStepDefinition) GetKey ¶
func (self *WorkflowStepDefinition) GetKey() string
tosca.Mappable interface
func (*WorkflowStepDefinition) Normalize ¶
func (self *WorkflowStepDefinition) Normalize(normalWorkflow *normal.Workflow) *normal.WorkflowStep
func (*WorkflowStepDefinition) NormalizeNext ¶
func (self *WorkflowStepDefinition) NormalizeNext(normalWorkflowStep *normal.WorkflowStep, normalWorkflow *normal.Workflow)
func (*WorkflowStepDefinition) Render ¶
func (self *WorkflowStepDefinition) Render(definitions WorkflowStepDefinitions)
type WorkflowStepDefinitions ¶
type WorkflowStepDefinitions map[string]*WorkflowStepDefinition
func (WorkflowStepDefinitions) Normalize ¶
func (self WorkflowStepDefinitions) Normalize(normalWorkflow *normal.Workflow)
func (WorkflowStepDefinitions) Render ¶
func (self WorkflowStepDefinitions) Render()
Source Files
¶
- artifact-definition.go
- artifact-type.go
- artifact.go
- attribute-definition.go
- attribute-mapping.go
- capability-assignment.go
- capability-definition.go
- capability-filter.go
- capability-mapping.go
- capability-type.go
- common.go
- condition-clause.go
- constraint-clause.go
- copy.go
- data-type.go
- entity.go
- event-filter.go
- functions.go
- group-type.go
- group.go
- import.go
- interface-assignment.go
- interface-definition.go
- interface-implementation.go
- interface-mapping.go
- interface-type.go
- metadata.go
- node-filter.go
- node-template.go
- node-type.go
- notification-assignment.go
- notification-definition.go
- operation-assignment.go
- operation-definition.go
- output-mapping.go
- parameter-definition.go
- policy-type.go
- policy.go
- property-definition.go
- property-filter.go
- property-mapping.go
- range.go
- relationship-assignment.go
- relationship-definition.go
- relationship-template.go
- relationship-type.go
- repository.go
- requirement-assignment.go
- requirement-definition.go
- requirement-mapping.go
- scalar-unit.go
- schema.go
- service-template.go
- substitution-mappings.go
- timestamp.go
- topology-template.go
- trigger-definition-condition.go
- trigger-definition.go
- type.go
- unit.go
- value.go
- version.go
- workflow-activity-call-operation.go
- workflow-activity-definition.go
- workflow-definition.go
- workflow-precondition-definition.go
- workflow-step-definition.go