applyspec

package
Version: v2.367.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 6 Imported by: 11

Documentation

Index

Constants

View Source
const (
	NetworkSpecTypeDynamic = "dynamic"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplySpec

type ApplySpec interface {
	Jobs() []models.Job
	Packages() []models.Package
	MaxLogFileSize() string
}

type JobSpec

type JobSpec struct {
	Name             *string           `json:"name"`
	Release          string            `json:"release"`
	Template         string            `json:"template"`
	Version          string            `json:"version"`
	JobTemplateSpecs []JobTemplateSpec `json:"templates"`
}

func (*JobSpec) JobTemplateSpecsAsJobs

func (s *JobSpec) JobTemplateSpecsAsJobs() []models.Job

type JobTemplateSpec

type JobTemplateSpec struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

func (*JobTemplateSpec) AsJob

func (s *JobTemplateSpec) AsJob() models.Job

type LoggingSpec

type LoggingSpec struct {
	MaxLogFileSize string `json:"max_log_file_size"`
}

type NetworkSpec

type NetworkSpec struct {
	// Instead of explicitly specifying all network fields,
	// keep original hash that Director sent because
	// Director will later fetch current apply spec via get_state
	// and use absolute equality to determine network changes.
	//
	// Ideally we would explicitly call out fields (like in 40276d6 commit)
	// and Director would check for equivalence instead of absolute hash equality.
	Fields map[string]interface{}
}

func (NetworkSpec) MarshalJSON

func (s NetworkSpec) MarshalJSON() ([]byte, error)

func (NetworkSpec) PopulateIPInfo

func (s NetworkSpec) PopulateIPInfo(ip, netmask, gateway string) NetworkSpec

func (*NetworkSpec) UnmarshalJSON

func (s *NetworkSpec) UnmarshalJSON(data []byte) error

type PackageSpec

type PackageSpec struct {
	Name             string                `json:"name"`
	Version          string                `json:"version"`
	Sha1             crypto.MultipleDigest `json:"sha1"`
	BlobstoreID      string                `json:"blobstore_id"`
	SignedURL        string                `json:"signed_url"`
	BlobstoreHeaders map[string]string     `json:"blobstore_headers"`
}

func (*PackageSpec) AsPackage

func (s *PackageSpec) AsPackage() models.Package

type PropertiesSpec

type PropertiesSpec struct {
	LoggingSpec LoggingSpec `json:"logging"`
}

type RenderedTemplatesArchiveSpec

type RenderedTemplatesArchiveSpec struct {
	Sha1        *crypto.MultipleDigest `json:"sha1"`
	BlobstoreID string                 `json:"blobstore_id"`
}

func (RenderedTemplatesArchiveSpec) AsSource

func (*RenderedTemplatesArchiveSpec) UnmarshalJSON

func (s *RenderedTemplatesArchiveSpec) UnmarshalJSON(data []byte) error

type V1ApplySpec

type V1ApplySpec struct {
	PropertiesSpec    PropertiesSpec         `json:"properties"`
	JobSpec           JobSpec                `json:"job"`
	PackageSpecs      map[string]PackageSpec `json:"packages"`
	ConfigurationHash string                 `json:"configuration_hash"`
	NetworkSpecs      map[string]NetworkSpec `json:"networks"`
	ResourcePoolSpecs interface{}            `json:"resource_pool"`
	Deployment        string                 `json:"deployment"`
	Name              string                 `json:"name"`

	// Since default value of int is 0 use pointer
	// to indicate that state does not have an assigned index
	// (json.Marshal will result in null instead of 0).
	Index            *int   `json:"index"`
	NodeID           string `json:"id"`
	AvailabilityZone string `json:"az"`

	PersistentDisk int `json:"persistent_disk"`

	RenderedTemplatesArchiveSpec *RenderedTemplatesArchiveSpec `json:"rendered_templates_archive"`
}

func (V1ApplySpec) Jobs

func (s V1ApplySpec) Jobs() []models.Job

Jobs returns a list of pre-rendered job templates extracted from a single tarball provided by BOSH director.

func (V1ApplySpec) MaxLogFileSize

func (s V1ApplySpec) MaxLogFileSize() string

func (V1ApplySpec) Packages

func (s V1ApplySpec) Packages() []models.Package

type V1Service

type V1Service interface {
	Get() (V1ApplySpec, error)
	Set(V1ApplySpec) error
	PopulateDHCPNetworks(V1ApplySpec, boshsettings.Settings) (V1ApplySpec, error)
}

func NewConcreteV1Service

func NewConcreteV1Service(fs boshsys.FileSystem, specFilePath string) V1Service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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