Disclaimer: The MTA package is under heavy development and is currently in a
pre-alpha
stage. Some functionality is still missing and the APIs are subject to change; use at your own risk.
MTA tool for exploring and validating the multitarget application descriptor (mta.yaml
).
The tool commands (APIs) are used to do the following:
- Explore the structure of the
mta.yaml
file objects, such as retrieving a list of resources required by a specific module. - Validate an
mta.yaml
file against a specified schema version. - Ensure semantic correctness of an
mta.yaml
file, such as the uniqueness of module/resources names, the resolution of requires/provides pairs, and so on. - Validate the descriptor against the project folder structure, such as the
path
attribute reference in an existing project folder. - Get data for constructing a deployment MTA descriptor, such as deployment module types.
A multitarget application is a package comprised of multiple application and resource modules that have been created using different technologies and deployed to different run-times; however, they have a common life cycle. A user can bundle the modules together using the mta.yaml
file, describe them along with their inter-dependencies to other modules, services, and interfaces, and package them in an MTA project.
- Supports the MTA parser
- Supports development descriptor schema validations (2.1)
- Supports semantic validations (MTA->project)
- Supports
path
validation - Add MTA API's usage documentation
- Supports uniqueness of module and resource names
- Supports multiple schema
- Supports advanced
mta.yaml
file (3.1, 3.2) schemas
- Supports updating scenarios, such as add module/resource, add module property, add dependency, and so on
- Supports placeholder resolution
-
Set your workspace.
-
Download and install it:
$ go get github.com/SAP/cloud-mta/mta
-
Import it into your source code:
import "github.com/SAP/cloud-mta/mta"
-
Quick start example:
// sets the path to the MTA project. mf, _ := ioutil.ReadFile("/path/mta.yaml") // Returns an MTA object. if err != nil { return err } // unmarshal MTA content. m := Unmarshal(mf) if err != nil { return err } // Returns the module properties. module, err := m.GetModuleByName(moduleName) if err != nil { return err }
Contributions are greatly appreciated. See CONTRIBUTING.md for details.
No known major issues. To report a new issue, please use our GitHub bug tracking system.
Please follow our issue template on how to report an issue.
Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
This file is licensed under the Apache 2.0 License except as noted otherwise in the LICENSE file.