model

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clouds

type Clouds struct {
	Providers []*Provider `hcl:"provider"`
}

func (*Clouds) BuildInventory

func (c *Clouds) BuildInventory(targetEnv string) ([]byte, error)

BuildInventory constructs the ansible inventory and returns it as raw json bytes.

func (*Clouds) Refresh

func (c *Clouds) Refresh() []error

Refresh updates the Clouds structure with information retrieved from cloud providers.

type Identity

type Identity struct {
	DomainName string `hcl:"domain"`
	Endpoint   string `hcl:"endpoint"`
	Username   string `hcl:"username"`
	Password   string `hcl:"password"`
	ProjectID  string `hcl:"project_id"`
	TenantID   string `hcl:"tenant_id"`
	Version    int    `hcl:"version"`
}

type Meta

type Meta struct {
	User           string `hcl:"user"`
	Groups         string `hcl:"groups"`
	HostVarsPrefix string `hcl:"hostvars_prefix"`
	Env            string `hcl:"environment"`
}

type Options

type Options struct {
	FallBackUser string `hcl:"fallback_user"`
	Meta         Meta   `hcl:"meta"`
}

type Provider

type Provider struct {
	Identity     Identity       `hcl:"identity"`
	Options      Options        `hcl:"options"`
	Name         string         `hcl:",key"`
	RegionGroups []*RegionGroup `hcl:"regions"`
}

type Region

type Region struct {
	Label string `hcl:",key"`
	Name  string `hcl:"name"`
	// contains filtered or unexported fields
}

type RegionGroup

type RegionGroup struct {
	Name    string    `hcl:",key"`
	Regions []*Region `hcl:"region"`
}

Jump to

Keyboard shortcuts

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