cmd

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigCommand

func ConfigCommand() cli.Command

ConfigCommand defines a CLI command to set up the Harvester Configuration files

func CreateVMImage

func CreateVMImage(c Client, imageName string, url string) (*v1beta1.VirtualMachineImage, error)

CreateVMImage will create a VM Image on Harvester given an image name and an image URL

func NewTrue

func NewTrue() *bool

NewTrue returns a pointer to true

func RandomID

func RandomID() string

RandomID returns a random string used as an ID internally in Harvester.

func ShellCommand

func ShellCommand() cli.Command

ShellCommand defines the CLI command that makes it possible to ssh into a VM

func VMCommand

func VMCommand() cli.Command

VMCommand defines the CLI command that manages VMs

Types

type Client

type Client struct {
	HarvesterClient *harvclient.Clientset
	KubevirtClient  *kubecli.KubevirtClient
}

Client type holds the HarvesterClient and KubevirtClient objects which make it possible to control Harvester's resources on Kubernetes

func GetHarvesterClient

func GetHarvesterClient(ctx *cli.Context) (Client, error)

GetHarvesterClient creates a Client for Harvester from Config input

type Conf

type Conf struct {
	Path    string
	Content string
}

Conf is an Object that contains the configuration path and the configuration's file content as a string

type VirtualMachineData

type VirtualMachineData struct {
	State          string
	VirtualMachine VMv1.VirtualMachine
	Name           string
	Node           string
	CPU            uint32
	Memory         string
	IPAddress      string
}

VirtualMachineData type is a Data Structure that holds information to display for VM

Jump to

Keyboard shortcuts

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