Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 51C5D200BCC for ; Tue, 15 Nov 2016 03:28:06 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 5010F160B0D; Tue, 15 Nov 2016 02:28:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0ADE2160B06 for ; Tue, 15 Nov 2016 03:28:03 +0100 (CET) Received: (qmail 548 invoked by uid 500); 15 Nov 2016 02:28:03 -0000 Mailing-List: contact dev-help@ariatosca.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ariatosca.incubator.apache.org Delivered-To: mailing list dev@ariatosca.incubator.apache.org Received: (qmail 537 invoked by uid 99); 15 Nov 2016 02:28:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2016 02:28:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 960CAC0118 for ; Tue, 15 Nov 2016 02:28:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.218 X-Spam-Level: X-Spam-Status: No, score=-6.218 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id TY2MVJ4Ig1al for ; Tue, 15 Nov 2016 02:27:53 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 64D775FC9C for ; Tue, 15 Nov 2016 02:27:52 +0000 (UTC) Received: (qmail 95210 invoked by uid 99); 15 Nov 2016 02:26:37 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2016 02:26:37 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D7603DFFAB; Tue, 15 Nov 2016 02:26:36 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ran@apache.org To: dev@ariatosca.incubator.apache.org Date: Tue, 15 Nov 2016 02:26:44 -0000 Message-Id: <7ca0041a27794b2591718f0f0f7e8c35@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [09/14] incubator-ariatosca git commit: ARIA-18 Migrate DSL parser and TOSCA extension code archived-at: Tue, 15 Nov 2016 02:28:06 -0000 http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b2c8379c/aria/parser/validation/issue.py ---------------------------------------------------------------------- diff --git a/aria/parser/validation/issue.py b/aria/parser/validation/issue.py new file mode 100644 index 0000000..a36fe6c --- /dev/null +++ b/aria/parser/validation/issue.py @@ -0,0 +1,125 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +from __future__ import absolute_import # so we can import standard 'collections' + +from collections import OrderedDict +from ..utils import full_type_name + +class Issue(object): + PLATFORM = 0 + """ + Platform error (e.g. I/O, hardware, a bug in ARIA) + """ + + SYNTAX = 1 + """ + Syntax and format (e.g. YAML, XML, JSON) + """ + + FIELD = 2 + """ + Single field + """ + + BETWEEN_FIELDS = 3 + """ + Relationships between fields within the type (internal grammar) + """ + + BETWEEN_TYPES = 4 + """ + Relationships between types (e.g. inheritance, external grammar) + """ + + BETWEEN_INSTANCES = 5 + """ + Topology (e.g. static requirements and capabilities) + """ + + EXTERNAL = 6 + """ + External (e.g. live requirements and capabilities) + """ + + ALL = 100 + + def __init__(self, message=None, exception=None, location=None, line=None, + column=None, locator=None, snippet=None, level=0): + if message is not None: + self.message = str(message) + elif exception is not None: + self.message = str(exception) + else: + self.message = 'unknown issue' + + self.exception = exception + + if locator is not None: + self.location = locator.location + self.line = locator.line + self.column = locator.column + else: + self.location = location + self.line = line + self.column = column + + self.snippet = snippet + self.level = level + + @property + def as_raw(self): + return OrderedDict(( + ('level', self.level), + ('message', self.message), + ('location', self.location), + ('line', self.line), + ('column', self.column), + ('snippet', self.snippet), + ('exception', full_type_name(self.exception) if self.exception else None))) + + @property + def locator_as_str(self): + if self.location is not None: + if self.line is not None: + if self.column is not None: + return '"%s":%d:%d' % (self.location, self.line, self.column) + else: + return '"%s":%d' % (self.location, self.line) + else: + return '"%s"' % self.location + else: + return None + + @property + def heading_as_str(self): + return '%d: %s' % (self.level, self.message) + + @property + def details_as_str(self): + details_str = '' + locator = self.locator_as_str + if locator is not None: + details_str += '@%s' % locator + if self.snippet is not None: + details_str += '\n%s' % self.snippet + return details_str + + def __str__(self): + heading_str = self.heading_as_str + details = self.details_as_str + if details: + heading_str += ', ' + details + return heading_str http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b2c8379c/extensions/aria_extension_tosca/__init__.py ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/__init__.py b/extensions/aria_extension_tosca/__init__.py new file mode 100644 index 0000000..188b80f --- /dev/null +++ b/extensions/aria_extension_tosca/__init__.py @@ -0,0 +1,46 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +import os.path + +from aria.parser import DSL_SPECIFICATION_PACKAGES +from aria.parser.presentation import PRESENTER_CLASSES +from aria.parser.loading import URI_LOADER_PREFIXES + +from .simple_v1_0 import ToscaSimplePresenter1_0 +from .simple_nfv_v1_0 import ToscaSimpleNfvPresenter1_0 + +def install_aria_extension(): + ''' + Installs the TOSCA extension to ARIA. + ''' + + global PRESENTER_CLASSES # pylint: disable=global-statement + PRESENTER_CLASSES += (ToscaSimplePresenter1_0, ToscaSimpleNfvPresenter1_0) + + # DSL specification + DSL_SPECIFICATION_PACKAGES.append('aria_extension_tosca') + + # Imports + the_dir = os.path.dirname(__file__) + URI_LOADER_PREFIXES.append(os.path.join(the_dir, 'profiles')) + +MODULES = ( + 'simple_v1_0', + 'simple_nfv_v1_0') + +__all__ = ( + 'MODULES', + 'install_aria_extension') http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b2c8379c/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/artifacts.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/artifacts.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/artifacts.yaml new file mode 100644 index 0000000..ef9e5f2 --- /dev/null +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/artifacts.yaml @@ -0,0 +1,121 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +artifact_types: + + tosca.artifacts.Root: + _extensions: + shorthand_name: Root # ommitted in the spec (seems to be a mistake) + type_qualified_name: tosca:Root + specification: tosca-simple-1.0 + specification_section: 5.3.1 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_ARTIFACTS_ROOT' + description: >- + This is the default (root) TOSCA Artifact Type definition that all other TOSCA base Artifact Types derive from. + + tosca.artifacts.File: + _extensions: + shorthand_name: File + type_qualified_name: tosca:File + specification: tosca-simple-1.0 + specification_section: 5.3.2 + description: >- + This artifact type is used when an artifact definition needs to have its associated file simply treated as a file and no special handling/handlers are invoked (i.e., it is not treated as either an implementation or deployment artifact type). + derived_from: tosca.artifacts.Root + + # + # Deployments + # + + tosca.artifacts.Deployment: + _extensions: + shorthand_name: Deployment # ommitted in the spec (seems to be a mistake) + type_qualified_name: tosca:Deployment + specification: tosca-simple-1.0 + specification_section: 5.3.3.1 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_ARTIFACTS_DEPLOYMENT' + description: >- + This artifact type represents the parent type for all deployment artifacts in TOSCA. This class of artifacts typically + represents a binary packaging of an application or service that is used to install/create or deploy it as part of a node's + lifecycle. + derived_from: tosca.artifacts.Root + + tosca.artifacts.Deployment.Image: + _extensions: + shorthand_name: Deployment.Image + type_qualified_name: tosca:Deployment.Image + specification: tosca-simple-1.0 + specification_section: 5.3.3.3 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_ARTIFACTS_DEPLOYMENT_IMAGE' + description: >- + This artifact type represents a parent type for any "image" which is an opaque packaging of a TOSCA Node's deployment + (whether real or virtual) whose contents are typically already installed and pre-configured (i.e., "stateful") and prepared + to be run on a known target container. + derived_from: tosca.artifacts.Deployment + + tosca.artifacts.Deployment.Image.VM: + _extensions: + shorthand_name: Deployment.VM # ommitted in the spec (seems to be a mistake) + type_qualified_name: tosca:Deployment.VM + specification: tosca-simple-1.0 + specification_section: 5.3.3.4 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_ARTIFACTS_DEPLOY_IMAGE_VM' + description: >- + This artifact represents the parent type for all Virtual Machine (VM) image and container formatted deployment artifacts. + These images contain a stateful capture of a machine (e.g., server) including operating system and installed software along + with any configurations and can be run on another machine using a hypervisor which virtualizes typical server (i.e., + hardware) resources. + derived_from: tosca.artifacts.Deployment + + # + # Implementations + # + + tosca.artifacts.Implementation: + _extensions: + shorthand_name: Implementation # ommitted in the spec (seems to be a mistake) + type_qualified_name: tosca:Implementation + specification: tosca-simple-1.0 + specification_section: 5.3.4.1 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_ARTIFACTS_IMPLEMENTATION' + description: >- + This artifact type represents the parent type for all implementation artifacts in TOSCA. These artifacts are used to + implement operations of TOSCA interfaces either directly (e.g., scripts) or indirectly (e.g., config. files). + derived_from: tosca.artifacts.Root + + tosca.artifacts.Implementation.Bash: + _extensions: + shorthand_name: Implementation.Bash # mistake in spec? shouldn't we have "Implementation." as prefix? + type_qualified_name: tosca:Implementation.Bash + specification: tosca-simple-1.0 + specification_section: 5.3.4.3 + description: >- + This artifact type represents a Bash script type that contains Bash commands that can be executed on the Unix Bash shell. + derived_from: tosca.artifacts.Implementation + mime_type: application/x-sh + file_ext: [ sh ] + + tosca.artifacts.Implementation.Python: + _extensions: + shorthand_name: Implementation.Python # mistake in spec? shouldn't we have "Implementation." as prefix? + type_qualified_name: tosca:Implementation.Python + specification: tosca-simple-1.0 + specification_section: 5.3.4.4 + description: >- + This artifact type represents a Python file that contains Python language constructs that can be executed within a Python + interpreter. + derived_from: tosca.artifacts.Implementation + mime_type: application/x-python + file_ext: [ py ] http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b2c8379c/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/capabilities.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/capabilities.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/capabilities.yaml new file mode 100644 index 0000000..2578799 --- /dev/null +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/capabilities.yaml @@ -0,0 +1,319 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +capability_types: + + tosca.capabilities.Root: + _extensions: + shorthand_name: Root # ommitted in the spec (seems to be a mistake) + type_qualified_name: tosca:Root + specification: tosca-simple-1.0 + specification_section: 5.4.1 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_CAPABILITIES_ROOT' + description: >- + This is the default (root) TOSCA Capability Type definition that all other TOSCA Capability Types derive from. + + tosca.capabilities.Node: + _extensions: + shorthand_name: Node + type_qualified_name: tosca:Node + specification: tosca-simple-1.0 + specification_section: 5.4.2 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_CAPABILITIES_NODE' + description: >- + The Node capability indicates the base capabilities of a TOSCA Node Type. + derived_from: tosca.capabilities.Root + + tosca.capabilities.Container: + _extensions: + shorthand_name: Container + type_qualified_name: tosca:Container + specification: tosca-simple-1.0 + specification_section: 5.4.3 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_CAPABILITIES_CONTAINER' + description: >- + The Container capability, when included on a Node Type or Template definition, indicates that the node can act as a container + for (or a host for) one or more other declared Node Types. + derived_from: tosca.capabilities.Root + properties: + num_cpus: + description: >- + Number of (actual or virtual) CPUs associated with the Compute node. + type: integer + constraints: + - greater_or_equal: 1 + required: false + cpu_frequency: + description: >- + Specifies the operating frequency of CPU's core. This property expresses the expected frequency of one (1) CPU as + provided by the property "num_cpus". + type: scalar-unit.frequency + constraints: + - greater_or_equal: 0.1 GHz + required: false + disk_size: + description: >- + Size of the local disk available to applications running on the Compute node (default unit is MB). + type: scalar-unit.size + constraints: + - greater_or_equal: 0 MB + required: false + mem_size: + description: >- + Size of memory available to applications running on the Compute node (default unit is MB). + type: scalar-unit.size + constraints: + - greater_or_equal: 0 MB + required: false + + tosca.capabilities.Attachment: + _extensions: + shorthand_name: Attachment + type_qualified_name: tosca:Attachment + specification: tosca-simple-1.0 + specification_section: 5.4.8 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_CAPABILITIES_ATTACHMENT' + description: >- + This is the default TOSCA type that should be used or extended to define an attachment capability of a (logical) + infrastructure device node (e.g., BlockStorage node). + derived_from: tosca.capabilities.Root + + tosca.capabilities.OperatingSystem: + _extensions: + shorthand_name: OperatingSystem + type_qualified_name: tosca:OperatingSystem + specification: tosca-simple-1.0 + specification_section: 5.4.9 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_CAPABILITIES_OPSYS' + description: >- + This is the default TOSCA type that should be used to express an Operating System capability for a node. + derived_from: tosca.capabilities.Root + properties: + architecture: + description: >- + The Operating System (OS) architecture. Examples of valid values include: x86_32, x86_64, etc. + type: string + required: false + type: + description: >- + The Operating System (OS) type. Examples of valid values include: linux, aix, mac, windows, etc. + type: string + required: false + distribution: + description: >- + The Operating System (OS) distribution. Examples of valid values for a "type" of "Linux" would include: debian, fedora, + rhel and ubuntu. + type: string + required: false + version: + description: >- + The Operating System version. + type: version + required: false + + tosca.capabilities.Scalable: + _extensions: + shorthand_name: Scalable + type_qualified_name: tosca:Scalable + specification: tosca-simple-1.0 + specification_section: 5.4.10 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_CAPABILITIES_SCALABLE' + description: >- + This is the default TOSCA type that should be used to express a scalability capability for a node. + derived_from: tosca.capabilities.Root + properties: + min_instances: + 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. + type: integer + default: 1 + max_instances: + 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. + type: integer + default: 1 + default_instances: + 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. Note: The value for this property MUST be in the range between + the values set for "min_instances" and "max_instances" properties. + type: integer + required: false + + # + # Endpoints + # + + tosca.capabilities.Endpoint: + _extensions: + shorthand_name: Endpoint + type_qualified_name: tosca:Endpoint + specification: tosca-simple-1.0 + specification_section: 5.4.4 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_CAPABILITIES_ENDPOINT' + description: >- + This is the default TOSCA type that should be used or extended to define a network endpoint capability. This includes the information to express a basic endpoint with a single port or a complex endpoint with multiple ports. By default the Endpoint is assumed to represent an address on a private network unless otherwise specified. + derived_from: tosca.capabilities.Root + properties: + protocol: + description: >- + The name of the protocol (i.e., the protocol prefix) that the endpoint accepts (any OSI Layer 4-7 protocols). Examples: + http, https, ftp, tcp, udp, etc. + type: string + default: tcp + required: true + port: + description: >- + The optional port of the endpoint. + type: tosca.datatypes.network.PortDef + required: false + secure: + description: >- + Requests for the endpoint to be secure and use credentials supplied on the ConnectsTo relationship. + type: boolean + default: false + required: false + url_path: + description: >- + The optional URL path of the endpoint's address if applicable for the protocol. + type: string + required: false + port_name: + description: >- + The optional name (or ID) of the network port this endpoint should be bound to. + type: string + required: false + network_name: + description: >- + The optional name (or ID) of the network this endpoint should be bound to. network_name: PRIVATE | PUBLIC | + | . + type: string + default: PRIVATE + required: false + initiator: + description: >- + The optional indicator of the direction of the connection. + type: string + constraints: + - valid_values: [ source, target, peer ] + default: source + required: false + ports: + description: >- + The optional map of ports the Endpoint supports (if more than one). + type: map + entry_schema: + type: tosca.datatypes.network.PortSpec + constraints: + - min_length: 1 + required: false + attributes: + ip_address: + description: >- + Note: This is the IP address as propagated up by the associated node's host (Compute) container. + type: string + + tosca.capabilities.Endpoint.Public: + _extensions: + shorthand_name: Endpoint.Public + type_qualified_name: tosca:Endpoint.Public + specification: tosca-simple-1.0 + specification_section: 5.4.5 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_CAPABILITIES_ENDPOINT_PUBLIC' + description: >- + This capability represents a public endpoint which is accessible to the general internet (and its public IP address ranges). + + This public endpoint capability also can be used to create a floating (IP) address that the underlying network assigns from a + pool allocated from the application's underlying public network. This floating address is managed by the underlying network + such that can be routed an application's private address and remains reliable to internet clients. + derived_from: tosca.capabilities.Endpoint + properties: + network_name: + type: string + constraints: + - equal: PUBLIC + default: PUBLIC + floating: + description: >- + Indicates that the public address should be allocated from a pool of floating IPs that are associated with the network. + type: boolean + default: false + status: experimental + dns_name: + description: >- + The optional name to register with DNS. + type: string + required: false + status: experimental + + tosca.capabilities.Endpoint.Admin: + _extensions: + shorthand_name: Endpoint.Admin + type_qualified_name: tosca:Endpoint.Admin + specification: tosca-simple-1.0 + specification_section: 5.4.6 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_CAPABILITIES_ENDPOINT_ADMIN' + description: >- + This is the default TOSCA type that should be used or extended to define a specialized administrator endpoint capability. + derived_from: tosca.capabilities.Endpoint + properties: + secure: + description: >- + Requests for the endpoint to be secure and use credentials supplied on the ConnectsTo relationship. + type: boolean + constraints: + - equal: true + default: true + + tosca.capabilities.Endpoint.Database: + _extensions: + shorthand_name: Endpoint.Database + type_qualified_name: tosca:Endpoint.Database + specification: tosca-simple-1.0 + specification_section: 5.4.7 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_CAPABILITIES_ENDPOINT_DATABASE' + description: >- + This is the default TOSCA type that should be used or extended to define a specialized database endpoint capability. + derived_from: tosca.capabilities.Endpoint + + # + # Network + # + + tosca.capabilities.network.Bindable: + _extensions: + shorthand_name: Bindable # mistake in spec? has "network." as a prefix + type_qualified_name: tosca:Bindable + specification: tosca-simple-1.0 + specification_section: 5.4.11 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_CAPABILITIES_NETWORK_BINDABLE' + description: >- + A node type that includes the Bindable capability indicates that it can be bound to a logical network association via a + network port. + derived_from: tosca.capabilities.Node + + tosca.capabilities.network.Linkable: + _extensions: + shorthand_name: Linkable + type_qualified_name: tosca:Linkable + specification: tosca-simple-1.0 + specification_section: 7.5.3 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_CAPABILITIES_NETWORK_LINKABLE' + description: >- + A node type that includes the Linkable capability indicates that it can be pointed by tosca.relationships.network.LinksTo + relationship type. + derived_from: tosca.capabilities.Node http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b2c8379c/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/data.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/data.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/data.yaml new file mode 100644 index 0000000..ef787b7 --- /dev/null +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/data.yaml @@ -0,0 +1,268 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +data_types: + + # + # Primitive + # + + timestamp: + _extensions: + coerce_value: aria_extension_tosca.simple_v1_0.data_types.coerce_timestamp + + version: + _extensions: + coerce_value: aria_extension_tosca.simple_v1_0.data_types.coerce_version + type_qualified_name: tosca:version + specification: tosca-simple-1.0 + specification_section: 3.2.2 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#TYPE_TOSCA_VERSION' + + range: + _extensions: + coerce_value: aria_extension_tosca.simple_v1_0.data_types.coerce_range + type_qualified_name: tosca:range + specification: tosca-simple-1.0 + specification_section: 3.2.3 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#TYPE_TOSCA_RANGE' + + # + # With entry schema + # + + list: + _extensions: + use_entry_schema: true + coerce_value: aria_extension_tosca.simple_v1_0.data_types.coerce_list + type_qualified_name: tosca:list + specification: tosca-simple-1.0 + specification_section: 3.2.4 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#TYPE_TOSCA_LIST' + + map: + _extensions: + use_entry_schema: true + coerce_value: aria_extension_tosca.simple_v1_0.data_types.coerce_map_value + type_qualified_name: tosca:map + specification: tosca-simple-1.0 + specification_section: 3.2.5 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#TYPE_TOSCA_MAP' + + # + # Scalar + # + + scalar-unit.size: + _extensions: + coerce_value: aria_extension_tosca.simple_v1_0.data_types.coerce_scalar_unit_size + type_qualified_name: tosca:scalar-unit.size + specification: tosca-simple-1.0 + specification_section: 3.2.6.4 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#TYPE_TOSCA_SCALAR_UNIT_SIZE' + + scalar-unit.time: + _extensions: + coerce_value: aria_extension_tosca.simple_v1_0.data_types.coerce_scalar_unit_time + type_qualified_name: tosca:scalar-unit.time + specification: tosca-simple-1.0 + specification_section: 3.2.6.5 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#TYPE_TOSCA_SCALAR_UNIT_TIME' + + scalar-unit.frequency: + _extensions: + coerce_value: aria_extension_tosca.simple_v1_0.data_types.coerce_scalar_unit_frequency + type_qualified_name: tosca:scalar-unit.frequency + specification: tosca-simple-1.0 + specification_section: 3.2.6.6 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#TYPE_TOSCA_SCALAR_UNIT_FREQUENCY' + + # + # Complex + # + + tosca.datatypes.Root: + _extensions: + shorthand_name: Root # ommitted in the spec (seems to be a mistake) + type_qualified_name: tosca:Root + specification: tosca-simple-1.0 + specification_section: 5.2.1 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#TYPE_TOSCA_DATA_ROOT' + description: >- + This is the default (root) TOSCA Root Type definition that all complex TOSCA Data Types derive from. + + tosca.datatypes.Credential: + _extensions: + shorthand_name: Credential + type_qualified_name: tosca:Credential + specification: tosca-simple-1.0 + specification_section: 5.2.2 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#TYPE_TOSCA_DATA_CREDENTIAL' + description: >- + The Credential type is a complex TOSCA data Type used when describing authorization credentials used to access network + accessible resources. + derived_from: tosca.datatypes.Root + properties: + protocol: + description: >- + The optional protocol name. + type: string + required: false + token_type: + description: >- + The required token type. + type: string + default: password + token: + description: >- + The required token used as a credential for authorization or access to a networked resource. + type: string + required: false + keys: + description: >- + The optional list of protocol-specific keys or assertions. + type: map + entry_schema: + type: string + required: false + user: + description: >- + The optional user (name or ID) used for non-token based credentials. + type: string + required: false + + tosca.datatypes.network.NetworkInfo: + _extensions: + shorthand_name: NetworkInfo + type_qualified_name: tosca:NetworkInfo + specification: tosca-simple-1.0 + specification_section: 5.2.3 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#TYPE_TOSCA_DATA_NETWORKINFO' + description: >- + The Network type is a complex TOSCA data type used to describe logical network information. + derived_from: tosca.datatypes.Root + properties: + network_name: + description: >- + The name of the logical network. e.g., "public", "private", "admin". etc. + type: string + required: false + network_id: + description: >- + The unique ID of for the network generated by the network provider. + type: string + required: false + addresses: + description: >- + The list of IP addresses assigned from the underlying network. + type: list + entry_schema: + type: string + required: false + + tosca.datatypes.network.PortInfo: + _extensions: + shorthand_name: PortInfo + type_qualified_name: tosca:PortInfo + specification: tosca-simple-1.0 + specification_section: 5.2.4 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#TYPE_TOSCA_DATA_PORTINFO' + description: >- + The PortInfo type is a complex TOSCA data type used to describe network port information. + derived_from: tosca.datatypes.Root + properties: + port_name: + description: >- + The logical network port name. + type: string + required: false + port_id: + description: >- + The unique ID for the network port generated by the network provider. + type: string + required: false + network_id: + description: >- + The unique ID for the network. + type: string + required: false + mac_address: + description: >- + The unique media access control address (MAC address) assigned to the port. + type: string + required: false + addresses: + description: >- + The list of IP address(es) assigned to the port. + type: list + entry_schema: + type: string + required: false + + tosca.datatypes.network.PortDef: + _extensions: + shorthand_name: PortDef + type_qualified_name: tosca:PortDef + specification: tosca-simple-1.0 + specification_section: 5.2.5 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#TYPE_TOSCA_DATA_PORTDEF' + description: >- + The PortDef type is a TOSCA data Type used to define a network port. + derived_from: integer # ARIA allows deriving from primitives; it's unclear if the TOSCA spec does + constraints: + - in_range: [ 1, 65535 ] + + tosca.datatypes.network.PortSpec: + _extensions: + shorthand_name: PortSpec + type_qualified_name: tosca:PortSpec + specification: tosca-simple-1.0 + specification_section: 5.2.6 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#TYPE_TOSCA_DATA_PORTSPEC' + description: >- + The PortSpec type is a complex TOSCA data Type used when describing port specifications for a network connection. + derived_from: tosca.datatypes.Root + properties: + protocol: + description: >- + The required protocol used on the port. + type: string + constraints: + - valid_values: [ udp, tcp, igmp ] + default: tcp + source: + description: >- + The optional source port. + type: tosca.datatypes.network.PortDef + required: false + source_range: + description: >- + The optional range for source port. + type: range + constraints: + - in_range: [ 1, 65535 ] + required: false + target: + description: >- + The optional target port. + type: tosca.datatypes.network.PortDef + required: false + target_range: + description: >- + The optional range for target port. + type: range + constraints: + - in_range: [ 1, 65535 ] + required: false http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b2c8379c/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/groups.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/groups.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/groups.yaml new file mode 100644 index 0000000..08da2f3 --- /dev/null +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/groups.yaml @@ -0,0 +1,28 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +group_types: + + tosca.groups.Root: + _extensions: + shorthand_name: Root # ommitted in the spec (seems to be a mistake) + type_qualified_name: tosca:Root + specification: tosca-simple-1.0 + specification_section: 5.9.1 + description: >- + This is the default (root) TOSCA Group Type definition that all other TOSCA base Group Types derive from. + interfaces: + standard: + type: tosca.interfaces.node.lifecycle.Standard http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b2c8379c/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/interfaces.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/interfaces.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/interfaces.yaml new file mode 100644 index 0000000..dd84d43 --- /dev/null +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/interfaces.yaml @@ -0,0 +1,86 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +interface_types: + + tosca.interfaces.Root: + _extensions: + shorthand_name: Root # ommitted in the spec (seems to be a mistake) + type_qualified_name: tosca:Root + specification: tosca-simple-1.0 + specification_section: 5.7.3 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#_Ref384391055' + description: >- + This is the default (root) TOSCA Interface Type definition that all other TOSCA Interface Types derive from. + + tosca.interfaces.node.lifecycle.Standard: + _extensions: + shorthand_name: Standard + type_qualified_name: tosca:Standard + specification: tosca-simple-1.0 + specification_section: 5.7.4 + description: >- + This lifecycle interface defines the essential, normative operations that TOSCA nodes may support. + derived_from: tosca.interfaces.Root + 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: + _extensions: + shorthand_name: Configure + type_qualified_name: tosca:Configure + specification: tosca-simple-1.0 + specification_section: 5.7.5 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_ITFC_RELATIONSHIP_CONFIGURE' + description: >- + The lifecycle interfaces define the essential, normative operations that each TOSCA Relationship Types may support. + derived_from: tosca.interfaces.Root + 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 notify the source node of a target node being added via a relationship. + add_source: + description: >- + Operation to notify the target node of a source node which is now available via a relationship. + target_changed: + description: >- + Operation to notify source some property or attribute of the target changed + remove_target: + description: >- + Operation to remove a target node. http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b2c8379c/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/nodes.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/nodes.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/nodes.yaml new file mode 100644 index 0000000..2d1b407 --- /dev/null +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/nodes.yaml @@ -0,0 +1,523 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +node_types: + + tosca.nodes.Root: + _extensions: + shorthand_name: Root + type_qualified_name: tosca:Root + specification: tosca-simple-1.0 + specification_section: 5.8.1 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_NODES_ROOT' + description: >- + The TOSCA Root Node Type is the default type that all other TOSCA base Node Types derive from. This allows for all TOSCA nodes to have a consistent set of features for modeling and management (e.g., consistent definitions for requirements, capabilities and lifecycle interfaces). + attributes: + tosca_id: + description: >- + A unique identifier of the realized instance of a Node Template that derives from any TOSCA normative type. + type: string + tosca_name: + description: >- + This attribute reflects the name of the Node Template as defined in the TOSCA service template. This name is not unique + to the realized instance model of corresponding deployed application as each template in the model can result in one or + more instances (e.g., scaled) when orchestrated to a provider environment. + type: string + state: + description: >- + The state of the node instance. + type: string + default: initial + interfaces: + Standard: + type: tosca.interfaces.node.lifecycle.Standard + capabilities: + feature: + type: tosca.capabilities.Node + requirements: + - dependency: + capability: tosca.capabilities.Node + node: tosca.nodes.Root + relationship: tosca.relationships.DependsOn + occurrences: [ 0, UNBOUNDED ] + + tosca.nodes.Compute: + _extensions: + shorthand_name: Compute + type_qualified_name: tosca:Compute + specification: tosca-simple-1.0 + specification_section: 5.8.2 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_NODES_COMPUTE' + description: >- + The TOSCA Compute node represents one or more real or virtual processors of software applications or services along with + other essential local resources. Collectively, the resources the compute node represents can logically be viewed as a (real + or virtual) "server". + derived_from: tosca.nodes.Root + attributes: + private_address: + description: >- + The primary private IP address assigned by the cloud provider that applications may use to access the Compute node. + type: string + public_address: + description: >- + The primary public IP address assigned by the cloud provider that applications may use to access the Compute node. + type: string + networks: + description: >- + The list of logical networks assigned to the compute host instance and information about them. + type: map + entry_schema: + type: tosca.datatypes.network.NetworkInfo + ports: + description: >- + The list of logical ports assigned to the compute host instance and information about them. + type: map + entry_schema: + type: tosca.datatypes.network.PortInfo + capabilities: + host: + type: tosca.capabilities.Container + valid_source_types: [ tosca.nodes.SoftwareComponent ] + binding: + type: tosca.capabilities.network.Bindable + os: + type: tosca.capabilities.OperatingSystem + scalable: + type: tosca.capabilities.Scalable + requirements: + - local_storage: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: [ 0, UNBOUNDED ] + + tosca.nodes.LoadBalancer: + _extensions: + shorthand_name: LoadBalancer + type_qualified_name: tosca:LoadBalancer + specification: tosca-simple-1.0 + specification_section: 5.8.12 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#_Toc379548332' + description: >- + The TOSCA Load Balancer node represents logical function that be used in conjunction with a Floating Address to distribute an + application's traffic (load) across a number of instances of the application (e.g., for a clustered or scaled application). + derived_from: tosca.nodes.Root + properties: + algorithm: + description: >- + No description in spec. + type: string + required: false + status: experimental + capabilities: + client: + description: >- + The Floating (IP) client's on the public network can connect to. + type: tosca.capabilities.Endpoint.Public + occurrences: [ 0, UNBOUNDED ] # Note: it seems unnecessary to specify this, as it is the implied default + requirements: + - application: + capability: tosca.capabilities.Endpoint + relationship: tosca.relationships.RoutesTo + occurrences: [ 0, UNBOUNDED ] + + # + # Software + # + + tosca.nodes.SoftwareComponent: + _extensions: + shorthand_name: SoftwareComponent + type_qualified_name: tosca:SoftwareComponent + specification: tosca-simple-1.0 + specification_section: 5.8.3 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_NODES_SOFTWARE_COMPONENT' + description: >- + The TOSCA SoftwareComponent node represents a generic software component that can be managed and run by a TOSCA Compute Node + Type. + derived_from: tosca.nodes.Root + properties: + component_version: + description: >- + The optional software component's version. + type: version + required: false + admin_credential: + description: >- + The optional credential that can be used to authenticate to the software component. + type: tosca.datatypes.Credential + required: false + requirements: + - host: + capability: tosca.capabilities.Container + node: tosca.nodes.Compute + relationship: tosca.relationships.HostedOn + + tosca.nodes.WebServer: + _extensions: + shorthand_name: WebServer + type_qualified_name: tosca:WebServer + specification: tosca-simple-1.0 + specification_section: 5.8.4 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_NODES_WEBSERVER' + description: >- + This TOSCA WebServer Node Type represents an abstract software component or service that is capable of hosting and providing + management operations for one or more WebApplication nodes. + 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: + _extensions: + shorthand_name: WebApplication + type_qualified_name: tosca:WebApplication + specification: tosca-simple-1.0 + specification_section: 5.8.5 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_NODES_WEBAPPLICATION' + description: >- + The TOSCA WebApplication node represents a software application that can be managed and run by a TOSCA WebServer node. + Specific types of web applications such as Java, etc. could be derived from this type. + derived_from: tosca.nodes.SoftwareComponent # the spec says tosca.nodes.Root, but this seems to be a mistake + properties: + context_root: + description: >- + The web application's context root which designates the application's URL path within the web server it is hosted on. + type: string + required: false + capabilities: + app_endpoint: + type: tosca.capabilities.Endpoint + requirements: + - host: + capability: tosca.capabilities.Container + node: tosca.nodes.WebServer + relationship: tosca.relationships.HostedOn + + tosca.nodes.DBMS: + _extensions: + shorthand_name: DBMS # ommitted in the spec (seems to be a mistake) + type_qualified_name: tosca:DBMS + specification: tosca-simple-1.0 + specification_section: 5.8.6 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_NODES_DBMS' + description: >- + The TOSCA DBMS node represents a typical relational, SQL Database Management System software component or service. + derived_from: tosca.nodes.SoftwareComponent + properties: + root_password: + description: >- + The optional root password for the DBMS server. + type: string + required: false + port: + description: >- + The DBMS server's port. + type: integer + required: false + capabilities: + host: + type: tosca.capabilities.Container + valid_source_types: [ tosca.nodes.Database ] + + tosca.nodes.Database: + _extensions: + shorthand_name: Database + type_qualified_name: tosca:Database + specification: tosca-simple-1.0 + specification_section: 5.8.7 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_NODES_DATABASE' + description: >- + The TOSCA Database node represents a logical database that can be managed and hosted by a TOSCA DBMS node. + derived_from: tosca.nodes.Root # note, it's *not* a SoftwareComponent + properties: + name: + description: >- + The logical database Name. + type: string + port: + description: >- + The port the database service will use to listen for incoming data and requests. + type: integer + required: false + user: + description: >- + The special user account used for database administration. + type: string + required: false + password: + description: >- + The password associated with the user account provided in the 'user' property. + type: string + required: false + capabilities: + database_endpoint: + type: tosca.capabilities.Endpoint.Database + requirements: + - host: + capability: tosca.capabilities.Container + node: tosca.nodes.DBMS + relationship: tosca.relationships.HostedOn + + # + # Container + # + + tosca.nodes.Container.Runtime: + _extensions: + shorthand_name: Container.Runtime + type_qualified_name: tosca:Container.Runtime + specification: tosca-simple-1.0 + specification_section: 5.8.10 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_NODES_CONTAINER_RUNTIME' + description: >- + The TOSCA Container Runtime node represents operating system-level virtualization technology used to run multiple application + services on a single Compute host. + derived_from: tosca.nodes.SoftwareComponent + capabilities: + host: + type: tosca.capabilities.Container + scalable: + type: tosca.capabilities.Scalable + + tosca.nodes.Container.Application: + _extensions: + shorthand_name: Container.Application + type_qualified_name: tosca:Container.Application + specification: tosca-simple-1.0 + specification_section: 5.8.11 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_NODES_CONTAINER_APP' + description: >- + The TOSCA Container Application node represents an application that requires Container-level virtualization technology. + derived_from: tosca.nodes.Root + requirements: + - host: + capability: tosca.capabilities.Container + #node: tosca.nodes.Container # seems to be a mistake in the spec + relationship: tosca.relationships.HostedOn + + # + # Storage + # + + tosca.nodes.ObjectStorage: + _extensions: + shorthand_name: ObjectStorage + type_qualified_name: tosca:ObjectStorage + specification: tosca-simple-1.0 + specification_section: 5.8.8 + 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. + derived_from: tosca.nodes.Root + properties: + name: + description: >- + The logical name of the object store (or container). + type: string + size: + description: >- + The requested initial storage size (default unit is in Gigabytes). + type: scalar-unit.size + constraints: + - greater_or_equal: 0 GB + required: false + maxsize: + description: >- + The requested maximum storage size (default unit is in Gigabytes). + type: scalar-unit.size + constraints: + - greater_or_equal: 0 GB + required: false + capabilities: + storage_endpoint: + type: tosca.capabilities.Endpoint + + tosca.nodes.BlockStorage: + _extensions: + shorthand_name: BlockStorage + type_qualified_name: tosca:BlockStorage + specification: tosca-simple-1.0 + specification_section: 5.8.9 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_NODES_BLOCK_STORAGE' + description: >- + derived_from: tosca.nodes.Root + properties: + size: + description: >- + The requested storage size (default unit is MB). + type: scalar-unit.size + constraints: + - greater_or_equal: 1 MB + volume_id: + description: >- + ID of an existing volume (that is in the accessible scope of the requesting application). + type: string + required: false + snapshot_id: + description: >- + Some identifier that represents an existing snapshot that should be used when creating the block storage (volume). + type: string + required: false + capabilities: + attachment: + type: tosca.capabilities.Attachment + + # + # Network + # + + tosca.nodes.network.Network: + _extensions: + shorthand_name: Network + type_qualified_name: tosca:Network + specification: tosca-simple-1.0 + specification_section: 7.5.1 + description: >- + The TOSCA Network node represents a simple, logical network service. + derived_from: tosca.nodes.Root + properties: + ip_version: + description: >- + The IP version of the requested network. + type: integer + constraints: + - valid_values: [ 4, 6 ] + default: 4 + required: false + cidr: + description: >- + The cidr block of the requested network. + type: string + required: false + start_ip: + description: >- + The IP address to be used as the 1st one in a pool of addresses derived from the cidr block full IP range. + type: string + required: false + end_ip: + description: >- + The IP address to be used as the last one in a pool of addresses derived from the cidr block full IP range. + type: string + required: false + gateway_ip: + description: >- + The gateway IP address. + type: string + required: false + network_name: + description: >- + An Identifier that represents an existing Network instance in the underlying cloud infrastructure - OR - be used as the + name of the new created network. + type: string + required: false + network_id: + 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. + type: string + required: false + segmentation_id: + description: >- + A segmentation identifier in the underlying cloud infrastructure (e.g., VLAN id, GRE tunnel id). If the segmentation_id + is specified, the network_type or physical_network properties should be provided as well. + type: string + required: false + network_type: + description: >- + Optionally, specifies the nature of the physical network in the underlying cloud infrastructure. Examples are flat, vlan, + gre or vxlan. For flat and vlan types, physical_network should be provided too. + type: string + required: false + physical_network: + description: >- + Optionally, identifies the physical network on top of which the network is implemented, e.g. physnet1. This property is + required if network_type is flat or vlan. + type: string + required: false + dhcp_enabled: + description: >- + Indicates the TOSCA container to create a virtual network instance with or without a DHCP service. + type: boolean + default: true + required: false + capabilities: + link: + type: tosca.capabilities.network.Linkable + + tosca.nodes.network.Port: + _extensions: + shorthand_name: Port + type_qualified_name: tosca:Port + specification: tosca-simple-1.0 + specification_section: 7.5.2 + 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. + derived_from: tosca.nodes.Root + properties: + ip_address: + description: >- + Allow the user to set a fixed IP address. Note that this address is a request to the provider which they will attempt to + fulfill but may not be able to dependent on the network the port is associated with. + type: string + required: false + order: + description: >- + The order of the NIC on the compute instance (e.g. eth2). Note: when binding more than one port to a single compute (aka + multi vNICs) and ordering is desired, it is *mandatory* that all ports will be set with an order value and. The order + values must represent a positive, arithmetic progression that starts with 0 (e.g. 0, 1, 2, ..., n). + type: integer + constraints: + - greater_or_equal: 0 + default: 0 + required: false + is_default: + description: >- + Set is_default=true to apply a default gateway route on the running compute instance to the associated network gateway. + Only one port that is associated to single compute node can set as default=true. + type: boolean + default: false + required: false + ip_range_start: + description: >- + Defines the starting IP of a range to be allocated for the compute instances that are associated by this Port. Without + setting this property the IP allocation is done from the entire CIDR block of the network. + type: string + required: false + ip_range_end: + description: >- + Defines the ending IP of a range to be allocated for the compute instances that are associated by this Port. Without + setting this property the IP allocation is done from the entire CIDR block of the network. + type: string + required: false + attributes: + ip_address: + description: >- + The IP address would be assigned to the associated compute instance. + type: string + requirements: + - link: + capability: tosca.capabilities.network.Linkable + relationship: tosca.relationships.network.LinksTo + - binding: + capability: tosca.capabilities.network.Bindable + relationship: tosca.relationships.network.BindsTo http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b2c8379c/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/policies.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/policies.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/policies.yaml new file mode 100644 index 0000000..d840b14 --- /dev/null +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/policies.yaml @@ -0,0 +1,71 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +policy_types: + + tosca.policies.Root: + _extensions: + shorthand_name: Root # ommitted in the spec (seems to be a mistake) + type_qualified_name: tosca:Root + specification: tosca-simple-1.0 + specification_section: 5.10.1 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_POLICIES_ROOT' + description: >- + This is the default (root) TOSCA Policy Type definition that all other TOSCA base Policy Types derive from. + + tosca.policies.Placement: + _extensions: + shorthand_name: Placement # ommitted in the spec (seems to be a mistake) + type_qualified_name: tosca:Placement + specification: tosca-simple-1.0 + specification_section: 5.10.2 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_POLICIES_PLACEMENT' + description: >- + This is the default (root) TOSCA Policy Type definition that is used to govern placement of TOSCA nodes or groups of nodes. + derived_from: tosca.policies.Root + + tosca.policies.Scaling: + _extensions: + shorthand_name: Scaling # ommitted in the spec (seems to be a mistake) + type_qualified_name: tosca:Scaling + specification: tosca-simple-1.0 + specification_section: 5.10.3 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_POLICIES_SCALING' + description: >- + This is the default (root) TOSCA Policy Type definition that is used to govern scaling of TOSCA nodes or groups of nodes. + derived_from: tosca.policies.Root + + tosca.policies.Update: + _extensions: + shorthand_name: Update # ommitted in the spec (seems to be a mistake) + type_qualified_name: tosca:Update + specification: tosca-simple-1.0 + specification_section: 5.10.4 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_POLICIES_UPDATE' + description: >- + This is the default (root) TOSCA Policy Type definition that is used to govern update of TOSCA nodes or groups of nodes. + derived_from: tosca.policies.Root + + tosca.policies.Performance: + _extensions: + shorthand_name: Performance # ommitted in the spec (seems to be a mistake) + type_qualified_name: tosca:Performance + specification: tosca-simple-1.0 + specification_section: 5.10.5 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_POLICIES_PERFORMANCE' + description: >- + This is the default (root) TOSCA Policy Type definition that is used to declare performance requirements for TOSCA nodes or + groups of nodes. + derived_from: tosca.policies.Root http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b2c8379c/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/relationships.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/relationships.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/relationships.yaml new file mode 100644 index 0000000..212ccfa --- /dev/null +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/relationships.yaml @@ -0,0 +1,158 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +relationship_types: + + tosca.relationships.Root: + _extensions: + shorthand_name: Root # ommitted in the spec (seems to be a mistake) + type_qualified_name: tosca:Root + specification: tosca-simple-1.0 + specification_section: 5.6.1 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_RELATIONSHIPS_ROOT' + description: >- + This is the default (root) TOSCA Relationship Type definition that all other TOSCA Relationship Types derive from. + attributes: + tosca_id: + description: >- + A unique identifier of the realized instance of a Relationship Template that derives from any TOSCA normative type. + type: string + tosca_name: + description: >- + This attribute reflects the name of the Relationship Template as defined in the TOSCA service template. This name is not + unique to the realized instance model of corresponding deployed application as each template in the model can result in + one or more instances (e.g., scaled) when orchestrated to a provider environment. + type: string + state: + description: >- + The state of the relationship instance. + type: string + default: initial + interfaces: + Configure: + type: tosca.interfaces.relationship.Configure + + tosca.relationships.DependsOn: + _extensions: + shorthand_name: DependsOn + type_qualified_name: tosca:DependsOn + specification: tosca-simple-1.0 + specification_section: 5.6.2 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_RELATIONSHIPS_DEPENDSON' + description: >- + This type represents a general dependency relationship between two nodes. + derived_from: tosca.relationships.Root + valid_target_types: [ tosca.capabilities.Node ] + + tosca.relationships.HostedOn: + _extensions: + shorthand_name: HostedOn + type_qualified_name: tosca:HostedOn + specification: tosca-simple-1.0 + specification_section: 5.6.3 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_RELATIONSHIPS_HOSTEDON' + description: >- + This type represents a hosting relationship between two nodes. + derived_from: tosca.relationships.Root + valid_target_types: [ tosca.capabilities.Container ] + + tosca.relationships.ConnectsTo: + _extensions: + shorthand_name: ConnectsTo + type_qualified_name: tosca:ConnectsTo + specification: tosca-simple-1.0 + specification_section: 5.6.4 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_RELATIONSHIPS_CONNECTSTO' + description: >- + This type represents a network connection relationship between two nodes. + derived_from: tosca.relationships.Root + valid_target_types: [ tosca.capabilities.Endpoint ] + properties: + credential: + type: tosca.datatypes.Credential + required: false + + tosca.relationships.AttachesTo: + _extensions: + shorthand_name: AttachesTo + type_qualified_name: tosca:AttachesTo + specification: tosca-simple-1.0 + specification_section: 5.6.5 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_RELATIONSHIPS_ATTACHTO' + description: >- + This type represents an attachment relationship between two nodes. For example, an AttachesTo relationship type would be used + for attaching a storage node to a Compute node. + derived_from: tosca.relationships.Root + valid_target_types: [ tosca.capabilities.Attachment ] + properties: + location: + description: >- + The relative location (e.g., path on the file system), which provides the root location to address an attached node. + e.g., a mount point / path such as '/usr/data'. Note: The user must provide it and it cannot be "root". + type: string + constraints: + - min_length: 1 + device: + description: >- + The logical device name which for the attached device (which is represented by the target node in the model). e.g., + '/dev/hda1'. + type: string + required: false + attributes: + device: + description: >- + The logical name of the device as exposed to the instance. + Note: A runtime property that gets set when the model gets instantiated by the orchestrator. + type: string + + tosca.relationships.RoutesTo: + _extensions: + shorthand_name: RoutesTo + type_qualified_name: tosca:RoutesTo + specification: tosca-simple-1.0 + specification_section: 5.6.6 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#_Toc397688815' + description: >- + This type represents an intentional network routing between two Endpoints in different networks. + derived_from: tosca.relationships.ConnectsTo + valid_target_types: [ tosca.capabilities.Endpoint ] + + # + # Network + # + + tosca.relationships.network.LinksTo: + _extensions: + shorthand_name: LinksTo + type_qualified_name: tosca:LinksTo + specification: tosca-simple-1.0 + specification_section: 7.5.4 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_RELATIONSHIPS_NETWORK_LINKSTO' + description: >- + This relationship type represents an association relationship between Port and Network node types. + derived_from: tosca.relationships.DependsOn + valid_target_types: [ tosca.capabilities.network.Linkable ] + + tosca.relationships.network.BindsTo: + _extensions: + shorthand_name: network.BindsTo # mistake in spec? this seems different than the usual shorthand convention + type_qualified_name: tosca:BindsTo + specification: tosca-simple-1.0 + specification_section: 7.5.5 + specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_RELATIONSHIPS_NETWORK_BINDTO' + description: >- + This type represents a network association relationship between Port and Compute node types. + derived_from: tosca.relationships.DependsOn + valid_target_types: [ tosca.capabilities.network.Bindable ] http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b2c8379c/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/tosca-simple-1.0.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/tosca-simple-1.0.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/tosca-simple-1.0.yaml new file mode 100644 index 0000000..f8cc520 --- /dev/null +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/tosca-simple-1.0.yaml @@ -0,0 +1,24 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +imports: + - artifacts.yaml + - capabilities.yaml + - data.yaml + - groups.yaml + - interfaces.yaml + - nodes.yaml + - policies.yaml + - relationships.yaml http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b2c8379c/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml new file mode 100644 index 0000000..7be18a6 --- /dev/null +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml @@ -0,0 +1,108 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +capability_types: + + tosca.capabilities.Compute.Container.Architecture: + _extensions: + shorthand_name: Compute.Container.Architecture + type_qualified_name: tosca:Compute.Container.Architecture + specification: tosca-simple-nfv-1.0 + specification_section: 8.2.1 + specification_url: 'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd03/tosca-nfv-v1.0-csd03.html#DEFN_TYPE_CAPABILITIES_CONTAINER' + description: >- + Enhance compute architecture capability that needs to be typically use for performance sensitive NFV workloads. + derived_from: tosca.capabilities.Container + properties: + mem_page_size: + description: >- + Describe page size of the VM: + + * small page size is typically 4KB + * large page size is typically 2MB + * any page size maps to system default + * custom MB value: sets TLB size to this specific value + type: string + #constraints: # seems wrong in the spec + # - [ normal, huge ] + cpu_allocation: + description: >- + Describes CPU allocation requirements like dedicated CPUs (cpu pinning), socket count, thread count, etc. + type: tosca.datatypes.compute.Container.Architecture.CPUAllocation + required: false + numa_node_count: + description: >- + Specifies the symmetric count of NUMA nodes to expose to the VM. vCPU and Memory equally split across this number of + NUMA. + + NOTE: the map of numa_nodes should not be specified. + type: integer + required: false + numa_nodes: + description: >- + Asymmetric allocation of vCPU and Memory across the specific NUMA nodes (CPU sockets and memory banks). + + NOTE: symmetric numa_node_count should not be specified. + type: map + entry_schema: tosca.datatypes.compute.Container.Architecture.NUMA + required: false + + tosca.capabilities.nfv.VirtualBindable: + _extensions: + shorthand_name: VirtualBindable + type_qualified_name: tosca:VirtualBindable + specification: tosca-simple-nfv-1.0 + specification_section: 8.2.2 + specification_url: 'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd03/tosca-nfv-v1.0-csd03.html#_Toc419290220' + description: >- + A node type that includes the VirtualBindable capability indicates that it can be pointed by + tosca.relationships.nfv.VirtualBindsTo relationship type. + derived_from: tosca.capabilities.Node + + tosca.capabilities.nfv.Metric: + _extensions: + shorthand_name: Metric + type_qualified_name: tosca:Metric + specification: tosca-simple-nfv-1.0 + specification_section: 8.2.3 + specification_url: 'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd03/tosca-nfv-v1.0-csd03.html#_Toc418607874' + description: >- + A node type that includes the Metric capability indicates that it can be monitored using an nfv.relationships.Monitor + relationship type. + derived_from: tosca.capabilities.Endpoint + + tosca.capabilities.nfv.Forwarder: + _extensions: + shorthand_name: Forwarder + type_qualified_name: tosca:Forwarder + specification: tosca-simple-nfv-1.0 + specification_section: 10.3.1 + specification_url: 'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd03/tosca-nfv-v1.0-csd03.html#_Toc447714718' + description: >- + A node type that includes the Forwarder capability indicates that it can be pointed by tosca.relationships.nfv.FowardsTo + relationship type. + derived_from: tosca.capabilities.Root + + tosca.capabilities.nfv.VirtualLinkable: + _extensions: + shorthand_name: VirtualLinkable + type_qualified_name: tosca:VirtualLinkable + specification: tosca-simple-nfv-1.0 + specification_section: 11.3.1 + specification_url: 'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd03/tosca-nfv-v1.0-csd03.html#_Toc447714735' + description: >- + A node type that includes the VirtualLinkable capability indicates that it can be pointed by + tosca.relationships.nfv.VirtualLinksTo relationship type. + derived_from: tosca.capabilities.Node