Commit de852d8e authored by Spiros Koulouzis's avatar Spiros Koulouzis

fixed attributes in model

parent 0628c21a
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
type: "object" type: "object"
properties: properties:
derived_from: derived_from:
type: "string" type: "string"
properties: properties:
type: object type: object
additionalProperties: additionalProperties:
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
type: type:
type: "string" type: "string"
description: description:
type: "string" type: "string"
directives: directives:
type: "array" type: "array"
items: items:
......
...@@ -18,11 +18,9 @@ ...@@ -18,11 +18,9 @@
additionalProperties: additionalProperties:
type: object type: object
outputs: outputs:
type: "array" type: object
items: additionalProperties:
type: object type: object
additionalProperties:
type: object
groups: groups:
type: object type: object
additionalProperties: additionalProperties:
......
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
topology_template: topology_template:
$ref: "https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/openAPI/TOSCA/TopologyTemplate.yml#/TopologyTemplate" $ref: "https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/openAPI/TOSCA/TopologyTemplate.yml#/TopologyTemplate"
template_author: template_author:
type: "string" type: "string"
template_version: template_version:
type: "string" type: "string"
description: description:
type: "string" type: "string"
imports: imports:
type: "array" type: "array"
items: items:
......
...@@ -73,7 +73,7 @@ def get_tosca_template_dict_by_id(id): ...@@ -73,7 +73,7 @@ def get_tosca_template_dict_by_id(id):
def save(file): def save(file):
tosca_template_file_path = os.path.join(db_dir_path, file.filename) # tosca_template_file_path = os.path.join(db_dir_path, file.filename)
tosca_template_dict = yaml.safe_load(file.stream) tosca_template_dict = yaml.safe_load(file.stream)
tosca_template_model = ToscaTemplateModel.from_dict(tosca_template_dict) tosca_template_model = ToscaTemplateModel.from_dict(tosca_template_dict)
tosca_template = ToscaTemplate(yaml_dict_tpl=tosca_template_dict) tosca_template = ToscaTemplate(yaml_dict_tpl=tosca_template_dict)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment