config

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2016 License: MIT, MIT Imports: 4 Imported by: 0

Documentation

Overview

The config package is that OpenStack configuration. This configuration is the yaml file "../vars/openstack/openstack.yml".

Index

Constants

View Source
const CONFIGFILE string = "../vars/openstack/openstack.yml"

The the location for configuration file of playback. This file must be a yaml file.

View Source
const HAPROXYCONFIG string = `# The HAProxy configuration generated by playback.
user is: {{.Openstack_admin_user}}
pass is: {{.Openstack_admin_pass}}
`

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Openstack_admin_user string
	Openstack_admin_pass string
}

The configuration of OpenStack Each var is the key(CONFIGFILE) for template

func (*Config) GenConf

func (c *Config) GenConf(temp string, newConf string) (err error)

Generate configuration file from a template. temp string is a const of configuration.

func (*Config) Parse

func (c *Config) Parse() Config

Parsing yaml form CONFIGFILE. The CONFIGFILE is a const type for yaml location. Return the Config struct.

Jump to

Keyboard shortcuts

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