manifest

package
v0.0.0-...-34d941c Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2015 License: Apache-2.0 Imports: 9 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
	DiskSize        int
	CloudProperties biproperty.Map
}

type Job

type Job struct {
	Name               string
	Instances          int
	Lifecycle          JobLifecycle
	Templates          []ReleaseJobRef
	Networks           []JobNetwork
	PersistentDisk     int
	PersistentDiskPool string
	Properties         biproperty.Map
}

type JobLifecycle

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

type JobNetwork

type JobNetwork struct {
	Name      string
	Default   []NetworkDefault
	StaticIPs []string
}

type Manifest

type Manifest struct {
	Name          string
	Properties    biproperty.Map
	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]biproperty.Map, 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. TODO: refactor to NetworkInterfaces(Job) and use FindJobByName before using (then remove error)

type Network

type Network struct {
	Name            string
	Type            NetworkType
	CloudProperties biproperty.Map
	IP              string
	Netmask         string
	Gateway         string
	DNS             []string
}

func (Network) Interface

func (n Network) Interface() biproperty.Map

Interface returns a property map representing a generic network interface. Expected Keys: ip, type, cloud properties. Optional Keys: netmask, gateway, dns

type NetworkDefault

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

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
	Network         string
	CloudProperties biproperty.Map
	Env             biproperty.Map
}

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 birelset.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