aboutsummaryrefslogtreecommitdiffstats
path: root/jython-tosca-parser/src/main/resources/Lib/site-packages
diff options
context:
space:
mode:
Diffstat (limited to 'jython-tosca-parser/src/main/resources/Lib/site-packages')
-rw-r--r--jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/groups.py6
-rw-r--r--jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/nodetemplate.py4
-rw-r--r--jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/parameters.py5
-rw-r--r--jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/substitution_mappings.py6
-rw-r--r--jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/topology_template.py1
-rw-r--r--jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tosca_template.py14
6 files changed, 33 insertions, 3 deletions
diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/groups.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/groups.py
index f1da5b0..cb9c20d 100644
--- a/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/groups.py
+++ b/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/groups.py
@@ -37,6 +37,12 @@ class Group(EntityTemplate, JyGroup):
self.member_nodes = member_nodes
self._validate_keys()
+ def getJyMembers(self):
+ return self.members
+
+ def getJyMetadata(self):
+ return self.meta_data
+
@property
def members(self):
return self.entity_tpl.get('members')
diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/nodetemplate.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/nodetemplate.py
index ee7622c..fadc8d0 100644
--- a/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/nodetemplate.py
+++ b/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/nodetemplate.py
@@ -61,6 +61,10 @@ class NodeTemplate(EntityTemplate, JyNodeTemplate):
def getJyMetadata(self):
return self.meta_data
+ def getJySubstitutionMappings(self):
+ return self.sub_mapping_tosca_template
+
+
@property
def relationships(self):
if not self._relationships:
diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/parameters.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/parameters.py
index 1bb58be..765ccb7 100644
--- a/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/parameters.py
+++ b/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/parameters.py
@@ -44,7 +44,7 @@ class Input(JyInput):
return self.name
def getJyType(self):
- return self.name
+ return self.type
def isJyRequired(self):
return self.required
@@ -93,7 +93,8 @@ class Input(JyInput):
def validate_type(self, input_type):
if input_type not in Schema.PROPERTY_TYPES:
ExceptionCollector.appendException(
- ValueError(_('Invalid type "%s".') % type))
+ #ValueError(_('Invalid type "%s".') % type))
+ ValueError(_('Invalid type "%s".') % input_type))
# TODO(anyone) Need to test for any built-in datatype not just network
# that is, tosca.datatypes.* and not assume tosca.datatypes.network.*
diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/substitution_mappings.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/substitution_mappings.py
index 859b7a4..9a14f6f 100644
--- a/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/substitution_mappings.py
+++ b/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/substitution_mappings.py
@@ -38,12 +38,13 @@ class SubstitutionMappings(JySubstitutionMappings):
OPTIONAL_OUTPUTS = ['tosca_id', 'tosca_name', 'state']
- def __init__(self, sub_mapping_def, nodetemplates, inputs, outputs,
+ def __init__(self, sub_mapping_def, nodetemplates, inputs, outputs, groups, #ATT
sub_mapped_node_template, custom_defs):
self.nodetemplates = nodetemplates
self.sub_mapping_def = sub_mapping_def
self.inputs = inputs or []
self.outputs = outputs or []
+ self.groups = groups or [] #ATT
self.sub_mapped_node_template = sub_mapped_node_template
self.custom_defs = custom_defs or {}
self._validate()
@@ -57,6 +58,9 @@ class SubstitutionMappings(JySubstitutionMappings):
def getJyInputs(self):
return self.inputs
+ def getJyGroups(self): #ATT
+ return self.groups
+
def getJyNodeDefinition(self):
return self.node_definition
diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/topology_template.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/topology_template.py
index c56e7b9..a64c561 100644
--- a/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/topology_template.py
+++ b/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/topology_template.py
@@ -146,6 +146,7 @@ class TopologyTemplate(JyTopologyTemplate):
self.nodetemplates,
self.inputs,
self.outputs,
+ self.groups, #ATT
self.sub_mapped_node_template,
self.custom_defs)
diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tosca_template.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tosca_template.py
index 6b3ea87..c2c3f36 100644
--- a/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tosca_template.py
+++ b/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tosca_template.py
@@ -13,6 +13,7 @@
import logging
import os
+#import shutil
from copy import deepcopy
from toscaparser.common.exception import ExceptionCollector
@@ -73,6 +74,7 @@ class ToscaTemplate(JyToscaTemplate):
self.input_path = None
self.path = None
self.tpl = None
+ self.csar_tempdir = None
self.nested_tosca_tpls_with_topology = {}
self.nested_tosca_templates_with_topology = []
if path:
@@ -97,6 +99,7 @@ class ToscaTemplate(JyToscaTemplate):
self.parsed_params = parsed_params
self._validate_field()
self.version = self._tpl_version()
+ self.metadata = self._tpl_metadata()
self.relationship_types = self._tpl_relationship_types()
self.description = self._tpl_description()
self.topology_template = self._topology_template()
@@ -109,12 +112,19 @@ class ToscaTemplate(JyToscaTemplate):
self._handle_nested_tosca_templates_with_topology()
self.graph = ToscaGraph(self.nodetemplates)
+ if self.csar_tempdir:
+ #shutil.rmtree(self.csar_tempdir)
+ csar_tempdir = None
+
ExceptionCollector.stop()
self.verify_template()
def getJyVersion(self):
return self.version
+ def getJyMetadata(self):
+ return self.metadata
+
def getJyDescription(self):
return self.description
@@ -146,6 +156,9 @@ class ToscaTemplate(JyToscaTemplate):
def _tpl_version(self):
return self.tpl.get(DEFINITION_VERSION)
+ def _tpl_metadata(self):
+ return self.tpl.get(METADATA)
+
def _tpl_description(self):
desc = self.tpl.get(DESCRIPTION)
if desc:
@@ -290,6 +303,7 @@ class ToscaTemplate(JyToscaTemplate):
if csar.validate():
csar.decompress()
self.a_file = True # the file has been decompressed locally
+ self.csar_tempdir = csar.temp_dir
return os.path.join(csar.temp_dir, csar.get_main_template())
else:
ExceptionCollector.appendException(