summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser
diff options
context:
space:
mode:
Diffstat (limited to 'tosca2heat/tosca-parser')
-rw-r--r--tosca2heat/tosca-parser/toscaparser/elements/TOSCA_definition_1_0.yaml10
-rw-r--r--tosca2heat/tosca-parser/toscaparser/elements/nodetype.py20
-rw-r--r--tosca2heat/tosca-parser/toscaparser/extensions/nfv/TOSCA_nfv_definition_1_0.yaml5
3 files changed, 13 insertions, 22 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/elements/TOSCA_definition_1_0.yaml b/tosca2heat/tosca-parser/toscaparser/elements/TOSCA_definition_1_0.yaml
index f8d781c..c1c1cd4 100644
--- a/tosca2heat/tosca-parser/toscaparser/elements/TOSCA_definition_1_0.yaml
+++ b/tosca2heat/tosca-parser/toscaparser/elements/TOSCA_definition_1_0.yaml
@@ -898,6 +898,16 @@ tosca.policies.Placement:
description: The TOSCA Policy Type definition that is used to govern
placement of TOSCA nodes or groups of nodes.
+tosca.policies.Placement.Colocate:
+ derived_from: tosca.policies.Placement
+ description: The TOSCA Policy Type definition that is used to govern
+ colocate placement of TOSCA nodes or groups of nodes.
+
+tosca.policies.Placement.Antilocate:
+ derived_from: tosca.policies.Placement
+ description: The TOSCA Policy Type definition that is used to govern
+ anti-locate placement of TOSCA nodes or groups of nodes.
+
tosca.policies.Scaling:
derived_from: tosca.policies.Root
description: The TOSCA Policy Type definition that is used to govern
diff --git a/tosca2heat/tosca-parser/toscaparser/elements/nodetype.py b/tosca2heat/tosca-parser/toscaparser/elements/nodetype.py
index 8176def..148d2b6 100644
--- a/tosca2heat/tosca-parser/toscaparser/elements/nodetype.py
+++ b/tosca2heat/tosca-parser/toscaparser/elements/nodetype.py
@@ -12,7 +12,6 @@
from toscaparser.common.exception import ExceptionCollector
from toscaparser.common.exception import UnknownFieldError
-from toscaparser.common.exception import ValidationError
from toscaparser.elements.capabilitytype import CapabilityTypeDef
import toscaparser.elements.interfaces as ifaces
from toscaparser.elements.interfaces import InterfacesDef
@@ -160,24 +159,7 @@ class NodeType(StatefulEntityType):
return self.get_value(self.REQUIREMENTS, None, True)
def get_all_requirements(self):
- requires = self.requirements
- parent_node = self.parent_type
- if requires is None:
- requires = self.get_value(self.REQUIREMENTS, None, True)
- if parent_node is None:
- ExceptionCollector.appendException(
- ValidationError(message="parent_node is "
- + str(parent_node)))
- else:
- parent_node = parent_node.parent_type
- if parent_node:
- while parent_node.type != 'tosca.nodes.Root':
- req = parent_node.get_value(self.REQUIREMENTS, None, True)
- for r in req:
- if r not in requires:
- requires.append(r)
- parent_node = parent_node.parent_type
- return requires
+ return self.requirements
@property
def interfaces(self):
diff --git a/tosca2heat/tosca-parser/toscaparser/extensions/nfv/TOSCA_nfv_definition_1_0.yaml b/tosca2heat/tosca-parser/toscaparser/extensions/nfv/TOSCA_nfv_definition_1_0.yaml
index b82250e..660cdc0 100644
--- a/tosca2heat/tosca-parser/toscaparser/extensions/nfv/TOSCA_nfv_definition_1_0.yaml
+++ b/tosca2heat/tosca-parser/toscaparser/extensions/nfv/TOSCA_nfv_definition_1_0.yaml
@@ -65,7 +65,7 @@ tosca.nodes.nfv.CP:
required: false
requirements:
- virtualLink:
- capability: tosca.capabilities.VirtualLinkable
+ capability: tosca.capabilities.nfv.VirtualLinkable
relationship: tosca.relationships.nfv.VirtualLinksTo
node: tosca.nodes.nfv.VL
- virtualBinding:
@@ -73,9 +73,8 @@ tosca.nodes.nfv.CP:
relationship: tosca.relationships.nfv.VirtualBindsTo
node: tosca.nodes.nfv.VDU
attributes:
- IP_address:
+ address:
type: string
- required: false
tosca.nodes.nfv.VL:
derived_from: tosca.nodes.network.Network