Documentation ¶
Index ¶
- func DeduceOrigin(url *charm.URL, channel corecharm.Channel, platform corecharm.Platform) (commoncharm.Origin, error)
- func DeducePlatform(cons constraints.Value, series string, modelCons constraints.Value) (corecharm.Platform, error)
- func GetFlags(flagSet *gnuflag.FlagSet, flagNames []string) []string
- func GetMetaResources(charmURL *charm.URL, client CharmClient) (map[string]charmresource.Meta, error)
- func GetUpgradeResources(resourceLister ResourceLister, applicationID string, ...) (map[string]charmresource.Meta, error)
- func ParsePlacement(spec string) (*instance.Placement, error)
- func ReadValue(ctx *cmd.Context, filesystem modelcmd.Filesystem, filename string) (string, error)
- type CharmClient
- type ResourceLister
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeduceOrigin ¶
func DeduceOrigin(url *charm.URL, channel corecharm.Channel, platform corecharm.Platform) (commoncharm.Origin, error)
DeduceOrigin attempts to deduce the origin from a channel and a platform. Depending on what the charm URL schema is, will then construct the correct origin for that application.
func DeducePlatform ¶
func DeducePlatform(cons constraints.Value, series string, modelCons constraints.Value) (corecharm.Platform, error)
DeducePlatform attempts to create a Platform (architecture, os and series) from a set of constraints or a free style series.
func GetFlags ¶
GetFlags returns the flags with the given names. Only flags that are set and whose name is included in flagNames are included.
func GetMetaResources ¶
func GetMetaResources(charmURL *charm.URL, client CharmClient) (map[string]charmresource.Meta, error)
GetMetaResources retrieves metadata resources for the given charm.URL.
func GetUpgradeResources ¶
func GetUpgradeResources( resourceLister ResourceLister, applicationID string, cliResources map[string]string, meta map[string]charmresource.Meta, ) (map[string]charmresource.Meta, error)
GetUpgradeResources
func ParsePlacement ¶
ParsePlacement validates provided placement of a unit and returns instance.Placement.
Types ¶
type CharmClient ¶
CharmClient defines a subset of the charms facade, as required by the upgrade-charm command and to GetMetaResources.
type ResourceLister ¶
type ResourceLister interface {
ListResources([]string) ([]resource.ApplicationResources, error)
}
ResourceLister defines a subset of the resources facade, as required by the upgrade-charm command and to deploy bundles.