Changed datatype_definitions tag to data_types to match spec
- Also fixed a mis-spelling and a swapped mapping in the type list Closes-Bug: 1541517 Change-Id: Ia2c27996d65142a255932352760e6a5c0108071c
This commit is contained in:
parent
7b7f7c4f87
commit
d8295ddcdc
@ -22,13 +22,12 @@ class TypeValidation(object):
|
||||
DSL_DEFINITIONS, NODE_TYPES, REPOSITORIES,
|
||||
DATA_TYPES, ARTIFACT_TYPES, GROUP_TYPES,
|
||||
RELATIONSHIP_TYPES, CAPABILITY_TYPES,
|
||||
INTERFCAE_TYPES, POLICY_TYPES, DATATYPE_DEFINITIONS) = \
|
||||
('tosca_definitions_version', 'description',
|
||||
'imports', 'dsl_definitions', 'node_types',
|
||||
'repositories', 'data_types', 'group_types',
|
||||
'artifact_types', 'relationship_types',
|
||||
'capability_types', 'interface_types',
|
||||
'policy_types', 'datatype_definitions')
|
||||
INTERFACE_TYPES, POLICY_TYPES) = \
|
||||
('tosca_definitions_version', 'description', 'imports',
|
||||
'dsl_definitions', 'node_types', 'repositories',
|
||||
'data_types', 'artifact_types', 'group_types',
|
||||
'relationship_types', 'capability_types',
|
||||
'interface_types', 'policy_types')
|
||||
VALID_TEMPLATE_VERSIONS = ['tosca_simple_yaml_1_0']
|
||||
exttools = ExtTools()
|
||||
VALID_TEMPLATE_VERSIONS.extend(exttools.get_versions())
|
||||
|
@ -10,7 +10,7 @@ node_types:
|
||||
people:
|
||||
type: tosca.my.datatypes.People
|
||||
|
||||
datatype_definitions:
|
||||
data_types:
|
||||
tosca.my.datatypes.PeopleBase:
|
||||
properties:
|
||||
name:
|
||||
|
@ -10,7 +10,7 @@ node_types:
|
||||
people:
|
||||
type: tosca.my.datatypes.People
|
||||
|
||||
datatype_definitions:
|
||||
data_types:
|
||||
tosca.my.datatypes.PeopleBase:
|
||||
properties:
|
||||
name:
|
||||
@ -62,4 +62,4 @@ topology_template:
|
||||
contact_phone: '123456789'}
|
||||
- {contact_name: Jerry,
|
||||
contact_email: jerry@email.com,
|
||||
contact_phone: '321654987'}
|
||||
contact_phone: '321654987'}
|
||||
|
@ -34,13 +34,13 @@ SECTIONS = (DEFINITION_VERSION, DEFAULT_NAMESPACE, TEMPLATE_NAME,
|
||||
TOPOLOGY_TEMPLATE, TEMPLATE_AUTHOR, TEMPLATE_VERSION,
|
||||
DESCRIPTION, IMPORTS, DSL_DEFINITIONS, NODE_TYPES,
|
||||
RELATIONSHIP_TYPES, RELATIONSHIP_TEMPLATES,
|
||||
CAPABILITY_TYPES, ARTIFACT_TYPES, DATATYPE_DEFINITIONS,
|
||||
CAPABILITY_TYPES, ARTIFACT_TYPES, DATA_TYPES,
|
||||
POLICY_TYPES, GROUP_TYPES) = \
|
||||
('tosca_definitions_version', 'tosca_default_namespace',
|
||||
'template_name', 'topology_template', 'template_author',
|
||||
'template_version', 'description', 'imports', 'dsl_definitions',
|
||||
'node_types', 'relationship_types', 'relationship_templates',
|
||||
'capability_types', 'artifact_types', 'datatype_definitions',
|
||||
'capability_types', 'artifact_types', 'data_types',
|
||||
'policy_types', 'group_types')
|
||||
# Sections that are specific to individual template definitions
|
||||
SPECIAL_SECTIONS = (METADATA) = ('metadata')
|
||||
@ -145,7 +145,7 @@ class ToscaTemplate(object):
|
||||
|
||||
def _get_all_custom_defs(self, imports=None):
|
||||
types = [IMPORTS, NODE_TYPES, CAPABILITY_TYPES, RELATIONSHIP_TYPES,
|
||||
DATATYPE_DEFINITIONS, POLICY_TYPES, GROUP_TYPES]
|
||||
DATA_TYPES, POLICY_TYPES, GROUP_TYPES]
|
||||
custom_defs_final = {}
|
||||
custom_defs = self._get_custom_types(types, imports)
|
||||
if custom_defs:
|
||||
|
Loading…
Reference in New Issue
Block a user