# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. ########################################################################## # The content of this file reflects TOSCA Simple Profile in YAML. It # describes the definition for TOSCA types including Node Type, # Relationship Type, Capability Type and Interfaces. ########################################################################## ########################################################################## # Node Type. # A Node Type is a reusable entity that defines the type of one or more # Node Templates. ########################################################################## tosca.nodes.Root: description: > The TOSCA root node all other TOSCA base node types derive from. interfaces: [ tosca.interfaces.node.lifecycle.Standard ] tosca.nodes.Compute: derived_from: tosca.nodes.Root properties: num_cpus: required: no type: integer constraints: - greater_or_equal: 1 description: > Number of (actual or virtual) CPUs associated with the Compute node. disk_size: required: no type: scalar-unit.size constraints: - greater_or_equal: 0 MB description: > Size of the local disk, available to applications running on the Compute node. mem_size: required: no type: scalar-unit.size constraints: - greater_or_equal: 0 MB description: > Size of memory, available to applications running on the Compute node. attributes: private_address: type: string public_address: type: string capabilities: host: type: tosca.capabilities.Container binding: type: tosca.capabilities.network.Bindable os: type: tosca.capabilities.OperatingSystem scalable: type: tosca.capabilities.Scalable requirements: - attachment: tosca.nodes.BlockStorage type: AttachesTo tosca.nodes.SoftwareComponent: derived_from: tosca.nodes.Root properties: version: required: no type: string description: > Software component version. requirements: - host: tosca.nodes.Compute tosca.nodes.DBMS: derived_from: tosca.nodes.SoftwareComponent properties: dbms_port: required: no type: integer description: > The port the DBMS service will listen to for data and requests. dbms_root_password: required: no type: string description: > The root password for the DBMS service. capabilities: host: type: tosca.capabilities.Container valid_source_types: [tosca.nodes.Database] tosca.nodes.Database: derived_from: tosca.nodes.Root properties: db_user: required: no type: string description: > User account name for DB administration db_name: required: no type: string description: > The name of the database. db_password: required: no type: string description: > The password for the DB user account requirements: - host: tosca.nodes.DBMS capabilities: database_endpoint: type: tosca.capabilities.DatabaseEndpoint tosca.nodes.WebServer: derived_from: tosca.nodes.SoftwareComponent capabilities: data_endpoint: type: tosca.capabilities.Endpoint admin_endpoint: type: tosca.capabilities.Endpoint.Admin host: type: tosca.capabilities.Container valid_source_types: [tosca.nodes.WebApplication] tosca.nodes.WebApplication: derived_from: tosca.nodes.Root requirements: - host: tosca.nodes.WebServer tosca.nodes.BlockStorage: derived_from: tosca.nodes.Root properties: size: type: integer constraints: - greater_or_equal: 1 volume_id: type: string required: false snapshot_id: type: string required: false attributes: volume_id: type: string capabilities: attachment: type: tosca.capabilities.Attachment tosca.nodes.network.Network: derived_from: tosca.nodes.Root description: > The TOSCA Network node represents a simple, logical network service. properties: ip_version: type: integer required: no default: 4 constraints: - valid_values: [ 4, 6 ] description: > The IP version of the requested network. Valid values are 4 for ipv4 or 6 for ipv6. cidr: type: string required: no description: > The cidr block of the requested network. start_ip: type: string required: no description: > The IP address to be used as the start of a pool of addresses within the full IP range derived from the cidr block. end_ip: type: string required: no description: > The IP address to be used as the end of a pool of addresses within the full IP range derived from the cidr block. gateway_ip: type: string required: no description: > The gateway IP address. network_name: type: string required: no description: > An identifier that represents an existing Network instance in the underlying cloud infrastructure or can be used as the name of the newly created network. If network_name is provided and no other properties are provided (with exception of network_id), then an existing network instance will be used. If network_name is provided alongside with more properties then a new network with this name will be created. network_id: type: string required: no description: > An identifier that represents an existing Network instance in the underlying cloud infrastructure. This property is mutually exclusive with all other properties except network_name. This can be used alone or together with network_name to identify an existing network. segmentation_id: type: string required: no description: > A segmentation identifier in the underlying cloud infrastructure. E.g. VLAN ID, GRE tunnel ID, etc.. dhcp_enabled: type: boolean required: no default: true description: > Indicates should DHCP service be enabled on the network or not. capabilities: link: type: tosca.capabilities.network.Linkable tosca.nodes.network.Port: derived_from: tosca.nodes.Root description: > The TOSCA Port node represents a logical entity that associates between Compute and Network normative types. The Port node type effectively represents a single virtual NIC on the Compute node instance. properties: ip_address: type: string required: no description: > Allow the user to set a static IP. order: type: integer required: no default: 0 constraints: - greater_or_equal: 0 description: > The order of the NIC on the compute instance (e.g. eth2). is_default: type: boolean required: no default: false description: > If is_default=true this port will be used for the default gateway route. Only one port that is associated to single compute node can set as is_default=true. ip_range_start: type: string required: no description: > Defines the starting IP of a range to be allocated for the compute instances that are associated with this Port. ip_range_end: type: string required: no description: > Defines the ending IP of a range to be allocated for the compute instances that are associated with this Port. attributes: ip_address: type: string requirements: - binding: description: > Binding requirement expresses the relationship between Port and Compute nodes. Effectevely it indicates that the Port will be attached to specific Compute node instance type: tosca.capabilities.network.Bindable - link: description: > Link requirement expresses the relationship between Port and Network nodes. It indicates which network this port will connect to. type: tosca.capabilities.network.Linkable tosca.nodes.ObjectStorage: derived_from: tosca.nodes.Root description: > The TOSCA ObjectStorage node represents storage that provides the ability to store data as objects (or BLOBs of data) without consideration for the underlying filesystem or devices properties: store_name: type: string required: yes description: > The logical name of the object store (or container). store_size: type: scalar-unit.size required: no constraints: - greater_or_equal: 0 GB description: > The requested initial storage size. store_maxsize: type: scalar-unit.size required: no constraints: - greater_or_equal: 0 GB description: > The requested maximum storage size. ########################################################################## # Relationship Type. # A Relationship Type is a reusable entity that defines the type of one # or more relationships between Node Types or Node Templates. ########################################################################## tosca.relationships.Root: interfaces: [ tosca.interfaces.relationship.Configure ] tosca.relationships.DependsOn: derived_from: tosca.relationships.Root tosca.relationships.HostedOn: derived_from: tosca.relationships.DependsOn valid_targets: [ tosca.capabilities.Container ] tosca.relationships.ConnectsTo: derived_from: tosca.relationships.DependsOn valid_targets: [ tosca.capabilities.Endpoint ] tosca.relationships.AttachesTo: derived_from: tosca.relationships.Root valid_targets: [ tosca.capabilities.Attachment ] properties: location: required: true type: string constraints: - min_length: 1 device: required: false type: string tosca.relationships.network.LinksTo: derived_from: tosca.relationships.DependsOn valid_targets: [ tosca.capabilities.network.Linkable ] tosca.relationships.network.BindsTo: derived_from: tosca.relationships.DependsOn valid_targets: [ tosca.capabilities.network.Bindable ] ########################################################################## # Capability Type. # A Capability Type is a reusable entity that describes a kind of # capability that a Node Type can declare to expose. ########################################################################## tosca.capabilities.Root: tosca.capabilities.Container: derived_from: tosca.capabilities.Root tosca.capabilities.Endpoint: derived_from: tosca.capabilities.Root properties: protocol: type: string default: tcp port: type: tosca.datatypes.network.PortDef required: false secure: type: boolean default: false url_path: type: string required: false port_name: type: string required: false network_name: type: string required: false initiator: type: string default: source constraints: - valid_values: [source, target, peer] ports: type: map required: false constraints: - min_length: 1 entry_schema: type: tosca.datatypes.network.PortDef attributes: ip_address: type: string tosca.capabilities.Endpoint.Admin: derived_from: tosca.capabilities.Endpoint properties: secure: true tosca.capabilities.Scalable: derived_from: tosca.capabilities.Root properties: min_instances: type: integer required: yes default: 1 description: > This property is used to indicate the minimum number of instances that should be created for the associated TOSCA Node Template by a TOSCA orchestrator. max_instances: type: integer required: yes default: 1 description: > This property is used to indicate the maximum number of instances that should be created for the associated TOSCA Node Template by a TOSCA orchestrator. default_instances: type: integer required: no description: > An optional property that indicates the requested default number of instances that should be the starting number of instances a TOSCA orchestrator should attempt to allocate. The value for this property MUST be in the range between the values set for min_instances and max_instances properties. tosca.capabilities.DatabaseEndpoint: derived_from: tosca.capabilities.Endpoint tosca.capabilities.Attachment: derived_from: tosca.capabilities.Root tosca.capabilities.network.Linkable: derived_from: tosca.capabilities.Root description: > A node type that includes the Linkable capability indicates that it can be pointed by tosca.relationships.network.LinksTo relationship type, which represents an association relationship between Port and Network node types. tosca.capabilities.network.Bindable: derived_from: tosca.capabilities.Root description: > A node type that includes the Bindable capability indicates that it can be pointed by tosca.relationships.network.BindsTo relationship type, which represents a network association relationship between Port and Compute node types. tosca.capabilities.OperatingSystem: derived_from: tosca.capabilities.Root properties: architecture: required: yes default: x86_64 type: string description: > The host Operating System (OS) architecture. type: required: yes type: string description: > The host Operating System (OS) type. distribution: required: no type: string description: > The host Operating System (OS) distribution. Examples of valid values for an “type” of “Linux” would include: debian, fedora, rhel and ubuntu. version: required: no type: string description: > The host Operating System version. ########################################################################## # Interfaces Type. # The Interfaces element describes a list of one or more interface # definitions for a modelable entity (e.g., a Node or Relationship Type) # as defined within the TOSCA Simple Profile specification. ########################################################################## tosca.interfaces.node.lifecycle.Standard: create: description: Standard lifecycle create operation. configure: description: Standard lifecycle configure operation. start: description: Standard lifecycle start operation. stop: description: Standard lifecycle stop operation. delete: description: Standard lifecycle delete operation. tosca.interfaces.relationship.Configure: pre_configure_source: description: Operation to pre-configure the source endpoint. pre_configure_target: description: Operation to pre-configure the target endpoint. post_configure_source: description: Operation to post-configure the source endpoint. post_configure_target: description: Operation to post-configure the target endpoint. add_target: description: Operation to add a target node. remove_target: description: Operation to remove a target node. ########################################################################## # Data Type. # A Datatype is a complex data type declaration which contains other # complex or simple data types. ########################################################################## tosca.datatypes.network.NetworkInfo: properties: network_name: type: string network_id: type: string addresses: type: list entry_schema: type: string tosca.datatypes.network.PortInfo: properties: port_name: type: string port_id: type: string network_id: type: string mac_address: type: string addresses: type: list entry_schema: type: string tosca.datatypes.network.PortDef: type: integer constraints: - in_range: [ 1, 65535 ] tosca.datatypes.network.PortSpec: properties: protocol: type: string required: true default: tcp constraints: - valid_values: [ udp, tcp, igmp ] target: type: list entry_schema: type: PortDef target_range: type: range constraints: - in_range: [ 1, 65535 ] source: type: list entry_schema: type: PortDef source_range: type: range constraints: - in_range: [ 1, 65535 ] tosca.datatypes.network.Credential: properties: protocol: type: string token_type: type: string token: type: string keys: type: map entry_schema: type: string