hostdoc

package
v1.10.56 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

README

Host Document Format:

The Host Document is expected to contain the following JSON

{
        "provider": "value"
	"uuid": “long hex value",
	"domain": "value",
	"service": "comma separated value",
	"profile": "value”,
	"zone": "openstack cluster",
        "ip": ["value"],
}

The Json would be could be dropped into a file such as /var/lib/sia/host_document.

Notes on Service:

The service entry is a comma-separated value. The first one is the primary service name that can be used by tools when the service is not provided in the context.

Documentation

Index

Constants

View Source
const (
	DOMAIN   = "domain"
	SERVICE  = "service"
	SERVICES = "services"
	PROFILE  = "profile"
	PROVIDER = "provider"
	IP       = "ip"
	UUID     = "uuid"
	ZONE     = "zone"
)

Variables

This section is empty.

Functions

func Write added in v1.10.56

func Write(doc raw.Doc, docPath string) error

Types

type Doc

type Doc struct {
	Provider provider.Provider
	Domain   string
	Profile  string
	Services []string
	Uuid     string
	Ip       map[string]bool
	Zone     string
	Bytes    []byte
}

func NewPlainDoc

func NewPlainDoc(bytes []byte) (*Doc, string, error)

NewPlainDoc returns Doc, the provider string from the host_document, and an error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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