manifest

package
v6.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: Apache-2.0 Imports: 15 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
	ResourcePool       string
	Properties         biproperty.Map
}

type JobLifecycle

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

type JobNetwork

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

type Manifest

type Manifest struct {
	Name          string
	Properties    biproperty.Map
	Jobs          []Job
	Networks      []Network
	DiskPools     []DiskPool
	ResourcePools []ResourcePool
	Update        Update
	Tags          map[string]string
}

func (Manifest) DiskPool

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

func (Manifest) FindJobByName

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

func (Manifest) GetListOfTemplateReleases

func (d Manifest) GetListOfTemplateReleases() (map[string]string, bool)

func (Manifest) JobName

func (d Manifest) JobName() string

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)

func (Manifest) ResourcePool

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

func (Manifest) Stemcell

func (d Manifest) Stemcell(jobName string) (StemcellRef, error)

type Network

type Network struct {
	Name            string
	Type            NetworkType
	CloudProperties biproperty.Map
	DNS             []string
	Subnets         []Subnet
}

func (Network) Interface

func (n Network) Interface(staticIPs []string, networkDefaults []NetworkDefault) (biproperty.Map, error)

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(interpolatedTemplate bidepltpl.InterpolatedTemplate, path string) (Manifest, error)
}

func NewParser

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

type ReleaseJobRef

type ReleaseJobRef struct {
	Name       string
	Release    string
	Properties *biproperty.Map
}

type ResourcePool

type ResourcePool struct {
	Name            string
	Network         string
	CloudProperties biproperty.Map
	Env             biproperty.Map
	Stemcell        StemcellRef
}

type StemcellRef

type StemcellRef struct {
	URL  string
	SHA1 string
}

func (StemcellRef) Description

func (s StemcellRef) Description() string

func (StemcellRef) GetSHA1

func (s StemcellRef) GetSHA1() string

func (StemcellRef) GetURL

func (s StemcellRef) GetURL() string

type Subnet

type Subnet struct {
	Range           string
	Gateway         string
	DNS             []string
	CloudProperties 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, birelsetmanifest.Manifest) error
	ValidateReleaseJobs(Manifest, boshinst.ReleaseManager) error
}

func NewValidator

func NewValidator(logger boshlog.Logger) Validator

type WatchTime

type WatchTime struct {
	Start int
	End   int
}

func NewWatchTime

func NewWatchTime(timeRange string) (WatchTime, error)

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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