migratebundle

package
v3.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2018 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(bundlesYAML []byte, isSubordinate func(id *charm.URL) (bool, error)) (map[string]*charm.BundleData, error)

Migrate parses the old-style bundles.yaml file in bundlesYAML and returns a map containing an entry for each bundle found in that basket, keyed by the name of the bundle.

It performs the following changes:

- Any inheritance is expanded.

- when a "to" placement directive refers to machine 0, an explicit machines section is added. Also, convert it to a slice.

- If the charm URL is not specified, it is taken from the service name.

- num_units is renamed to numunits, and set to 1 if omitted.

- A relation clause with multiple targets is expanded into multiple relation clauses.

- "services" section is renamed to "applications"

The isSubordinate argument is used to find out whether a charm is a subordinate.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL