cloudify_v1_3

package
v0.22.6 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultScriptletNamespace = parsing.NewScriptletNamespace()
View Source
var FunctionScriptlets = map[string]string{
	parsing.MetadataFunctionPrefix + "concat":         profiles.GetString(functionPathPrefix + "get_secret.js"),
	parsing.MetadataFunctionPrefix + "get_attribute":  profiles.GetString(functionPathPrefix + "get_attribute.js"),
	parsing.MetadataFunctionPrefix + "get_capability": profiles.GetString(functionPathPrefix + "get_capability.js"),
	parsing.MetadataFunctionPrefix + "get_input":      profiles.GetString(functionPathPrefix + "get_input.js"),
	parsing.MetadataFunctionPrefix + "get_property":   profiles.GetString(functionPathPrefix + "get_property.js"),
	parsing.MetadataFunctionPrefix + "get_secret":     profiles.GetString(functionPathPrefix + "get_secret.js"),
}
View Source
var Grammar = parsing.NewGrammar()

Functions

func NormalizeFunctionCallArguments

func NormalizeFunctionCallArguments(functionCall *parsing.FunctionCall, context *parsing.Context)

func ParseFunctionCall added in v0.21.0

func ParseFunctionCall(context *parsing.Context) bool

func ParseFunctionCalls added in v0.21.0

func ParseFunctionCalls(context *parsing.Context)

func ReadBlueprint

