From 8604d37f2f6bdd011de62ec474b6883413d30348 Mon Sep 17 00:00:00 2001 From: sebdet Date: Tue, 10 Mar 2020 02:44:53 -0700 Subject: Fix the tosca converter Fix the new tosca converter to support metadata section Issue-ID: CLAMP-580 Signed-off-by: sebdet Change-Id: I9068bd9dc89851c630660a7f78fae1cb70bdc178 --- src/main/resources/META-INF/resources/swagger.html | 2 +- src/main/resources/application-noaaf.properties | 7 +- .../clds/tosca_update/default-tosca-types.yaml | 87 ++++++++++++++++++++++ .../clds/tosca_update/defaultToscaTypes.yaml | 87 ---------------------- .../clds/tosca_update/templates.properties | 15 ---- 5 files changed, 94 insertions(+), 104 deletions(-) create mode 100644 src/main/resources/clds/tosca_update/default-tosca-types.yaml delete mode 100644 src/main/resources/clds/tosca_update/defaultToscaTypes.yaml delete mode 100644 src/main/resources/clds/tosca_update/templates.properties (limited to 'src/main/resources') diff --git a/src/main/resources/META-INF/resources/swagger.html b/src/main/resources/META-INF/resources/swagger.html index 69e9c7c15..29082abf1 100644 --- a/src/main/resources/META-INF/resources/swagger.html +++ b/src/main/resources/META-INF/resources/swagger.html @@ -692,7 +692,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

1.2. URI scheme

-

Host : localhost:39237
+

Host : localhost:46347
BasePath : /restservices/clds/
Schemes : HTTP

diff --git a/src/main/resources/application-noaaf.properties b/src/main/resources/application-noaaf.properties index 288511b3b..3ce033f64 100644 --- a/src/main/resources/application-noaaf.properties +++ b/src/main/resources/application-noaaf.properties @@ -176,4 +176,9 @@ clamp.config.security.permission.instance=dev clamp.config.security.authentication.class=org.onap.aaf.cadi.principal.X509Principal ## Tosca converter -clamp.config.tosca.converter.templates=classpath:/clds/tosca_updates/templates.json \ No newline at end of file +clamp.config.tosca.converter.templates=classpath:/clds/tosca_updates/templates.json + +# Configuration settings for CDS +clamp.config.cds.url=http4://blueprints-processor-http:8080 +clamp.config.cds.userName=ccsdkapps +clamp.config.cds.password=ccsdkapps \ 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 new file mode 100644 index 000000000..a11a73698 --- /dev/null +++ b/src/main/resources/clds/tosca_update/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_update/defaultToscaTypes.yaml b/src/main/resources/clds/tosca_update/defaultToscaTypes.yaml deleted file mode 100644 index a11a73698..000000000 --- a/src/main/resources/clds/tosca_update/defaultToscaTypes.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.properties b/src/main/resources/clds/tosca_update/templates.properties deleted file mode 100644 index 5da239b1f..000000000 --- a/src/main/resources/clds/tosca_update/templates.properties +++ /dev/null @@ -1,15 +0,0 @@ -#Numeric types -integer=type,description,title,deprecated,default,enum,const,multipleOf,maximum,exclusiveMaximum,minimum,exclusiveMinimum -number=type,description,title,deprecated,default,enum,const,multipleOf,maximum,exclusiveMaximum,minimum,exclusiveMinimum -range=type,description,title,deprecated,default,enum,const,multipleOf,maximum,exclusiveMaximum,minimum,exclusiveMinimum -# -boolean=type,description,title,deprecated,default,enum,const,readOnly,writeOnly -#String types -string=type,description,title,deprecated,default,enum,const,minLength,maxLength,pattern,format -timestamp=type,description,title,deprecated,default,enum,const,minLength,maxLength,pattern,format -scalar-unit.time=type,description,title,deprecated,default,enum,const,minLength,maxLength,pattern,format -scalar-unit.frequency=type,description,title,deprecated,default,enum,const,minLength,maxLength,pattern,format -scalar-unit.size=type,description,title,deprecated,default,enum,const,minLength,maxLength,pattern,format -#Complex types -array=type,description,title,deprecated,default,enum,const,minItems,maxItems,uniqueItems,minContains,maxContains -object=type,description,title,deprecated,default,enum,const,properties,minProperties,maxProperties,required,dependentRequired,dependencies,readOnly,writeOnly -- cgit 1.2.3-korg