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.