func ReadBlueprint(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadDSLResource

func ReadDSLResource(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadDataType

func ReadDataType(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadFile added in v0.21.0

func ReadFile(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadGroup

func ReadGroup(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadGroupPolicy

func ReadGroupPolicy(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadGroupPolicyTrigger

func ReadGroupPolicyTrigger(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadImport

func ReadImport(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadInput

func ReadInput(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadInterfaceAssignment

func ReadInterfaceAssignment(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadInterfaceDefinition

func ReadInterfaceDefinition(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadMetadata

func ReadMetadata(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadNodeTemplate

func ReadNodeTemplate(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadNodeTemplateCapability

func ReadNodeTemplateCapability(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadNodeTemplateInstances

func ReadNodeTemplateInstances(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadNodeType

func ReadNodeType(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadOperationAssignment

func ReadOperationAssignment(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadOperationDefinition

func ReadOperationDefinition(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadParameterDefinition

func ReadParameterDefinition(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadPlugin

func ReadPlugin(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadPolicy

func ReadPolicy(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadPolicyTriggerType

func ReadPolicyTriggerType(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadPolicyType

func ReadPolicyType(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadPropertyDefinition

func ReadPropertyDefinition(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadRelationshipAssignment

func ReadRelationshipAssignment(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadRelationshipType

func ReadRelationshipType(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadUploadResources

func ReadUploadResources(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadValue

func ReadValue(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadValueDefinition

func ReadValueDefinition(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ReadWorkflow

func ReadWorkflow(context *parsing.Context) parsing.EntityPtr

(parsing.Reader signature)

func ValidateOperationExecutor

func ValidateOperationExecutor(executor string, context *parsing.Context)

Types

type Blueprint

type Blueprint struct {
	*File `name:"blueprint"`

	Description *string `read:"description"` // not in spec, but in code
	Groups      Groups  `read:"groups,Group"`
}

func NewBlueprint

func NewBlueprint(context *parsing.Context) *Blueprint

func (*Blueprint) NormalizeServiceTemplate

func (self *Blueprint) NormalizeServiceTemplate() *normal.ServiceTemplate

normal.Normalizable interface

func (*Blueprint) SetInputs

func (self *Blueprint) SetInputs(inputs map[string]ard.Value)

parsing.HasInputs interface

type DSLResource

type DSLResource struct {
	*Entity `name:"DSL resource"`

	SourcePath      *string `read:"source_path" mandatory:""`
	DestinationPath *string `read:"destination_path" mandatory:""`
}

func NewDSLResource

func NewDSLResource(context *parsing.Context) *DSLResource

type DSLResources

type DSLResources []*DSLResource

type DataType

type DataType struct {
	*Type `name:"data type"`

	Description         *string             `read:"description"`
	PropertyDefinitions PropertyDefinitions `read:"properties,PropertyDefinition" inherit:"properties,Parent"`

	Parent *DataType `lookup:"derived_from,ParentName" traverse:"ignore" json:"-" yaml:"-"`
}

func NewDataType

func NewDataType(context *parsing.Context) *DataType

func (*DataType) GetInternal added in v0.13.0

func (self *DataType) GetInternal() (ard.TypeName, ard.TypeValidator, parsing.Reader, bool)

func (*DataType) GetInternalTypeName

func (self *DataType) GetInternalTypeName() (ard.TypeName, bool)

func (*DataType) GetParent

func (self *DataType) GetParent() parsing.EntityPtr

(parsing.Hierarchical interface)

func (*DataType) Inherit

func (self *DataType) Inherit()

(parsing.Inherits interface)

func (*DataType) NewValueMeta added in v0.21.0

func (self *DataType) NewValueMeta() *normal.ValueMeta

func (*DataType) Render added in v0.13.0

func (self *DataType) Render()

(parsing.Renderable interface)

type DataTypes

type DataTypes []*DataType

type Entity

type Entity struct {
	Context *parsing.Context `traverse:"ignore" json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

func NewEntity

func NewEntity(context *parsing.Context) *Entity

func (*Entity) GetContext

func (self *Entity) GetContext() *parsing.Context

(parsing.Contextual interface)

type File added in v0.21.0

type File struct {
	*Entity `name:"file"`

	ToscaDefinitionsVersion *string            `read:"tosca_definitions_version" mandatory:""`
	Metadata                Metadata           `read:"metadata,!Metadata"` // not in spec, but in code
	Imports                 Imports            `read:"imports,[]Import"`
	Inputs                  Inputs             `read:"inputs,Input"`
	NodeTemplates           NodeTemplates      `read:"node_templates,NodeTemplate"`
	NodeTypes               NodeTypes          `read:"node_types,NodeType" hierarchy:""`
	Capabilities            []*ValueDefinition `read:"capability,ValueDefinition"`
	Outputs                 ValueDefinitions   `read:"outputs,ValueDefinition"`
	RelationshipTypes       RelationshipTypes  `read:"relationships,RelationshipType" hierarchy:""`
	Plugins                 Plugins            `read:"plugins,Plugin"`
	Workflows               Workflows          `read:"workflows,Workflow"`
	DataTypes               DataTypes          `read:"data_types,DataType" hierarchy:""`
	Policies                Policies           `read:"policies,Policy"`
	PolicyTypes             PolicyTypes        `read:"policy_types,PolicyType" hierarchy:""`
	PolicyTriggerTypes      PolicyTriggerTypes `read:"policy_triggers,PolicyTriggerType" hierarchy:""`
	UploadResources         *UploadResources   `read:"upload_resources,UploadResources"`
}

func NewFile added in v0.21.0

func NewFile(context *parsing.Context) *File

func (*File) GetImportSpecs added in v0.21.0

func (self *File) GetImportSpecs() []*parsing.ImportSpec

(parsing.Importer interface)

type Group

type Group struct {
	*Entity `name:"group"`
	Name    string `namespace:""`

	MemberNodeTemplateNames *[]string     `read:"members" mandatory:""`
	Policies                GroupPolicies `read:"policies,GroupPolicy"`

	MemberNodeTemplates NodeTemplates `lookup:"members,MemberNodeTemplateNames" traverse:"ignore" json:"-" yaml:"-"`
}

func NewGroup

func NewGroup(context *parsing.Context) *Group

func (*Group) Normalize

func (self *Group) Normalize(normalServiceTemplate *normal.ServiceTemplate) *normal.Group

type GroupPolicies

type GroupPolicies map[string]*GroupPolicy

type GroupPolicy

type GroupPolicy struct {
	*Entity `name:"group policy"`

	PolicyTypeName *string             `read:"type" mandatory:""`
	Properties     Values              `read:"properties,Value"`
	Triggers       GroupPolicyTriggers `read:"triggers,GroupPolicyTrigger"`

	PolicyType *PolicyType `lookup:"type,PolicyTypeName" traverse:"ignore" json:"-" yaml:"-"`
}

func NewGroupPolicy

func NewGroupPolicy(context *parsing.Context) *GroupPolicy

type GroupPolicyTrigger

type GroupPolicyTrigger struct {
	*Entity `name:"group policy trigger"`

	PolicyTriggerTypeName *string `read:"type" mandatory:""`
	Parameters            Values  `read:"parameters,Value"`

	PolicyTriggerType *PolicyTriggerType `lookup:"type,PolicyTriggerTypeName" traverse:"ignore" json:"-" yaml:"-"`
}

func NewGroupPolicyTrigger

func NewGroupPolicyTrigger(context *parsing.Context) *GroupPolicyTrigger

type GroupPolicyTriggers

type GroupPolicyTriggers map[string]*GroupPolicyTrigger

type Groups

type Groups []*Group

func (Groups) Normalize

func (self Groups) Normalize(normalServiceTemplate *normal.ServiceTemplate)

type Import

type Import struct {
	*Entity `name:"import" json:"-" yaml:"-"`

	File *string
}

func NewImport

func NewImport(context *parsing.Context) *Import

func (*Import) NewImportSpec

func (self *Import) NewImportSpec(unit *File) (*parsing.ImportSpec, bool)

type Imports

type Imports []*Import

type Input

type Input struct {
	*ParameterDefinition `name:"input"`
	Name                 string `namespace:""`

	Value *Value
}

func NewInput

func NewInput(context *parsing.Context) *Input

func (*Input) Normalize

func (self *Input) Normalize(context *parsing.Context) normal.Value

func (*Input) Render

func (self *Input) Render()

(parsing.Renderable interface)

type Inputs

type Inputs map[string]*Input

func (Inputs) Normalize

func (self Inputs) Normalize(normalConstrainables normal.Values, context *parsing.Context)

type InterfaceAssignment

type InterfaceAssignment struct {
	*Entity `name:"interface assignment"`
	Name    string

	Operations OperationAssignments `read:"?,OperationAssignment"`
}

func NewInterfaceAssignment

func NewInterfaceAssignment(context *parsing.Context) *InterfaceAssignment

func (*InterfaceAssignment) GetDefinitionForNodeTemplate

func (self *InterfaceAssignment) GetDefinitionForNodeTemplate(nodeTemplate *NodeTemplate) (*InterfaceDefinition, bool)

func (*InterfaceAssignment) GetDefinitionForRelationshipSource

func (self *InterfaceAssignment) GetDefinitionForRelationshipSource(relationship *RelationshipAssignment) (*InterfaceDefinition, bool)

func (*InterfaceAssignment) GetDefinitionForRelationshipTarget

func (self *InterfaceAssignment) GetDefinitionForRelationshipTarget(relationship *RelationshipAssignment) (*InterfaceDefinition, bool)

func (*InterfaceAssignment) GetKey

func (self *InterfaceAssignment) GetKey() string

(parsing.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) NormalizeForNodeTemplate

func (self InterfaceAssignments) NormalizeForNodeTemplate(nodeTemplate *NodeTemplate, normalNodeTemplate *normal.NodeTemplate)

func (InterfaceAssignments) NormalizeForRelationshipSource

func (self InterfaceAssignments) NormalizeForRelationshipSource(relationship *RelationshipAssignment, normalRelationship *normal.Relationship)

func (InterfaceAssignments) NormalizeForRelationshipTarget

func (self InterfaceAssignments) NormalizeForRelationshipTarget(relationship *RelationshipAssignment, normalRelationship *normal.Relationship)

func (InterfaceAssignments) Render

func (self InterfaceAssignments) Render(definitions InterfaceDefinitions, context *parsing.Context)

type InterfaceDefinition

type InterfaceDefinition struct {
	*Entity `name:"interface definition"`
	Name    string

	OperationDefinitions OperationDefinitions `read:"?,OperationDefinition"`
}

func NewInterfaceDefinition

func NewInterfaceDefinition(context *parsing.Context) *InterfaceDefinition

func (*InterfaceDefinition) GetKey

func (self *InterfaceDefinition) GetKey() string

(parsing.Mappable interface)

func (*InterfaceDefinition) Inherit

func (self *InterfaceDefinition) Inherit(parentDefinition *InterfaceDefinition)

type InterfaceDefinitions

type InterfaceDefinitions map[string]*InterfaceDefinition

func (InterfaceDefinitions) Inherit

func (self InterfaceDefinitions) Inherit(parentDefinitions InterfaceDefinitions)

type Metadata

type Metadata map[string]ard.Value

type NodeTemplate

type NodeTemplate struct {
	*Entity `name:"node template"`
	Name    string `namespace:""`

	NodeTypeName  *string                  `read:"type" mandatory:""`
	Properties    Values                   `read:"properties,Value"`
	Instances     *NodeTemplateInstances   `read:"instances,NodeTemplateInstances"` // deprecated in Cloudify DSL 1.3
	Interfaces    InterfaceAssignments     `read:"interfaces,InterfaceAssignment"`
	Relationships RelationshipAssignments  `read:"relationships,[]RelationshipAssignment"`
	Capabilities  NodeTemplateCapabilities `read:"capabilities,NodeTemplateCapability"`

	NodeType *NodeType `lookup:"type,NodeTypeName" traverse:"ignore" json:"-" yaml:"-"`
}

func NewNodeTemplate

func NewNodeTemplate(context *parsing.Context) *NodeTemplate

func (*NodeTemplate) Normalize

func (self *NodeTemplate) Normalize(normalServiceTemplate *normal.ServiceTemplate) *normal.NodeTemplate

func (*NodeTemplate) NormalizeRelationships

func (self *NodeTemplate) NormalizeRelationships(normalServiceTemplate *normal.ServiceTemplate)

func (*NodeTemplate) Render

func (self *NodeTemplate) Render()

(parsing.Renderable interface)

type NodeTemplateCapabilities

type NodeTemplateCapabilities map[string]*NodeTemplateCapability

func (NodeTemplateCapabilities) Validate

func (self NodeTemplateCapabilities) Validate(context *parsing.Context, instances *NodeTemplateInstances)

type NodeTemplateCapability

type NodeTemplateCapability struct {
	*Entity `name:"node template capability"`

	Properties Values `read:"properties,Value"`
}

func NewNodeTemplateCapability

func NewNodeTemplateCapability(context *parsing.Context) *NodeTemplateCapability

func (*NodeTemplateCapability) ValidateScalableProperties

func (self *NodeTemplateCapability) ValidateScalableProperties(instances *NodeTemplateInstances)

type NodeTemplateInstances

type NodeTemplateInstances struct {
	*Entity `name:"node template instances"`

	Deploy *int64 `read:"deploy"`
}

func NewNodeTemplateInstances

func NewNodeTemplateInstances(context *parsing.Context) *NodeTemplateInstances

type NodeTemplates

type NodeTemplates []*NodeTemplate

func (NodeTemplates) Normalize

func (self NodeTemplates) Normalize(normalServiceTemplate *normal.ServiceTemplate)

type NodeType

type NodeType struct {
	*Type `name:"node type"`

	InterfaceDefinitions InterfaceDefinitions `read:"interfaces,InterfaceDefinition" inherit:"interfaces,Parent"`
	PropertyDefinitions  PropertyDefinitions  `read:"properties,PropertyDefinition" inherit:"properties,Parent"`

	Parent *NodeType `lookup:"derived_from,ParentName" traverse:"ignore" json:"-" yaml:"-"`
}

func NewNodeType

func NewNodeType(context *parsing.Context) *NodeType

func (*NodeType) GetParent

func (self *NodeType) GetParent() parsing.EntityPtr

(parsing.Hierarchical interface)

func (*NodeType) Inherit

func (self *NodeType) Inherit()

(parsing.Inherits interface)

type NodeTypes

type NodeTypes []*NodeType

type OperationAssignment

type OperationAssignment struct {
	*Entity `name:"operation assignment"`
	Name    string

	Implementation *string  `read:"implementation" mandatory:""`
	Inputs         Values   `read:"inputs,Value"`
	Executor       *string  `read:"executor"`
	MaxRetries     *int64   `read:"max_retries"`
	RetryInterval  *float64 `read:"retry_interval"`
}

func NewOperationAssignment

func NewOperationAssignment(context *parsing.Context) *OperationAssignment

func (*OperationAssignment) GetKey

func (self *OperationAssignment) GetKey() string

(parsing.Mappable interface)

func (*OperationAssignment) Normalize

func (self *OperationAssignment) Normalize(normalInterface *normal.Interface) *normal.Operation

type OperationAssignments

type OperationAssignments map[string]*OperationAssignment

func (OperationAssignments) Normalize

func (self OperationAssignments) Normalize(normalInterface *normal.Interface)

func (OperationAssignments) Render

func (self OperationAssignments) Render(definitions OperationDefinitions, context *parsing.Context)

type OperationDefinition

type OperationDefinition struct {
	*Entity `name:"operation definition"`
	Name    string

	Implementation   *string              `read:"implementation"`
	InputDefinitions ParameterDefinitions `read:"inputs,ParameterDefinition"`
	Executor         *string              `read:"executor"`
	MaxRetries       *int64               `read:"max_retries"`
	RetryInterval    *float64             `read:"retry_interval"`
}

func NewOperationDefinition

func NewOperationDefinition(context *parsing.Context) *OperationDefinition

func (*OperationDefinition) GetKey

func (self *OperationDefinition) GetKey() string

(parsing.Mappable interface)

func (*OperationDefinition) Inherit

func (self *OperationDefinition) Inherit(parentDefinition *OperationDefinition)

type OperationDefinitions

type OperationDefinitions map[string]*OperationDefinition

func (OperationDefinitions) Inherit

func (self OperationDefinitions) Inherit(parentDefinitions OperationDefinitions)

type ParameterDefinition

type ParameterDefinition struct {
	*Entity `name:"parameter definition"`
	Name    string

	Description  *string `read:"description"`
	DataTypeName *string `read:"type"`
	Default      *Value  `read:"default,Value"`

	DataType *DataType `lookup:"type,DataTypeName" traverse:"ignore" json:"-" yaml:"-"`
}

func NewParameterDefinition

func NewParameterDefinition(context *parsing.Context) *ParameterDefinition

func (*ParameterDefinition) GetKey

func (self *ParameterDefinition) GetKey() string

(parsing.Mappable interface)

func (*ParameterDefinition) GetNormalDataType added in v0.21.0

func (self *ParameterDefinition) GetNormalDataType() *normal.ValueMeta

func (*ParameterDefinition) Inherit

func (self *ParameterDefinition) Inherit(parentDefinition *ParameterDefinition)

func (*ParameterDefinition) Render added in v0.13.0

func (self *ParameterDefinition) Render()

(parsing.Renderable interface)

type ParameterDefinitions

type ParameterDefinitions map[string]*ParameterDefinition

func (ParameterDefinitions) Inherit

func (self ParameterDefinitions) Inherit(parentDefinitions ParameterDefinitions)

type Plugin

type Plugin struct {
	*Entity `name:"plugin"`
	Name    string `namespace:""`

	Executor            *string `read:"executor" mandatory:""`
	Source              *string `read:"source"`
	InstallArguments    *string `read:"install_arguments"`
	Install             *bool   `read:"install"`
	PackageName         *string `read:"package_name"`
	PackageVersion      *string `read:"package_version"`
	SupportedPlatform   *string `read:"supported_platform"`
	Distribution        *string `read:"distribution"`
	DistributionVersion *string `read:"distribution_version"`
	DistributionRelease *string `read:"distribution_release"`
}

func NewPlugin

func NewPlugin(context *parsing.Context) *Plugin

type Plugins

type Plugins []*Plugin

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" mandatory:""`
	Properties       Values    `read:"properties,Value"`
	TargetGroupNames *[]string `read:"targets" mandatory:""`

	PolicyType   *PolicyType `lookup:"type,PolicyTypeName" traverse:"ignore" json:"-" yaml:"-"`
	TargetGroups Groups      `lookup:"targets,TargetGroupNames" traverse:"ignore" json:"-" yaml:"-"`
}

func NewPolicy

func NewPolicy(context *parsing.Context) *Policy

func (*Policy) Normalize

func (self *Policy) Normalize(normalServiceTemplate *normal.ServiceTemplate) *normal.Policy

type PolicyTriggerType

type PolicyTriggerType struct {
	*Entity `name:"policy trigger type"`
	Name    string `namespace:""`

	Source     *string             `read:"source" mandatory:""`
	Parameters PropertyDefinitions `read:"parameters,PropertyDefinition"`
}

func NewPolicyTriggerType

func NewPolicyTriggerType(context *parsing.Context) *PolicyTriggerType

func (*PolicyTriggerType) GetParent

func (self *PolicyTriggerType) GetParent() parsing.EntityPtr

(parsing.Hierarchical interface)

type PolicyTriggerTypes

type PolicyTriggerTypes []*PolicyTriggerType

type PolicyType

type PolicyType struct {
	*Entity `name:"policy type"`
	Name    string `namespace:""`

	Source              *string             `read:"source" mandatory:""`
	PropertyDefinitions PropertyDefinitions `read:"properties,PropertyDefinition"`
}

func NewPolicyType

func NewPolicyType(context *parsing.Context) *PolicyType

func (*PolicyType) GetParent

func (self *PolicyType) GetParent() parsing.EntityPtr

(parsing.Hierarchical interface)

type PolicyTypes

type PolicyTypes []*PolicyType

type PropertyDefinition

type PropertyDefinition struct {
	*ParameterDefinition `name:"property definition"`

	Required *bool `read:"required"`
}

func NewPropertyDefinition

func NewPropertyDefinition(context *parsing.Context) *PropertyDefinition

func (*PropertyDefinition) GetKey

func (self *PropertyDefinition) GetKey() string

(parsing.Mappable interface)

func (*PropertyDefinition) Inherit

func (self *PropertyDefinition) Inherit(parentDefinition *PropertyDefinition)

func (*PropertyDefinition) IsRequired added in v0.13.0

func (self *PropertyDefinition) IsRequired() bool

type PropertyDefinitions

type PropertyDefinitions map[string]*PropertyDefinition

func (PropertyDefinitions) Inherit

func (self PropertyDefinitions) Inherit(parentDefinitions PropertyDefinitions)

type RelationshipAssignment

type RelationshipAssignment struct {
	*Entity `name:"relationship assignment"`

	RelationshipTypeName   *string              `read:"type" mandatory:""`
	TargetNodeTemplateName *string              `read:"target" mandatory:""`
	Properties             Values               `read:"properties,Value"`
	SourceInterfaces       InterfaceAssignments `read:"source_interfaces,InterfaceAssignment"`
	TargetInterfaces       InterfaceAssignments `read:"target_interfaces,InterfaceAssignment"`

	RelationshipType   *RelationshipType `lookup:"type,RelationshipTypeName" traverse:"ignore" json:"-" yaml:"-"`
	TargetNodeTemplate *NodeTemplate     `lookup:"target,TargetNodeTemplateName" traverse:"ignore" json:"-" yaml:"-"`
}

func NewRelationshipAssignment

func NewRelationshipAssignment(context *parsing.Context) *RelationshipAssignment

func (*RelationshipAssignment) Normalize

func (self *RelationshipAssignment) Normalize(nodeTemplate *NodeTemplate, normalNodeTemplate *normal.NodeTemplate) *normal.Requirement

func (*RelationshipAssignment) Render

func (self *RelationshipAssignment) Render()

(parsing.Renderable interface)

type RelationshipAssignments

type RelationshipAssignments []*RelationshipAssignment

type RelationshipType

type RelationshipType struct {
	*Type `name:"relationship type"`

	SourceInterfaceDefinitions InterfaceDefinitions `read:"source_interfaces,InterfaceDefinition" inherit:"source_interfaces,Parent"`
	TargetInterfaceDefinitions InterfaceDefinitions `read:"target_interfaces,InterfaceDefinition" inherit:"target_interfaces,Parent"`
	PropertyDefinitions        PropertyDefinitions  `read:"properties,PropertyDefinition" inherit:"properties,Parent"`

	Parent *RelationshipType `lookup:"derived_from,ParentName" traverse:"ignore" json:"-" yaml:"-"`
}

func NewRelationshipType

func NewRelationshipType(context *parsing.Context) *RelationshipType

func (*RelationshipType) GetParent

func (self *RelationshipType) GetParent() parsing.EntityPtr

(parsing.Hierarchical interface)

func (*RelationshipType) Inherit

func (self *RelationshipType) Inherit()

(parsing.Inherits interface)

type RelationshipTypes

type RelationshipTypes []*RelationshipType

type Type

type Type struct {
	*Entity `json:"-" yaml:"-"`
	Name    string `namespace:""`

	ParentName *string `read:"derived_from"`
}

func NewType

func NewType(context *parsing.Context) *Type

type UploadResources

type UploadResources struct {
	*Entity `name:"upload resources"`

	PluginResources *[]string    `read:"plugin_resources"`
	DSLResources    DSLResources `read:"dsl_resources,[]DSLResource"`
	Parameters      Values       `read:"parameters,Value"`
}

func NewUploadResources

func NewUploadResources(context *parsing.Context) *UploadResources

type Value

type Value struct {
	*Entity `name:"value"`
	Name    string

	Meta *normal.ValueMeta `traverse:"ignore" json:"-" yaml:"-"`
}

func NewValue

func NewValue(context *parsing.Context) *Value

func (*Value) GetKey

func (self *Value) GetKey() string

(parsing.Mappable interface)

func (*Value) Normalize

func (self *Value) Normalize() normal.Value

func (*Value) RenderParameter

func (self *Value) RenderParameter(dataType *DataType, definition *ParameterDefinition, validateRequire bool, allowNil bool)

func (*Value) RenderProperty

func (self *Value) RenderProperty(dataType *DataType, definition *PropertyDefinition)

type ValueDefinition

type ValueDefinition struct {
	*Entity `name:"value definition"`
	Name    string `namespace:""`

	Description *string `read:"description"`
	Value       *Value  `read:"value,Value"`
}

func NewValueDefinition

func NewValueDefinition(context *parsing.Context) *ValueDefinition

func (*ValueDefinition) GetKey

func (self *ValueDefinition) GetKey() string

(parsing.Mappable interface)

type ValueDefinitions

type ValueDefinitions map[string]*ValueDefinition

func (ValueDefinitions) Normalize

func (self ValueDefinitions) Normalize(c normal.Values)

type Values

type Values map[string]*Value

func (Values) Normalize

func (self Values) Normalize(normalConstrainables normal.Values, prefix string)

func (Values) RenderMissingValue

func (self Values) RenderMissingValue(definition *ParameterDefinition, kind string, required bool, context *parsing.Context)

func (Values) RenderParameters

func (self Values) RenderParameters(definitions ParameterDefinitions, kind string, context *parsing.Context)

func (Values) RenderProperties

func (self Values) RenderProperties(definitions PropertyDefinitions, kind string, context *parsing.Context)

func (Values) SetIfNil

func (self Values) SetIfNil(context *parsing.Context, key string, data ard.Value)

type Workflow

type Workflow struct {
	*Entity `name:"workflow"`
	Name    string `namespace:""`

	Mapping              *string              `read:"mapping" mandatory:""`
	ParameterDefinitions ParameterDefinitions `read:"parameters,ParameterDefinition"`
	IsCascading          *bool                `read:"is_cascading"` // See: https://docs.cloudify.co/5.0.5/working_with/service_composition/component/
}

func NewWorkflow

func NewWorkflow(context *parsing.Context) *Workflow

func (*Workflow) Normalize

func (self *Workflow) Normalize(normalServiceTemplate *normal.ServiceTemplate) *normal.Workflow

type Workflows

type Workflows []*Workflow

func (Workflows) Normalize

func (self Workflows) Normalize(normalServiceTemplate *normal.ServiceTemplate)

Jump to

Keyboard shortcuts

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