From 723de7f63f0951d0cfe7a23956cf9d00128809b1 Mon Sep 17 00:00:00 2001 From: sebdet Date: Thu, 12 Mar 2020 14:38:07 -0700 Subject: Fix the new tosca converter Fix the metadata section analysis and make the tosca parser more configurable (in applications.properties) Issue-ID: CLAMP-580 Signed-off-by: sebdet Change-Id: I9068bd9dc89861c640660a7f78fae2cb70bdc178 Signed-off-by: sebdet --- .../clds/tosca-converter/default-tosca-types.yaml | 87 +++++ .../resources/clds/tosca-converter/templates.json | 398 +++++++++++++++++++++ .../clds/tosca_update/default-tosca-types.yaml | 87 ----- .../resources/clds/tosca_update/templates.json | 398 --------------------- 4 files changed, 485 insertions(+), 485 deletions(-) create mode 100644 src/main/resources/clds/tosca-converter/default-tosca-types.yaml create mode 100644 src/main/resources/clds/tosca-converter/templates.json delete mode 100644 src/main/resources/clds/tosca_update/default-tosca-types.yaml delete mode 100644 src/main/resources/clds/tosca_update/templates.json (limited to 'src/main/resources/clds') diff --git a/src/main/resources/clds/tosca-converter/default-tosca-types.yaml b/src/main/resources/clds/tosca-converter/default-tosca-types.yaml new file mode 100644 index 000000000..a11a73698 --- /dev/null +++ b/src/main/resources/clds/tosca-converter/default-tosca-types.yaml @@ -0,0 +1,87 @@ +tosca_definitions_version: tosca_simple_yaml_1_1_0 +data_types: + tosca.datatypes.Root: + description: The TOSCA root Data Type all other TOSCA base Data Types derive from + tosca.datatypes.Credential: + derived_from: tosca.datatypes.Root + properties: + protocol: + type: string + required: false + token_type: + type: string + default: password + token: + type: string + keys: + type: map + required: false + entry_schema: + type: string + user: + type: string + required: false + tosca.datatypes.TimeInterval: + derived_from: tosca.datatypes.Root + properties: + start_time: + type: timestamp + required: true + end_time: + type: timestamp + required: true + tosca.datatypes.network.NetworkInfo: + derived_from: tosca.datatypes.Root + properties: + network_name: + type: string + network_id: + type: string + addresses: + type: list + entry_schema: + type: string + tosca.datatypes.network.PortInfo: + derived_from: tosca.datatypes.Root + properties: + port_name: + type: string + port_id: + type: string + network_id: + type: string + mac_address: + type: string + addresses: + type: list + entry_schema: + type: string + # tosca.datatypes.network.PortDef: + # derived_from: integer + # constraints: + # - in_range: [ 1, 65535 ] + # tosca.datatypes.network.PortSpec: + # derived_from: tosca.datatypes.Root + # properties: + # protocol: + # type: string + # required: true + # default: tcp + # constraints: + # - valid_values: [ udp, tcp, igmp ] + # target: + # type: PortDef + # required: false + # target_range: + # type: range + # required: false + # constraints: + # - in_range: [ 1, 65535 ] + # source: + # type: PortDef + # required: false + # source_range: + # type: range + # required: false + # constraints: + # - in_range: [ 1, 65535 ] \ No newline at end of file diff --git a/src/main/resources/clds/tosca-converter/templates.json b/src/main/resources/clds/tosca-converter/templates.json new file mode 100644 index 000000000..f709e2f6d --- /dev/null +++ b/src/main/resources/clds/tosca-converter/templates.json @@ -0,0 +1,398 @@ +{ + "integer":{ + "type":{ + "defaultValue":"integer", + "visible":true, + "static":false + }, + "description":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "title":{ + "defaultValue":"", + "visible":true, + "static":false + + }, + "deprecated":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "default":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "enum":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "const":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "multipleOf":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "maximum":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "exclusiveMaximum":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "minimum":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "exclusiveMinimum":{ + "defaultValue":"", + "visible":true, + "static":false + } + }, + "number":{ + "type":{ + "defaultValue":"number", + "visible":true, + "static":false + }, + "description":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "title":{ + "defaultValue":"", + "visible":true, + "static":false + + }, + "deprecated":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "default":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "enum":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "const":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "multipleOf":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "maximum":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "exclusiveMaximum":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "minimum":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "exclusiveMinimum":{ + "defaultValue":"", + "visible":true, + "static":false + } + }, + "boolean":{ + "type":{ + "defaultValue":"boolean", + "visible":true, + "static":false + }, + "description":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "title":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "deprecated":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "default":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "const":{ + "defaultValue":"", + "visible":true, + "static":false + } + }, + "string":{ + "type":{ + "defaultValue":"string", + "visible":true, + "static":false + }, + "description":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "title":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "deprecated":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "default":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "enum":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "const":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "length":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "minLength":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "maxLength":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "pattern":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "format":{ + "defaultValue":"", + "visible":true, + "static":false + } + }, + "timestamp":{ + "type":{ + "defaultValue":"string", + "visible":true, + "static":false + }, + "description":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "title":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "deprecated":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "default":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "enum":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "const":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "length":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "minLength":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "maxLength":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "pattern":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "format":{ + "defaultValue":"", + "visible":true, + "static":false + } + }, + "array":{ + "type":{ + "defaultValue":"array", + "visible":true, + "static":false + }, + "description":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "title":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "deprecated":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "default":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "const":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "uniqueItems":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "properties":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "minContains":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "maxContains":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "minItems":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "maxItems":{ + "defaultValue":"", + "visible":true, + "static":false + } + }, + "object":{ + "type":{ + "defaultValue":"object", + "visible":true, + "static":false + }, + "description":{ + "defaultValue":"", + "visible":true, + "static":true + }, + "title":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "format":{ + "defaultValue":"tabs", + "visible":true, + "static":true + }, + "required":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "minProperties":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "maxProperties":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "properties":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "dependentRequired":{ + "defaultValue":"", + "visible":true, + "static":false + }, + "dependencies":{ + "defaultValue":"", + "visible":true, + "static":false + } + } +} \ No newline at end of file diff --git a/src/main/resources/clds/tosca_update/default-tosca-types.yaml b/src/main/resources/clds/tosca_update/default-tosca-types.yaml deleted file mode 100644 index a11a73698..000000000 --- a/src/main/resources/clds/tosca_update/default-tosca-types.yaml +++ /dev/null @@ -1,87 +0,0 @@ -tosca_definitions_version: tosca_simple_yaml_1_1_0 -data_types: - tosca.datatypes.Root: - description: The TOSCA root Data Type all other TOSCA base Data Types derive from - tosca.datatypes.Credential: - derived_from: tosca.datatypes.Root - properties: - protocol: - type: string - required: false - token_type: - type: string - default: password - token: - type: string - keys: - type: map - required: false - entry_schema: - type: string - user: - type: string - required: false - tosca.datatypes.TimeInterval: - derived_from: tosca.datatypes.Root - properties: - start_time: - type: timestamp - required: true - end_time: - type: timestamp - required: true - tosca.datatypes.network.NetworkInfo: - derived_from: tosca.datatypes.Root - properties: - network_name: - type: string - network_id: - type: string - addresses: - type: list - entry_schema: - type: string - tosca.datatypes.network.PortInfo: - derived_from: tosca.datatypes.Root - properties: - port_name: - type: string - port_id: - type: string - network_id: - type: string - mac_address: - type: string - addresses: - type: list - entry_schema: - type: string - # tosca.datatypes.network.PortDef: - # derived_from: integer - # constraints: - # - in_range: [ 1, 65535 ] - # tosca.datatypes.network.PortSpec: - # derived_from: tosca.datatypes.Root - # properties: - # protocol: - # type: string - # required: true - # default: tcp - # constraints: - # - valid_values: [ udp, tcp, igmp ] - # target: - # type: PortDef - # required: false - # target_range: - # type: range - # required: false - # constraints: - # - in_range: [ 1, 65535 ] - # source: - # type: PortDef - # required: false - # source_range: - # type: range - # required: false - # constraints: - # - in_range: [ 1, 65535 ] \ No newline at end of file diff --git a/src/main/resources/clds/tosca_update/templates.json b/src/main/resources/clds/tosca_update/templates.json deleted file mode 100644 index f709e2f6d..000000000 --- a/src/main/resources/clds/tosca_update/templates.json +++ /dev/null @@ -1,398 +0,0 @@ -{ - "integer":{ - "type":{ - "defaultValue":"integer", - "visible":true, - "static":false - }, - "description":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "title":{ - "defaultValue":"", - "visible":true, - "static":false - - }, - "deprecated":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "default":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "enum":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "const":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "multipleOf":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "maximum":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "exclusiveMaximum":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "minimum":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "exclusiveMinimum":{ - "defaultValue":"", - "visible":true, - "static":false - } - }, - "number":{ - "type":{ - "defaultValue":"number", - "visible":true, - "static":false - }, - "description":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "title":{ - "defaultValue":"", - "visible":true, - "static":false - - }, - "deprecated":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "default":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "enum":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "const":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "multipleOf":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "maximum":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "exclusiveMaximum":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "minimum":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "exclusiveMinimum":{ - "defaultValue":"", - "visible":true, - "static":false - } - }, - "boolean":{ - "type":{ - "defaultValue":"boolean", - "visible":true, - "static":false - }, - "description":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "title":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "deprecated":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "default":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "const":{ - "defaultValue":"", - "visible":true, - "static":false - } - }, - "string":{ - "type":{ - "defaultValue":"string", - "visible":true, - "static":false - }, - "description":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "title":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "deprecated":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "default":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "enum":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "const":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "length":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "minLength":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "maxLength":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "pattern":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "format":{ - "defaultValue":"", - "visible":true, - "static":false - } - }, - "timestamp":{ - "type":{ - "defaultValue":"string", - "visible":true, - "static":false - }, - "description":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "title":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "deprecated":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "default":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "enum":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "const":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "length":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "minLength":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "maxLength":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "pattern":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "format":{ - "defaultValue":"", - "visible":true, - "static":false - } - }, - "array":{ - "type":{ - "defaultValue":"array", - "visible":true, - "static":false - }, - "description":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "title":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "deprecated":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "default":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "const":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "uniqueItems":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "properties":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "minContains":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "maxContains":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "minItems":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "maxItems":{ - "defaultValue":"", - "visible":true, - "static":false - } - }, - "object":{ - "type":{ - "defaultValue":"object", - "visible":true, - "static":false - }, - "description":{ - "defaultValue":"", - "visible":true, - "static":true - }, - "title":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "format":{ - "defaultValue":"tabs", - "visible":true, - "static":true - }, - "required":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "minProperties":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "maxProperties":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "properties":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "dependentRequired":{ - "defaultValue":"", - "visible":true, - "static":false - }, - "dependencies":{ - "defaultValue":"", - "visible":true, - "static":false - } - } -} \ No newline at end of file -- cgit 1.2.3-korg