Coder Social home page Coder Social logo

borismod / toscana Goto Github PK

View Code? Open in Web Editor NEW

This project forked from qualisystems/toscana

0.0 2.0 0.0 2.51 MB

:sunrise_over_mountains: :wine_glass: TOSCA Net Analyzer

License: Apache License 2.0

C# 11.14% GCC Machine Description 0.01% Batchfile 0.01% HTML 76.53% CSS 10.59% JavaScript 1.74%

toscana's Introduction

Toscana

Build status codecov NuGet version

What is Toscana?

Toscana, which stands for TOSCA Net Analyzer, is a .NET library for validating, parsing and analyzing TOSCA YAML format.

What is TOSCA?

TOSCA, which stands for Topology and Orchestration Specification for Cloud Applications, is a language in YAML grammar for describing service templates by means of Topology Templates and towards enablement of interaction with a TOSCA instance model perhaps by external APIs or plans.

To learn learn more about OASIS TOSCA visit OASIS Open Standards channel on YouTube

What is YAML?

YAML, which stands for "YAML Ain't Markup Language", is described as "a human friendly data serialization standard for all programming languages". Like XML, it allows to represent about any kind of data in a portable, platform-independent format. Unlike XML, it is "human friendly", which means that it is easy for a human to read or produce a valid YAML document.

Getting started

Install Toscana nuget package from from Manage Nuget packages

Or from Nuget Package Manager Console:

> install-package Toscana

Usage

There are two main file formats in the TOSCA standard: TOSCA Service Template and TOSCA Cloud Service Archive. The first one is in YML, while the last one is a ZIP file.

TOSCA Service Template

TOSCA YAML file is represented by ToscaServiceTemplate class in Toscana library. Toscana allows parsing a single TOSCA YAML file into an instance of ToscaServiceTemplate class. Even if the file depends on other TOSCA YAML files via imports parsing will succeeds.

Load a TOSCA Service Template file

ToscaServiceTemplate toscaServiceTemplate = ToscaServiceTemplate.Load("service-template.yaml");

Create a new TOSCA Service Template and save it to a file

ToscaServiceTemplate toscaServiceTemplate = new ToscaServiceTemplate
{
    ToscaDefinitionsVersion = "tosca_simple_yaml_1_0"
};
toscaServiceTemplate.NodeTypes.Add("node_type_name", new ToscaNodeType() );
toscaServiceTemplate.Save("service-template.yaml");

TOSCA Cloud Service Archive

TOSCA CSAR file is a ZIP compressed file which contains a set of TOSCA YAML files, drivers and icons, that represent cloud environment. The archive must contain the TOSCA.meta file, whcih points to the TOSCA YAML entry point file. If any of the TOSCA YAML files imports another YAML file that is missing in the archive, loading will fail.

Load a tosca.zip with all the imports included in the archive

ToscaCloudServiceArchive toscaCloudServiceArchive = ToscaCloudServiceArchive.Load("cloud-archive.zip");

Load a tosca.zip when some of the imports reside at alternative location

ToscaCloudServiceArchive toscaCloudServiceArchive = ToscaCloudServiceArchive.Load("cloud-archive.zip", @"c:\cloud-imports\");

License

The software is released under Apache License v2.0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.