cmd

package
v0.0.0-...-5db89ef Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2019 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Overview

Copyright © 2019 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2019 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileIpxeIso

func CompileIpxeIso(ipxePath string, compilePath string, host string, j Node, iso ISO, dest string) error

func CopyIpxeDir

func CopyIpxeDir(src, dst string) error

func CreateTempFolder

func CreateTempFolder(dest string) (string, error)

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 IsDirectoryAbsentOrIsemptyDirectory

func IsDirectoryAbsentOrIsemptyDirectory(path string) (bool, error)

func IsEmpty

func IsEmpty(name string) (bool, error)

func RandStringRunes

func RandStringRunes(n int) string

func WriteTemplate

func WriteTemplate(host string, node Node, src string, dst string, iso ISO) error

Types

type BootstrapPage

type BootstrapPage struct {
	Host string
	ISO  *ISO
	Node *Node
}

type ISO

type ISO struct {
	InitRD  string `json:"initrd"`
	VMLinuz string `json:"vmlinuz"`
	//KernelArgs    string `json:"kernelArgs"`
	//ImageUrl      string `json:"imageUrl"`
	KickstartUrl string `json:"kickstart_url"`
}

type Network

type Network struct {
	Type          string     `json:"type"`
	Name          string     `json:"name"`
	Netmask       string     `json:"netmask"`
	Ip            string     `json:"ip"`
	Gateway       string     `json:"gateway"`
	BootInterface bool       `json:"bootInterface"`
	Vlans         *[]Network `json:"vlans"`
}

type Node

type Node struct {
	Name     string
	Network  []Network `json:"network"`
	Hostname string
}

Jump to

Keyboard shortcuts

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