manifest

package
v0.0.0-...-e2c346a Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2015 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 DiskPool

type DiskPool struct {
	Name               string                      `yaml:"name"`
	DiskSize           int                         `yaml:"disk_size"`
	RawCloudProperties map[interface{}]interface{} `yaml:"cloud_properties"`
}

func (DiskPool) CloudProperties

func (dp DiskPool) CloudProperties() (map[string]interface{}, error)

type Job

type Job struct {
	Name               string
	Instances          int
	Lifecycle          JobLifecycle
	Templates          []ReleaseJobRef
	Networks           []JobNetwork
	PersistentDisk     int                         `yaml:"persistent_disk"`
	PersistentDiskPool string                      `yaml:"persistent_disk_pool"`
	RawProperties      map[interface{}]interface{} `yaml:"properties"`
}

func (*Job) Properties

func (j *Job) Properties() (map[string]interface{}, error)

type JobLifecycle

type JobLifecycle string
const (
	JobLifecycleService JobLifecycle = "service"
	JobLifecycleErrand  JobLifecycle = "errand"
)

type JobNetwork

type JobNetwork struct {
	Name      string
	Default   []NetworkDefault
	StaticIPs []string `yaml:"static_ips"`
}

type Manifest

type Manifest struct {
	Name          string
	RawProperties map[interface{}]interface{}
	Jobs          []Job
	Networks      []Network
	DiskPools     []DiskPool
	ResourcePools []ResourcePool
	Update        Update
}

func (Manifest) DiskPool

func (d Manifest) DiskPool(jobName string) (DiskPool, error)

func (Manifest) FindJobByName

func (d Manifest) FindJobByName(jobName string) (Job, bool)

func (Manifest) NetworkInterfaces

func (d Manifest) NetworkInterfaces(jobName string) (map[string]map[string]interface{}, error)

NetworkInterfaces returns a map of network names to network interfaces. We can't use map[string]NetworkInterface, because it's impossible to down-cast to what the cloud client requires.

func (Manifest) Properties

func (d Manifest) Properties() (map[string]interface{}, error)

type Network

type Network struct {
	Name               string                      `yaml:"name"`
	Type               NetworkType                 `yaml:"type"`
	RawCloudProperties map[interface{}]interface{} `yaml:"cloud_properties"`
	IP                 string                      `yaml:"ip"`
	Netmask            string                      `yaml:"netmask"`
	Gateway            string                      `yaml:"gateway"`
	DNS                []string                    `yaml:"dns"`
}

func (Network) CloudProperties

func (n Network) CloudProperties() (map[string]interface{}, error)

func (Network) Interface

func (n Network) Interface() (NetworkInterface, error)

type NetworkDefault

type NetworkDefault string
const (
	NetworkDefaultDNS     NetworkDefault = "dns"
	NetworkDefaultGateway NetworkDefault = "gateway"
)

type NetworkInterface

type NetworkInterface map[string]interface{}

type NetworkType

type NetworkType string
const (
	Dynamic NetworkType = "dynamic"
	Manual  NetworkType = "manual"
	VIP     NetworkType = "vip"
)

func (NetworkType) String

func (n NetworkType) String() string

type Parser

type Parser interface {
	Parse(path string) (Manifest, error)
}

func NewParser

func NewParser(fs boshsys.FileSystem, logger boshlog.Logger) Parser

type ReleaseJobRef

type ReleaseJobRef struct {
	Name    string
	Release string
}

type ResourcePool

type ResourcePool struct {
	Name               string                      `yaml:"name"`
	Network            string                      `yaml:"network"`
	RawCloudProperties map[interface{}]interface{} `yaml:"cloud_properties"`
	RawEnv             map[interface{}]interface{} `yaml:"env"`
}

func (ResourcePool) CloudProperties

func (rp ResourcePool) CloudProperties() (map[string]interface{}, error)

func (ResourcePool) Env

func (rp ResourcePool) Env() (map[string]interface{}, error)

type Update

type Update struct {
	UpdateWatchTime WatchTime
}

type UpdateSpec

type UpdateSpec struct {
	UpdateWatchTime *string `yaml:"update_watch_time"`
}

type Validator

type Validator interface {
	Validate(Manifest) error
}

func NewValidator

func NewValidator(logger boshlog.Logger, releaseResolver bmrelset.Resolver) Validator

type WatchTime

type WatchTime struct {
	Start int
	End   int
}

func NewWatchTime

func NewWatchTime(timeRange string) (WatchTime, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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