resource

package
v0.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadYamlTemplate

func ReadYamlTemplate(yamlFile string) (yamlTemplate []byte, err error)

Reads the given config .yml file, returns it as a slice of bytes.

Types

type Resource

type Resource struct {
	Log    *logrus.Logger
	Vendor string
}

func (*Resource) LoadConfigResources

func (r *Resource) LoadConfigResources(yamlTemplate []byte) (config *cfgresources.ResourcesConfig)

Config resources are configuration parameters applied periodically, Given a yaml template this method gets the template rendered and returns Unmarshalled yaml.

func (*Resource) LoadSetupResources

func (r *Resource) LoadSetupResources(yamlTemplate []byte) (config *cfgresources.ResourcesSetup)

Setup resources are one time setup parameters, it may involve resetting/power cycling various dependencies,

  • e.g blades in a chassis that need to be power cycled if the flex addresses have been enabled/disabled.

Given a yaml template this method gets the template rendered and returns Unmarshalled yaml.

func (*Resource) RenderYamlTemplate

func (r *Resource) RenderYamlTemplate(yamlTemplate []byte) (yamlData []byte)

Renders templated values in the given config .yml, returns it as a slice of bytes.

Jump to

Keyboard shortcuts

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