From c52d403e7bdec994e5872f0b610383851424a640 Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Mon, 27 Apr 2015 14:46:26 -0400 Subject: [PATCH] Update code base to be hacking compatible Lots of minor changes to make the latest version of hacking happy. Change-Id: Ide0cfaa64f33f4e3157f5aaafdbd6de94a13b127 --- requirements.txt | 1 + test-requirements.txt | 2 +- translator/common/utils.py | 12 ++++---- .../tosca/tosca_block_storage_attachment.py | 2 +- translator/hot/tosca/tosca_network_port.py | 4 +-- translator/hot/tosca/tosca_object_storage.py | 6 ++-- translator/hot/translate_inputs.py | 2 +- translator/hot/translate_node_templates.py | 2 +- translator/hot/translate_outputs.py | 2 +- translator/tests/test_network.py | 30 ++++++++++--------- translator/tests/test_objectstore_template.py | 4 +-- .../tests/test_translated_output_order.py | 4 +-- translator/tests/test_utils.py | 2 +- translator/toscalib/dataentity.py | 7 +++-- translator/toscalib/elements/datatype.py | 8 ++--- translator/toscalib/elements/entitytype.py | 6 ++-- translator/toscalib/elements/nodetype.py | 2 +- translator/toscalib/entity_template.py | 4 +-- translator/toscalib/functions.py | 7 ++--- translator/toscalib/nodetemplate.py | 11 +++---- translator/toscalib/tests/__init__.py | 13 -------- translator/toscalib/tests/test_properties.py | 12 ++++---- translator/toscalib/tests/test_toscatpl.py | 10 +++---- .../toscalib/tests/test_toscatplvalidation.py | 3 +- translator/toscalib/tosca_template.py | 5 ++-- 25 files changed, 75 insertions(+), 86 deletions(-) diff --git a/requirements.txt b/requirements.txt index 91758cff..31c29fa7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ pbr>=0.6,!=0.7,<1.0 Babel>=1.3 PyYAML>=3.1.0 python_dateutil>=2.4.0 +six>=1.9.0 diff --git a/test-requirements.txt b/test-requirements.txt index 8873881d..02cee55e 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,4 @@ -hacking>=0.5.6,<0.8 +hacking>=0.10.0,<0.11 coverage>=3.6 discover fixtures>=0.3.14 diff --git a/translator/common/utils.py b/translator/common/utils.py index 7e021300..925b6082 100644 --- a/translator/common/utils.py +++ b/translator/common/utils.py @@ -33,8 +33,8 @@ class MemoryUnit(object): @staticmethod def convert_unit_size_to_num(size, unit=None): """Convert given size to a number representing given unit. - If unit is None, convert to a number representing UNIT_SIZE_DEFAULT + If unit is None, convert to a number representing UNIT_SIZE_DEFAULT :param size: unit size e.g. 1 TB :param unit: unit to be converted to e.g GB :return: converted number e.g. 1000 for 1 TB size and unit GB @@ -69,12 +69,12 @@ class CompareUtils(object): @staticmethod def compare_dicts(dict1, dict2): - '''Returns False if not equal or any input parameter is empty. - Returns True if both are equal. - ''' + """Return False if not equal, True if both are equal.""" + if not dict1 or not dict2: return False - #compare generated and expected hot templates + + # compare generated and expected hot templates both_equal = True for generated_item, expected_item in zip(dict1.items(), dict2.items()): if generated_item != expected_item: @@ -94,7 +94,7 @@ class CompareUtils(object): def str_to_num(value): - '''Convert a string representation of a number into a numeric type.''' + """Convert a string representation of a number into a numeric type.""" if isinstance(value, numbers.Number): return value try: diff --git a/translator/hot/tosca/tosca_block_storage_attachment.py b/translator/hot/tosca/tosca_block_storage_attachment.py index f879f90b..ff75b4fb 100644 --- a/translator/hot/tosca/tosca_block_storage_attachment.py +++ b/translator/hot/tosca/tosca_block_storage_attachment.py @@ -33,7 +33,7 @@ class ToscaBlockStorageAttachment(HotResource): else: tosca_props[prop.name] = prop.value self.properties = tosca_props - #instance_uuid and volume_id for Cinder volume attachment + # instance_uuid and volume_id for Cinder volume attachment self.properties['instance_uuid'] = self.instace_uuid self.properties['volume_id'] = self.volume_id diff --git a/translator/hot/tosca/tosca_network_port.py b/translator/hot/tosca/tosca_network_port.py index 73a8dd66..2195dc70 100644 --- a/translator/hot/tosca/tosca_network_port.py +++ b/translator/hot/tosca/tosca_network_port.py @@ -58,7 +58,7 @@ class ToscaNetworkPort(HotResource): port_props['fixed_ips'] = [fixed_ip] elif key == 'order': self.order = value - #TODO(sdmonov). Need to implement the properties below + # TODO(sdmonov): Need to implement the properties below elif key == 'is_default': pass elif key == 'ip_range_start': @@ -105,7 +105,7 @@ class ToscaNetworkPort(HotResource): if compute_resource: port_resources = compute_resource.assoc_port_resources self._insert_sorted_resource(port_resources, self) - #TODO(sdmonov). Using generate networks every time we add a + # TODO(sdmonov): Using generate networks every time we add a # network is not the fastest way to do the things. We should # do this only once at the end. networks = self._generate_networks_for_compute(port_resources) diff --git a/translator/hot/tosca/tosca_object_storage.py b/translator/hot/tosca/tosca_object_storage.py index 81545c15..058c0261 100644 --- a/translator/hot/tosca/tosca_object_storage.py +++ b/translator/hot/tosca/tosca_object_storage.py @@ -34,9 +34,9 @@ class ToscaObjectStorage(HotResource): if key == "store_name": objectstore_props["name"] = value elif key == "store_size" or key == "store_maxsize": - #currently heat is not supporting dynamically increase - #the container quota-size. - #if both defined in tosca template, consider store_maxsize. + # currently heat is not supporting dynamically increase + # the container quota-size. + # if both defined in tosca template, consider store_maxsize. if skip_check: continue quota_size = None diff --git a/translator/hot/translate_inputs.py b/translator/hot/translate_inputs.py index ada5a573..b156c50c 100644 --- a/translator/hot/translate_inputs.py +++ b/translator/hot/translate_inputs.py @@ -49,7 +49,7 @@ TOSCA_TO_HOT_INPUT_TYPES = {'string': 'string', 'null': 'string'} -class TranslateInputs(): +class TranslateInputs(object): '''Translate TOSCA Inputs to Heat Parameters.''' def __init__(self, inputs, parsed_params): diff --git a/translator/hot/translate_node_templates.py b/translator/hot/translate_node_templates.py index 6e5ec403..3ac685e9 100644 --- a/translator/hot/translate_node_templates.py +++ b/translator/hot/translate_node_templates.py @@ -67,7 +67,7 @@ TOSCA_TO_HOT_REQUIRES = {'container': 'server', 'host': 'server', TOSCA_TO_HOT_PROPERTIES = {'properties': 'input'} -class TranslateNodeTemplates(): +class TranslateNodeTemplates(object): '''Translate TOSCA NodeTemplates to Heat Resources.''' def __init__(self, tosca, hot_template): diff --git a/translator/hot/translate_outputs.py b/translator/hot/translate_outputs.py index d31480ae..d7077222 100644 --- a/translator/hot/translate_outputs.py +++ b/translator/hot/translate_outputs.py @@ -14,7 +14,7 @@ from translator.hot.syntax.hot_output import HotOutput -class TranslateOutputs(): +class TranslateOutputs(object): '''Translate TOSCA Outputs to Heat Outputs.''' def __init__(self, outputs, node_translator): diff --git a/translator/tests/test_network.py b/translator/tests/test_network.py index 7ea12366..b2c2a59a 100644 --- a/translator/tests/test_network.py +++ b/translator/tests/test_network.py @@ -95,12 +95,15 @@ class ToscaNetworkTest(TestCase): 'properties': {'cidr': {'get_param': 'network_cidr'}, 'ip_version': 4, - 'allocation_pools': [{'start': {'get_param': - 'network_start_ip'}, - 'end': {'get_param': - 'network_end_ip' - }}], - 'network': {'get_resource': 'my_network'} + 'network': {'get_resource': 'my_network'}, + 'allocation_pools': [{'start': + {'get_param': + 'network_start_ip'}, + 'end': + {'get_param': + 'network_end_ip' + }} + ] }} expected_resource_3 = {'type': 'OS::Neutron::Port', @@ -197,21 +200,20 @@ class ToscaNetworkTest(TestCase): expected_resource_net = {'type': 'OS::Neutron::Net', 'properties': - {'name': 'net%d' % (net_num) - }} + {'name': 'net%d' % (net_num)}} expected_resource_subnet = {'type': 'OS::Neutron::Subnet', 'properties': - {'cidr': '192.168.%d.0/24' % (net_num), - 'ip_version': 4, - 'network': {'get_resource': net_name} - }} + {'cidr': '192.168.%d.0/24' % (net_num), + 'ip_version': 4, + 'network': {'get_resource': net_name}} + } expected_resource_port = {'type': 'OS::Neutron::Port', 'depends_on': [net_name], 'properties': - {'network': {'get_resource': net_name} - }} + {'network': {'get_resource': net_name}}} + self.assertIn(net_name, resources.keys()) self.assertIn(subnet_name, resources.keys()) self.assertIn(port_name, resources.keys()) diff --git a/translator/tests/test_objectstore_template.py b/translator/tests/test_objectstore_template.py index 62f7fe04..1f46014b 100644 --- a/translator/tests/test_objectstore_template.py +++ b/translator/tests/test_objectstore_template.py @@ -31,7 +31,7 @@ class ToscaObjectStoreTemplateTest(TestCase): translate = TOSCATranslator(tosca, parsed_params) hot_translated_output = translate.translate() - #load expected hot yaml file + # load expected hot yaml file hot_yaml_file = "../toscalib/tests/data/hot_output/" + \ "hot_single_object_store.yaml" hot_tpl = os.path.join( @@ -40,7 +40,7 @@ class ToscaObjectStoreTemplateTest(TestCase): with open(hot_tpl) as f: hot_expected_output = f.read() - #compare generated and expected hot templates + # compare generated and expected hot templates status = CompareUtils.compare_hot_yamls(hot_translated_output, hot_expected_output) self.assertEqual(status, True) diff --git a/translator/tests/test_translated_output_order.py b/translator/tests/test_translated_output_order.py index c068fc9f..2c803dd2 100644 --- a/translator/tests/test_translated_output_order.py +++ b/translator/tests/test_translated_output_order.py @@ -30,7 +30,7 @@ class ToscaTemplateOutputOrderTest(TestCase): translate = TOSCATranslator(tosca, parsed_params) hot_translated_output = translate.translate() - #load expected hot yaml file + # load expected hot yaml file hot_yaml_file = "data/hot_output/hot_single_server.yaml" hot_tpl = os.path.join( os.path.dirname(os.path.abspath(__file__)), @@ -38,7 +38,7 @@ class ToscaTemplateOutputOrderTest(TestCase): with open(hot_tpl) as f: hot_expected_output = f.read() - #compare generated and expected hot templates + # compare generated and expected hot templates status = CompareUtils.compare_hot_yamls(hot_translated_output, hot_expected_output) self.assertEqual(status, True) diff --git a/translator/tests/test_utils.py b/translator/tests/test_utils.py index 6780cd54..732b9d5f 100644 --- a/translator/tests/test_utils.py +++ b/translator/tests/test_utils.py @@ -53,7 +53,7 @@ class CommonUtilsTest(TestCase): str_to_convert = '55063.000000' expected_output = 55063.0 output = translator.common.utils.str_to_num(str_to_convert) - self.assertEquals(output, expected_output) + self.assertEqual(output, expected_output) def test_compare_dicts_unequal(self): dict1 = {'allowed_values': [1, 2, 4, 8], diff --git a/translator/toscalib/dataentity.py b/translator/toscalib/dataentity.py index 770014b5..a333ffa2 100644 --- a/translator/toscalib/dataentity.py +++ b/translator/toscalib/dataentity.py @@ -13,8 +13,9 @@ from translator.toscalib.common.exception import MissingRequiredFieldError from translator.toscalib.common.exception import TypeMismatchError from translator.toscalib.common.exception import UnknownFieldError +from translator.toscalib.elements.constraints import Constraint +from translator.toscalib.elements.constraints import Schema from translator.toscalib.elements.datatype import DataType -from translator.toscalib.elements.constraints import Constraint, Schema class DataEntity(object): @@ -29,8 +30,8 @@ class DataEntity(object): def validate(self): '''Validate the value by the definition of the datatype.''' - #A datatype can not have both 'type' and 'properties' definitions. - #If the datatype has 'type' definition + # A datatype can not have both 'type' and 'properties' definitions. + # If the datatype has 'type' definition if self.datatype.value_type: DataEntity.validate_datatype(self.datatype.value_type, self.value, None, self.custom_def) diff --git a/translator/toscalib/elements/datatype.py b/translator/toscalib/elements/datatype.py index e0a6bfcb..9406191c 100644 --- a/translator/toscalib/elements/datatype.py +++ b/translator/toscalib/elements/datatype.py @@ -36,9 +36,7 @@ class DataType(StatefulEntityType): return self.entity_value(self.defs, 'type') def get_all_properties_objects(self): - '''Return all properties objects defined in this type - and its parent type. - ''' + '''Return all properties objects defined in type and parent type.''' props_def = self.get_properties_def_objects() ptype = self.parent_type while ptype: @@ -47,9 +45,7 @@ class DataType(StatefulEntityType): return props_def def get_all_properties(self): - '''Return a dictionary of all property definition - name-object pairs. - ''' + '''Return a dictionary of all property definition name-object pairs.''' return {prop.name: prop for prop in self.get_all_properties_objects()} diff --git a/translator/toscalib/elements/entitytype.py b/translator/toscalib/elements/entitytype.py index 56d1e783..33b9995a 100644 --- a/translator/toscalib/elements/entitytype.py +++ b/translator/toscalib/elements/entitytype.py @@ -48,8 +48,8 @@ class EntityType(object): RELATIONSHIP_PREFIX = 'tosca.relationships.' CAPABILITY_PREFIX = 'tosca.capabilities.' INTERFACE_PREFIX = 'tosca.interfaces.' - #currently the data types are defined only for network - #but may have changes in the future. + # currently the data types are defined only for network + # but may have changes in the future. DATATYPE_PREFIX = 'tosca.datatypes.network.' TOSCA = 'tosca' @@ -70,7 +70,7 @@ class EntityType(object): if parent and not value: p = self.parent_type while value is None: - #check parent node + # check parent node if not p: break if p and p.type == 'tosca.nodes.Root': diff --git a/translator/toscalib/elements/nodetype.py b/translator/toscalib/elements/nodetype.py index f1b77c4c..32755496 100644 --- a/translator/toscalib/elements/nodetype.py +++ b/translator/toscalib/elements/nodetype.py @@ -55,7 +55,7 @@ class NodeType(StatefulEntityType): keyword = None node_type = None for req in requires: - #get all keys in requirement + # get all keys in requirement if 'relationship' in req: keys = req.keys() for k in keys: diff --git a/translator/toscalib/entity_template.py b/translator/toscalib/entity_template.py index 7482aa7d..e47601fa 100644 --- a/translator/toscalib/entity_template.py +++ b/translator/toscalib/entity_template.py @@ -124,11 +124,11 @@ class EntityTemplate(object): self._common_validate_properties(capabilitydef, props[self.PROPERTIES]) - #validating capability properties values + # validating capability properties values for prop in self.get_capability(cap).get_properties_objects(): prop.validate() - #TODO(srinivas_tadepalli): temporary work around to validate + # TODO(srinivas_tadepalli): temporary work around to validate # default_instances until standardized in specification if cap == "scalable" and prop.name == "default_instances": prop_dict = props[self.PROPERTIES] diff --git a/translator/toscalib/functions.py b/translator/toscalib/functions.py index c921dd9f..456ab862 100644 --- a/translator/toscalib/functions.py +++ b/translator/toscalib/functions.py @@ -13,6 +13,7 @@ import abc +import six from translator.toscalib.common.exception import UnknownInputError from translator.toscalib.utils.gettextutils import _ @@ -28,11 +29,10 @@ HOST = 'HOST' HOSTED_ON = 'tosca.relationships.HostedOn' +@six.add_metaclass(abc.ABCMeta) class Function(object): """An abstract type for representing a Tosca template function.""" - __metaclass__ = abc.ABCMeta - def __init__(self, tosca_tpl, context, name, args): self.tosca_tpl = tosca_tpl self.context = context @@ -59,8 +59,7 @@ class Function(object): class GetInput(Function): - """Get a property value declared within the inputs section of the service - template. + """Get a property value declared within the input of the service template. Arguments: diff --git a/translator/toscalib/nodetemplate.py b/translator/toscalib/nodetemplate.py index 888bc115..0c2fd7a4 100644 --- a/translator/toscalib/nodetemplate.py +++ b/translator/toscalib/nodetemplate.py @@ -15,8 +15,9 @@ import logging from translator.toscalib.common.exception import TypeMismatchError from translator.toscalib.common.exception import UnknownFieldError +from translator.toscalib.elements.interfaces import CONFIGURE from translator.toscalib.elements.interfaces import InterfacesDef -from translator.toscalib.elements.interfaces import LIFECYCLE, CONFIGURE +from translator.toscalib.elements.interfaces import LIFECYCLE from translator.toscalib.elements.relationshiptype import RelationshipType from translator.toscalib.entity_template import EntityTemplate from translator.toscalib.relationship_template import RelationshipTemplate @@ -75,8 +76,8 @@ class NodeTemplate(EntityTemplate): explicit_relation = {} node = value.get('node') if node: - #TODO(spzala) implement look up once Glance meta data is available - #to find a matching TOSCA node using the TOSCA types + # TODO(spzala) implement look up once Glance meta data is available + # to find a matching TOSCA node using the TOSCA types msg = _('Lookup by TOSCA types are not supported. ' 'Requirement for %s can not be full-filled.') % self.name if (node in list(self.type_definition.TOSCA_DEF.keys()) @@ -86,14 +87,14 @@ class NodeTemplate(EntityTemplate): relationship = value.get('relationship') if relationship: found_relationship_tpl = False - #apply available relationship templates if found + # apply available relationship templates if found for tpl in self.available_rel_tpls: if tpl.name == relationship: rtype = RelationshipType(tpl.type) explicit_relation[rtype] = related_tpl self.relationship_tpl.append(tpl) found_relationship_tpl = True - #create relationship template object. + # create relationship template object. if not found_relationship_tpl: if isinstance(relationship, dict): relationship = relationship.get('type') diff --git a/translator/toscalib/tests/__init__.py b/translator/toscalib/tests/__init__.py index 19f5e722..e69de29b 100644 --- a/translator/toscalib/tests/__init__.py +++ b/translator/toscalib/tests/__init__.py @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- - -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. diff --git a/translator/toscalib/tests/test_properties.py b/translator/toscalib/tests/test_properties.py index e8b158e2..f437202b 100644 --- a/translator/toscalib/tests/test_properties.py +++ b/translator/toscalib/tests/test_properties.py @@ -142,13 +142,13 @@ class PropertyTest(TestCase): def test_timestamp(self): test_property_schema = {'type': 'timestamp'} - #canonical timestamp + # canonical timestamp propertyInstance = Property('test_property', '2015-04-01T02:59:43.1Z', test_property_schema) self.assertIsNone(propertyInstance.validate()) self.assertEqual("2015-04-01T02:59:43.1Z", propertyInstance.value) - #iso8601 timestamp + # iso8601 timestamp propertyInstance = Property('test_property', '2015-04-01t21:59:43.10-05:00', test_property_schema) @@ -156,20 +156,20 @@ class PropertyTest(TestCase): self.assertEqual("2015-04-01t21:59:43.10-05:00", propertyInstance.value) - #space separated timestamp + # space separated timestamp propertyInstance = Property('test_property', '2015-04-01 21:59:43.10 -5', test_property_schema) self.assertIsNone(propertyInstance.validate()) self.assertEqual("2015-04-01 21:59:43.10 -5", propertyInstance.value) - #no time zone timestamp + # no time zone timestamp propertyInstance = Property('test_property', '2015-04-01 21:59:43.10', test_property_schema) self.assertIsNone(propertyInstance.validate()) self.assertEqual("2015-04-01 21:59:43.10", propertyInstance.value) - #date (00:00:00Z) + # date (00:00:00Z) propertyInstance = Property('test_property', '2015-04-01', test_property_schema) self.assertIsNone(propertyInstance.validate()) @@ -177,7 +177,7 @@ class PropertyTest(TestCase): def test_timestamp_invalid(self): test_property_schema = {'type': 'timestamp'} - #invalid timestamp - day out of range + # invalid timestamp - day out of range propertyInstance = Property('test_property', '2015-04-115T02:59:43.1Z', test_property_schema) error = self.assertRaises(ValueError, propertyInstance.validate) diff --git a/translator/toscalib/tests/test_toscatpl.py b/translator/toscalib/tests/test_toscatpl.py index 313e03ae..c19da33d 100644 --- a/translator/toscalib/tests/test_toscatpl.py +++ b/translator/toscalib/tests/test_toscatpl.py @@ -168,7 +168,7 @@ class ToscaTemplateTest(TestCase): 'Unexpected interface: {0}'.format(interface.name)) def test_normative_type_by_short_name(self): - #test template with a short name Compute + # test template with a short name Compute template = os.path.join( os.path.dirname(os.path.abspath(__file__)), "data/test_tosca_normative_type_by_shortname.yaml") @@ -258,8 +258,8 @@ class ToscaTemplateTest(TestCase): node in node_tpl.relationships.items()]) def test_template_requirements_not_implemented(self): - #TODO(spzala) replace this test with new one once TOSCA types look up - #support is implemented. + # TODO(spzala): replace this test with new one once TOSCA types look up + # support is implemented. """Requirements that yet need to be implemented The following requirement formats are not yet implemented, @@ -333,7 +333,7 @@ class ToscaTemplateTest(TestCase): properties: test: 1 ''' - #custom definition with capability type definition + # custom definition with capability type definition custom_def = ''' tosca.nodes.WebApplication.TestApp: derived_from: tosca.nodes.WebApplication @@ -358,7 +358,7 @@ class ToscaTemplateTest(TestCase): expected_capabilities, sorted(tpl.get_capabilities().keys())) - #custom definition without capability type definition + # custom definition without capability type definition custom_def = ''' tosca.nodes.WebApplication.TestApp: derived_from: tosca.nodes.WebApplication diff --git a/translator/toscalib/tests/test_toscatplvalidation.py b/translator/toscalib/tests/test_toscatplvalidation.py index 6996ad40..23d9ef74 100644 --- a/translator/toscalib/tests/test_toscatplvalidation.py +++ b/translator/toscalib/tests/test_toscatplvalidation.py @@ -15,7 +15,8 @@ import six from translator.toscalib.common import exception from translator.toscalib.nodetemplate import NodeTemplate -from translator.toscalib.parameters import Input, Output +from translator.toscalib.parameters import Input +from translator.toscalib.parameters import Output from translator.toscalib.relationship_template import RelationshipTemplate from translator.toscalib.tests.base import TestCase from translator.toscalib.tosca_template import ToscaTemplate diff --git a/translator/toscalib/tosca_template.py b/translator/toscalib/tosca_template.py index 879e9f8a..f64be34b 100644 --- a/translator/toscalib/tosca_template.py +++ b/translator/toscalib/tosca_template.py @@ -19,14 +19,15 @@ from translator.toscalib.common.exception import MissingRequiredFieldError from translator.toscalib.common.exception import UnknownFieldError from translator.toscalib import functions from translator.toscalib.nodetemplate import NodeTemplate -from translator.toscalib.parameters import Input, Output +from translator.toscalib.parameters import Input +from translator.toscalib.parameters import Output from translator.toscalib.relationship_template import RelationshipTemplate from translator.toscalib.tpl_relationship_graph import ToscaGraph import translator.toscalib.utils.yamlparser -#TOSCA template key names +# TOSCA template key names SECTIONS = (DEFINITION_VERSION, DEFAULT_NAMESPACE, TEMPLATE_NAME, TEMPLATE_AUTHOR, TEMPLATE_VERSION, DESCRIPTION, IMPORTS, DSL_DEFINITIONS, INPUTS, NODE_TEMPLATES, RELATIONSHIP_TEMPLATES,