cmd

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: MIT Imports: 56 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllocateIps

func AllocateIps(ncns []*csi.LogicalNCN, networks map[string]*csi.IPV4Network)

AllocateIps distributes IP reservations for each of the NCNs within the networks

func Copy

func Copy(srcFile, dstFile string) error

Copy is the main copy function

func CopyArtifactsToPart

func CopyArtifactsToPart(src string, dest string, regex string)

CopyArtifactsToPart copies files needed to the PITDATA partition

func CopyDirectory

func CopyDirectory(scrDir, dest string) error

CopyDirectory copies a directory

func CopySymLink(source, dest string) error

CopySymLink checks and copy symlinks

func CreateIfNotExists

func CreateIfNotExists(dir string, perm os.FileMode) error

CreateIfNotExists creates it if it doesn't

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func Exists

func Exists(filePath string) bool

Exists checks if a file exists

func GetArtifact

func GetArtifact(dirpath string, url string) (err error)

GetArtifact downloads kernels, initrd, and squashfs images

func PadRight

func PadRight(str, pad string, lenght int) string

PadRight adds nice formatting for strings

func PrintConfig

func PrintConfig(v *viper.Viper)

PrintConfig : Dump all configuration information as a yaml file on stdout

func ValidateSchema added in v1.9.1

func ValidateSchema(f string, s string) (bool, error)

ValidateSchema compares a JSON file to the defined schema file

func WalkMatch

func WalkMatch(root, pattern string) ([]string, error)

WalkMatch finds files on a pattern match

Types

type CACerts

type CACerts struct {
	RemoveDefaults bool     `json:"remove-defaults"`
	Trusted        []string `json:"trusted"`
}

CACerts - For storage of ca-certs cloud-init update

type CloudInitGlobal

type CloudInitGlobal struct {
	Global struct {
		Metadata `json:"meta-data"`
	}
}

CloudInitGlobal - Boilerplace for cloud-init hierarchical structure

type Customizations

type Customizations struct {
	Spec struct {
		Kubernetes struct {
			SealedSecrets map[string]SealedSecret `yaml:"sealed_secrets"`
		}
	}
	// contains filtered or unexported fields
}

Customizations - Minimum customizations (shasta-cfg) struct to access sealed secrets

type HMNComponent added in v1.9.1

type HMNComponent struct {
	Source              string
	SourceRack          string
	SourceLocation      string
	SourceSubLocation   string
	DestinationRack     string
	DestinationLocation int
	DestinationPort     string
}

HMNComponent is an individual component in the HMNConnections slice

type HMNConnections added in v1.9.1

type HMNConnections []HMNComponent

HMNConnections type is the go equivalent structure of hmn_connections.json

type Id added in v1.8.0

type Id struct {
	Architecture string   `json:"architecture"`
	CommonName   string   `json:"common_name"`
	ID           int      `json:"id"`
	Location     Location `json:"location"`
	Model        string   `json:"model"`
	Ports        []Port   `json:"ports"`
	Type         string   `json:"type"`
	Vendor       string   `json:"vendor"`
}

The Id type represents all of the information needed for

type Location added in v1.8.0

type Location struct {
	Elevation string `json:"elevation"`
	Rack      string `json:"rack"`
}

type Metadata

type Metadata struct {
	CACerts `json:"ca-certs"`
}

Metadata - Boilerplate for cloud-init hierarchical structure

type Port added in v1.8.0

type Port struct {
	DestNodeID int    `json:"destination_node_id"`
	DestPort   int    `json:"destination_port"`
	DestSlot   string `json:"destination_slot"`
	Port       int    `json:"port"`
	Slot       string `json:"slot"`
	Speed      int    `json:"speed"`
}

The Port type defines where things are plugged in

type SealedSecret

type SealedSecret struct {
	Spec struct {
		EncryptedData map[string]string `yaml:"encryptedData"`
		Template      struct {
			Metadata struct {
				Annotations map[string]string
			}
		}
	}
}

SealedSecret - Minimum struct to determine secret scope and access encrypted data

type Shcd added in v1.8.0

type Shcd []Id

The Shcd type represents the entire machine-readable SHCD inside a go struct

func ParseSHCD added in v1.8.0

func ParseSHCD(f []byte) (Shcd, error)

ParseSHCD accepts a machine-readable SHCD and produces an Shcd object, which can be used throughout csi It is the golang and csi equivalent of the shcd.json file generated by canu

type Switch added in v1.9.1

type Switch struct {
	Xname string
	Type  string
	Brand string
}

Switch is a row in switch_metadata.csv

type SwitchMetadata added in v1.9.1

type SwitchMetadata []Switch

SwitchMetadata type is the go equivalent structure of switch_metadata.csv

Jump to

Keyboard shortcuts

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