migratebundle

package
v5.0.0-...-949f52b Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2016 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(bundlesYAML []byte, getCharm func(id *charm.Reference) (*charm.Meta, 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.

The getCharm argument is ignored and provided for backward compatibility only. It will be removed in charm.v5.

Types

This section is empty.

Jump to

Keyboard shortcuts

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