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.