{"id":20237362,"url":"https://github.com/qualisystems/toscana","last_synced_at":"2025-04-10T19:12:04.618Z","repository":{"id":60773864,"uuid":"60257503","full_name":"QualiSystems/Toscana","owner":"QualiSystems","description":":sunrise_over_mountains: :wine_glass: TOSCA .Net Analyzer","archived":false,"fork":false,"pushed_at":"2023-07-20T08:56:40.000Z","size":2822,"stargazers_count":3,"open_issues_count":2,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-24T16:53:26.288Z","etag":null,"topics":["cloud","orchestration","parsing","topology","tosca","tosca-yaml-files","toscana","yaml"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/Toscana","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QualiSystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-06-02T11:09:23.000Z","updated_at":"2024-08-24T20:01:35.000Z","dependencies_parsed_at":"2022-10-04T15:45:29.088Z","dependency_job_id":"37d0a192-8818-4369-9bfa-f1176f59ebdf","html_url":"https://github.com/QualiSystems/Toscana","commit_stats":{"total_commits":205,"total_committers":7,"mean_commits":"29.285714285714285","dds":0.04878048780487809,"last_synced_commit":"872d816001985dbef7d6c5bdb60cc62512ac154d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QualiSystems%2FToscana","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QualiSystems%2FToscana/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QualiSystems%2FToscana/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QualiSystems%2FToscana/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QualiSystems","download_url":"https://codeload.github.com/QualiSystems/Toscana/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248279803,"owners_count":21077408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud","orchestration","parsing","topology","tosca","tosca-yaml-files","toscana","yaml"],"created_at":"2024-11-14T08:26:40.790Z","updated_at":"2025-04-10T19:12:04.600Z","avatar_url":"https://github.com/QualiSystems.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Toscana\n\n[![Join the chat at https://gitter.im/QualiSystems/Toscana](https://badges.gitter.im/QualiSystems/Toscana.svg)](https://gitter.im/QualiSystems/Toscana?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n[![Build status](https://ci.appveyor.com/api/projects/status/5f7grtkr9r4ao0er/branch/master?svg=true)](https://ci.appveyor.com/project/johnathanvidu/toscana/branch/master) [![codecov](https://codecov.io/gh/QualiSystems/Toscana/branch/master/graph/badge.svg)](https://codecov.io/gh/QualiSystems/Toscana) [![NuGet version](https://badge.fury.io/nu/Toscana.svg)](https://badge.fury.io/nu/Toscana) \n\n\n## What is Toscana?\nToscana, which stands for TOSCA Net Analyzer, is a .NET library for validating, parsing and analyzing TOSCA YAML format.\n\n\n## What is TOSCA?\nTOSCA, which stands for Topology and Orchestration Specification for Cloud Applications, \nis a language in YAML grammar for describing service templates by means of Topology Templates and towards enablement \nof interaction with a TOSCA instance model perhaps by external APIs or plans.  \n\nTo learn learn more about OASIS TOSCA visit [OASIS Open Standards channel on YouTube](https://www.youtube.com/playlist?list=PLaYKtNo_BitZXdvyNDwBi290IHxdi459v)\n\n## What is YAML?\nYAML, which stands for \"YAML Ain't Markup Language\", is described as \"a human friendly data serialization \nstandard for all programming languages\". Like XML, it allows to represent about any kind of data in a portable, \nplatform-independent format. Unlike XML, it is \"human friendly\", which means that it is easy for a human to read \nor produce a valid YAML document.\n\n## Getting started\nInstall Toscana nuget package from from Manage Nuget packages\n\nOr from Nuget Package Manager Console: \n\n```Batch\n\u003e install-package Toscana\n```\n\n## Usage\n\nThere are two main file formats in the TOSCA standard: TOSCA Service Template and TOSCA Cloud Service Archive. \nThe first one is in YML, while the last one is a ZIP file.\n\n### TOSCA Service Template \n\nTOSCA YAML file is represented by _ToscaServiceTemplate_ class in Toscana library. \nToscana allows parsing a single TOSCA YAML file into an instance of ToscaServiceTemplate class. \nEven if the file depends on other TOSCA YAML files via _imports_ parsing will succeeds.\n\n**Load a TOSCA Service Template file**\n```C#\nToscaServiceTemplate toscaServiceTemplate = ToscaServiceTemplate.Load(\"service-template.yaml\");\n```\n\n**Create a new TOSCA Service Template and save it to a file**\n```C#\nToscaServiceTemplate toscaServiceTemplate = new ToscaServiceTemplate\n{\n    ToscaDefinitionsVersion = \"tosca_simple_yaml_1_0\"\n};\ntoscaServiceTemplate.NodeTypes.Add(\"node_type_name\", new ToscaNodeType() );\ntoscaServiceTemplate.Save(\"service-template.yaml\");\n```\n\n### TOSCA Cloud Service Archive \n\nTOSCA CSAR file is a ZIP compressed file which contains a set of TOSCA YAML files, drivers and icons, that represent cloud environment.\nThe archive must contain the TOSCA.meta file, whcih points to the TOSCA YAML entry point file. If any of the TOSCA YAML files \nimports another YAML file that is missing in the archive, loading will fail.\n\n**Load a tosca.zip with all the _imports_ included in the archive**\n\n```C#\nToscaCloudServiceArchive toscaCloudServiceArchive = ToscaCloudServiceArchive.Load(\"cloud-archive.zip\");\n```\n\n**Load a tosca.zip when some of the _imports_ reside at alternative location**\n\n```C#\nToscaCloudServiceArchive toscaCloudServiceArchive = ToscaCloudServiceArchive.Load(\"cloud-archive.zip\", @\"c:\\cloud-imports\\\");\n```\n\n**Creating Cloud Service Archive**\n\n```C#\nToscaMetadata toscaMetadata = new ToscaMetadata\n{ \n    CsarVersion = new Version(1,0,0), \n    EntryDefinitions = \"entry.yaml\", \n    ToscaMetaFileVersion = new Version(1,0,0), \n    CreatedBy = \"Anonymous\" \n};\nToscaServiceTemplate toscaServiceTemplate = new ToscaServiceTemplate\n{\n    ToscaDefinitionsVersion = \"tosca_simple_yaml_1_0\"\n};\nToscaCloudServiceArchive cloudServiceArchive = new ToscaCloudServiceArchive(toscaMetadata);\ncloudServiceArchive.AddToscaServiceTemplate(\"entry.yaml\", toscaServiceTemplate);\n```\n\n**Validating Cloud Service Archive**\n\n```C#\nList\u003cValidationResult\u003e results;\nif ( !cloudServiceArchive.TryValidate(out results) )\n{\n    foreach(ValidationResult validationResult in results)\n    {\n        Console.WriteLine(validationResult.ErrorMessage);\n    }\n}\n```\n\n### Documentation\n\nToscana documentation is powered by DocFX Documentation Generation Tool for API Reference and Markdown files based on XML documentation comments.\n\nTo build the documentation from command-line:\n\n```\n\u003e docfx .\\toscana.docs\\docfx.json\n```\n\nTo run a web server that hosts Toscana HTML documentation:\n```\n\u003e docfx serve .\\Toscana.Docs\\_site\n```\n\n### Powershell Module\nToscana is also available as a Powershell module that allows loading and validating Tosca related files.\n\n**Installation**\n```PS\nPS\u003e  Import-Module Toscana.PS\\bin\\Debug\\Toscana.PS.dll\n```\n\n**Loading Cloud Service Archive**\n\n```PS\nPS\u003e  Get-ToscaCloudServiceArchive Tosca.zip\n```\n\n**Loading Cloud Service Archive with imports at alternative path**\n\n```PS\nPS\u003e  Get-ToscaCloudServiceArchive Tosca.zip C:\\Imports\n```\n\n**Loading Cloud Service Template**\n\n```PS\nPS\u003e  Get-ToscaServiceTemplate tosca.yaml\n```\n\n\n### License\nThe software is released under [Apache License v2.0](LICENSE). ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqualisystems%2Ftoscana","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqualisystems%2Ftoscana","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqualisystems%2Ftoscana/lists"}