gns3

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComputesPath = "v2/computes"
	ComputePath  = "v2/computes/%s"
)
View Source
const (
	TypeNat              = "nat"
	TypeEthernetSwitch   = "eithernet_switch"
	TypeVpcs             = "vpcs"
	TypeRouter           = "router"
	TypeFirewall         = "firewall"
	TypeMultilayerSwitch = "multilayer_switch"

	CategoryMultilayerSwitch = "multilayer_switch"
	CategorySwitch           = "switch"
	CategoryGuest            = "guest"
	CategoryRouter           = "router"
	CategoryFirewall         = "firewall"

	SymbolDockerGuest      = ":/symbols/classic/docker_guest.svg"
	SymbolQemuGuest        = ":/symbols/classic/qemu_guest.svg"
	SymbolRouter           = ":/symbols/classic/router.svg"
	SymbolEthernetSwitch   = ":/symbols/classic/ethernet_switch.svg"
	SymbolMultilayerSwitch = ":/symbols/classic/multilayer_switch.svg"
	SymbolFirewall         = ":/symbols/classic_firewall.svg"
	SymbolCloud            = ":/symbols/classic/cloud.svg"
	SymbolVpcs             = ":/symbols/classic/vpcs_guest.svg"

	TemplateTypeQemu     = "qemu"
	TemplateTypeIou      = "iou"
	TemplateTypeDynamips = "dynamips"
	TemplateTypeDocker   = "docker"
)
View Source
const (
	LinksPath = "v2/projects/%s/links"
	LinkPath  = "v2/projects/%s/links/%s"
)
View Source
const (
	NodesPath = "v2/projects/%s/nodes"
	NodePath  = "v2/projects/%s/nodes/%s"
)
View Source
const (
	ProjectsPath     = "v2/projects"
	ProjectPath      = "v2/projects/%s"
	ProjectOpenPath  = "v2/projects/%s/open"
	ProjectClosePath = "v2/projects/%s/close"
)
View Source
const (
	ServerShutdownPath = "v2/shutdown"
	ServerVersionPath  = "v2/version"
)
View Source
const (
	AppliancesPath = "v2/appliances"
)
View Source
const ImageMd5Path = "%s/images/%s/%s.md5sum"
View Source
const ImagePath = "%s/images/%s/%s"
View Source
const (
	TemplatesPath = "v2/templates"
)

Variables

View Source
var (
	ErrNotFound           = errors.New("not-found")
	ErrMd5Mismatch        = errors.New("md5-mismatch")
	ErrNoProjectSpecified = errors.New("no-project-specified")
)
View Source
var (
	ImageTypes = map[string]string{TemplateTypeQemu: "QEMU", TemplateTypeDynamips: "IOS", TemplateTypeIou: "IOU", TemplateTypeDocker: "DOCKER"}
)

Functions

func CheckRequiredFlags

func CheckRequiredFlags(flags *pflag.FlagSet) error

Types

type Appliance

type Appliance struct {
	Builtin          bool                `json:"builtin,omitempty" yaml:"builtin"`
	Category         string              `json:"category,omitempty" yaml:"category"`
	Description      string              `json:"description,omitempty" yaml:"description"`
	DocumentationUrl string              `json:"documentation_url,omitempty" yaml:"documentation_url"`
	Images           []*ApplianceImage   `json:"images,omitempty" yaml:"images"`
	Maintainer       string              `json:"maintainer,omitempty" yaml:"maintainer"`
	MaintaineEmail   string              `json:"maintainer_email,omitempty" yaml:"maintainer_email"`
	RegistryVersion  int                 `json:"registry_version,omitempty" yaml:"registry_version"`
	ProductName      string              `json:"product_name,omitempty" yaml:"product_name"`
	ProductUrl       string              `json:"product_url,omitempty" yaml:"product_url"`
	Name             string              `json:"name,omitempty" yaml:"name"`
	Symbol           string              `json:"symbol,omitempty" yaml:"symbol"`
	Status           string              `json:"status,omitempty" yaml:"status"`
	FirstPortName    string              `json:"first_port_name,omitempty" yaml:"first_port_name"`
	PortNameFormat   string              `json:"port_name_format,omitempty" yaml:"port_name_format"`
	Qemu             *ApplianceQemu      `json:"qemu,omitempty" yaml:"qemu"`
	Docker           *ApplianceDocker    `json:"docker,omitempty" yaml:"docker"`
	Iou              *ApplianceIou       `json:"iou,omitempty" yaml:"iou"`
	Dynamips         *ApplianceDynamips  `json:"dynamips,omitempty" yaml:"dynamips"`
	Usage            string              `json:"usage,omitempty" yaml:"usage"`
	VendorName       string              `json:"vendor_name,omitempty" yaml:"vendor_name"`
	VendorUrl        string              `json:"vendor_url,omitempty" yaml:"vendor_url"`
	Versions         []*ApplianceVersion `json:"versions,omitempty" yaml:"versions"`
}

type ApplianceDocker

type ApplianceDocker struct {
	Image             string   `json:"image,omitempty" yaml:"image,omitempty"`
	Usage             string   `json:"usage,omitempty" yaml:"usage,omitempty"`
	Adapters          int      `json:"adapters,omitempty" yaml:"adapters,omitempty"`
	StartCommand      string   `json:"start_command,omitempty" yaml:"start_command,omitempty"`
	Environment       string   `json:"environment,omitempty" yaml:"environment,omitempty"`
	ConsoleType       string   `json:"console_type,omitempty" yaml:"console_type,omitempty"`
	ConsoleAutoStart  bool     `json:"console_auto_start,omitempty" yaml:"console_auto_start,omitempty"`
	ConsoleHttpPort   int      `json:"console_http_port,omitempty" yaml:"console_http_port,omitempty"`
	ConsoleHttpPath   string   `json:"console_http_path,omitempty" yaml:"console_http_path,omitempty"`
	ConsoleResolution string   `json:"console_resolution,omitempty" yaml:"console_resolution,omitempty"`
	ExtraHosts        string   `json:"extra_hosts,omitempty" yaml:"extra_hosts,omitempty"`
	ExtraVolumes      []string `json:"extra_volumes,omitempty" yaml:"extra_volumes,omitempty"`
	CustomAdapters    []*struct {
		Schema               string   `json:"$schema,omitempty" yaml:"$schema,omitempty"`
		Description          string   `json:"description,omitempty" yaml:"description,omitempty"`
		Type                 any      `json:"type,omitempty" yaml:"type,omitempty"`
		Properties           any      `json:"properties,omitempty" yaml:"properties,omitempty"`
		Required             []string `json:"required,omitempty" yaml:"required,omitempty"`
		AdditionalProperties bool     `json:"additionalProperties,omitempty" yaml:"additionalProperties,omitempty"`
	} `json:"custom_adapters,omitempty" yaml:"custom_adapters,omitempty"`
}

type ApplianceDynamips

type ApplianceDynamips struct{}

type ApplianceImage

type ApplianceImage struct {
	DirectDownloadUrl string `json:"direct_download_url,omitempty" yaml:"direct_download_url"`
	DownloadUrl       string `json:"download_url,omitempty" yaml:"download_url"`
	Filename          string `json:"filename,omitempty" yaml:"filename"`
	FileSize          int64  `json:"filesize,omitempty" yaml:"filesize"`
	Md5Sum            string `json:"md5sum,omitempty" yaml:"md5sum"`
	Version           string `json:"version,omitempty" yaml:"version"`
}

type ApplianceIou

type ApplianceIou struct{}

type ApplianceQemu

type ApplianceQemu struct {
	AdapterType       string `json:"adapter_type,omitempty" yaml:"adapter_type"`
	Adapters          int    `json:"adapters,omitempty" yaml:"adapters"`
	Arch              string `json:"arch,omitempty" yaml:"arch"`
	BootPriority      string `json:"boot_priority,omitempty" yaml:"boot_priority"`
	ConsoleType       string `json:"console_type,omitempty" yaml:"console_type"`
	HdaDiskInterface  string `json:"hda_disk_interface,omitempty" yaml:"hda_disk_interface"`
	Kvm               string `json:"kvm,omitempty" yaml:"kvm"`
	KernelCommandLine string `json:"kernel_command_line,omitempty" yaml:"kernel_command_line"`
	Options           string `json:"options,omitempty" yaml:"options"`
	Ram               int64  `json:"ram,omitempty" yaml:"ram"`
}

type ApplianceVersion

type ApplianceVersion struct {
	Images struct {
		CdromImage   string `json:"cdrom_image,omitempty" yaml:"cdrom_image"`
		BiosImage    string `json:"bios_image,omitempty" yaml:"bios_image"`
		HdaDiskImage string `json:"hda_disk_image,omitempty" yaml:"hda_disk_image"`
	} `json:"images,omitempty" yaml:"images"`
	Name string `json:"name,omitempty" yaml:"name"`
}

type Appliances

type Appliances struct {
	// contains filtered or unexported fields
}

func (*Appliances) Get

func (a *Appliances) Get(id string) (*Appliance, error)

func (*Appliances) Import

func (a *Appliances) Import(file io.Reader, inputDirectory string) (*Appliance, *Template, error)

func (*Appliances) List

func (a *Appliances) List() ([]Appliance, error)

type Compute

type Compute struct {
	Capabilities       map[string]interface{} `json:"capabilities,omitempty" yaml:"capabilities"`
	ComputeId          string                 `json:"compute_id,omitempty" yaml:"compute_id"`
	Connected          bool                   `json:"connected,omitempty" yaml:"connected"`
	CpuUsagePercent    float64                `json:"cpu_usage_percent,omitempty" yaml:"cpu_usage_percent"`
	Host               string                 `json:"host,omitempty" yaml:"host"`
	LastError          string                 `json:"last_error,omitempty" yaml:"last_error"`
	MemoryUsagePercent float64                `json:"memory_usage_percent,omitempty" yaml:"memory_usage_percent"`
	Name               string                 `json:"name,omitempty" yaml:"name"`
	Port               int                    `json:"port,omitempty" yaml:"port"`
	Protocol           string                 `json:"protocol,omitempty" yaml:"protocol"`
	User               string                 `json:"user,omitempty" yaml:"user"`
}

type Computes

type Computes struct {
	// contains filtered or unexported fields
}

func (*Computes) Create

func (c *Computes) Create(compute *Compute) (*Compute, error)

func (*Computes) Delete

func (c *Computes) Delete(id string) (string, error)

func (*Computes) Get

func (c *Computes) Get(id string) (*Compute, error)

func (*Computes) List

func (c *Computes) List() ([]Compute, error)

type Gns3

type Gns3 struct {
}

func Connect

func Connect() *Gns3

func (*Gns3) Appliances

func (g *Gns3) Appliances() *Appliances

func (*Gns3) Computes

func (g *Gns3) Computes() *Computes

func (*Gns3) Delete

func (g *Gns3) Delete(path string) error

func (*Gns3) Get

func (g *Gns3) Get(path string, data interface{}) error
func (g *Gns3) Links(id string) *Links

func (*Gns3) Nodes

func (g *Gns3) Nodes(id string) *Nodes

func (*Gns3) Post

func (g *Gns3) Post(path string, contentType string, in interface{}, out interface{}) error

func (*Gns3) Projects

func (g *Gns3) Projects() *Projects

func (*Gns3) Put

func (g *Gns3) Put(path string, contentType string, in interface{}, out interface{}) error

func (*Gns3) Server

func (g *Gns3) Server() *Server

func (*Gns3) Templates

func (g *Gns3) Templates() *Templates

type HttpError

type HttpError struct {
	Message string `json:"message"`
	Status  int    `json:"status"`
}

func (*HttpError) Error

func (h *HttpError) Error() string
type Link struct {
	CaptureComputeId string                 `json:"capture_compute_id,omitempty" yaml:"capture_compute_id"`
	CaptureFileName  string                 `json:"capture_file_name,omitempty" yaml:"capture_file_name"`
	CaptureFilePath  string                 `json:"capture_file_path,omitempty" yaml:"capture_file_path"`
	Capturing        bool                   `json:"capturing,omitempty" yaml:"capturing"`
	Filters          map[string]interface{} `json:"filters,omitempty" yaml:"filters"`
	LinkId           string                 `json:"link_id,omitempty" yaml:"link_id"`
	LinkType         string                 `json:"link_type,omitempty" yaml:"link_type"`
	Nodes            []NodeRef              `json:"nodes,omitempty" yaml:"nodes"`
	ProjectId        string                 `json:"project_id,omitempty" yaml:"project_id"`
	Suspend          bool                   `json:"suspend,omitempty" yaml:"suspend"`
}

type LinkLabel

type LinkLabel struct {
	Style string `json:"style,omitempty" yaml:"style"`
	Text  string `json:"text,omitempty" yaml:"text"`
	X     int    `json:"x,omitempty" yaml:"x"`
	Y     int    `json:"y,omitempty" yaml:"y"`
}
type Links struct {
	// contains filtered or unexported fields
}

func (*Links) Create

func (l *Links) Create(link *Link) (*Link, error)

func (*Links) Delete

func (l *Links) Delete(id string) (string, error)

func (*Links) Get

func (l *Links) Get(id string) (*Link, error)

func (*Links) List

func (l *Links) List() ([]*Link, error)

func (*Links) Resume

func (l *Links) Resume(id string) (string, error)

func (*Links) Suspend

func (l *Links) Suspend(id string) (string, error)

type Network

type Network struct {
	ApiVersion string `json:"apiVersion" yaml:"apiVersion"`
	Kind       string `json:"kind" yaml:"kind"`
	Metadata   struct {
		Name string `json:"name" yaml:"name"`
	} `json:"metadata" yaml:"metadata"`
	Spec struct {
		Appliances []string `json:"appliances,omitempty" yaml:"appliances,omitempty"`
		Nodes      []struct {
			Name      string `json:"name,omitempty" yaml:"name"`
			Type      string `json:"type,omitempty" yaml:"type,omitempty"`
			Template  string `json:"template,omitempty" yaml:"template,omitempty"`
			ComputeId string `json:"compute_id,omitempty" yaml:"compute_id"`
			X         int    `json:"x,omitempty" yaml:"x"`
			Y         int    `json:"y,omitempty" yaml:"y"`
			Z         int    `json:"z,omitempty" yaml:"z"`
			Config    *struct {
				Name    string `json:"name,omitempty" yaml:"name"`
				Address string `json:"address,omitempty" yaml:"address"`
				Netmask string `json:"netmask,omitempty" yaml:"netmask"`
				Gateway string `json:"gateway,omitempty" yaml:"gateway"`
			} `json:"config,omitempty" yaml:"config"`
		} `json:"nodes" yaml:"nodes"`
		Links []struct {
			AEnd struct {
				Name    string `json:"name,omitempty" yaml:"name"`
				Adapter int    `json:"adapter,omitempty" yaml:"adapter"`
				Port    int    `json:"port,omitempty" yaml:"port"`
			} `json:"aEnd,omitempty" yaml:"aEnd"`
			ZEnd struct {
				Name    string `json:"name,omitempty" yaml:"name"`
				Adapter int    `json:"adapter,omitempty" yaml:"adapter"`
				Port    int    `json:"port,omitempty" yaml:"port"`
			} `json:"zEnd,omitempty" yaml:"zEnd"`
		} `json:"links" yaml:"links"`
	} `json:"spec" yaml:"spec"`
}

type Node

type Node struct {
	CommandLine      string                   `json:"command_line,omitempty" yaml:"command_line,omitempty"`
	ComputeId        string                   `json:"compute_id,omitempty" yaml:"compute_id,omitempty"`
	Console          int                      `json:"console,omitempty" yaml:"console,omitempty"`
	ConsoleAutoStart bool                     `json:"console_auto_start,omitempty" yaml:"console_auto_start,omitempty"`
	ConsoleHost      string                   `json:"console_host,omitempty" yaml:"console_host,omitempty"`
	ConsoleType      string                   `json:"console_type,omitempty" yaml:"console_type,omitempty"`
	CustomAdapters   []map[string]interface{} `json:"custom_adapters,omitempty" yaml:"custom_adapters,omitempty"`
	FirstPortName    string                   `json:"first_port_name,omitempty" yaml:"first_port_name,omitempty"`
	Height           int                      `json:"height,omitempty" yaml:"height,omitempty"`
	Label            map[string]interface{}   `json:"label,omitempty" yaml:"label,omitempty"`
	Locked           bool                     `json:"locked,omitempty" yaml:"locked,omitempty"`
	Name             string                   `json:"name,omitempty" yaml:"name,omitempty"`
	NodeDirectory    string                   `json:"node_directory,omitempty" yaml:"node_directory,omitempty"`
	NodeId           string                   `json:"node_id,omitempty" yaml:"node_id,omitempty"`
	NodeType         string                   `json:"node_type,omitempty" yaml:"node_type,omitempty"`
	PortNameFormat   string                   `json:"port_name_format,omitempty" yaml:"port_name_format,omitempty"`
	PortSegmentSize  int                      `json:"port_segment_size,omitempty" yaml:"port_segment_size,omitempty"`
	Ports            []*Port                  `json:"ports,omitempty" yaml:"ports,omitempty"`
	ProjectId        string                   `json:"project_id,omitempty" yaml:"project_id,omitempty"`
	Properties       map[string]interface{}   `json:"properties,omitempty" yaml:"properties,omitempty"`
	Status           string                   `json:"status,omitempty" yaml:"status,omitempty"`
	Symbol           string                   `json:"symbol,omitempty" yaml:"symbol,omitempty"`
	TemplateId       string                   `json:"template_id,omitempty" yaml:"template_id,omitempty"`
	Width            int                      `json:"width,omitempty" yaml:"width,omitempty"`
	X                int                      `json:"x,omitempty" yaml:"x,omitempty"`
	Y                int                      `json:"y,omitempty" yaml:"y,omitempty"`
	Z                int                      `json:"z,omitempty" yaml:"z,omitempty"`
}

type NodeRef

type NodeRef struct {
	AdapterNumber int        `json:"adapter_number" yaml:"adapter_number"`
	Label         *LinkLabel `json:"label,omitempty" yaml:"label,omitempty"`
	NodeId        string     `json:"node_id,omitempty" yaml:"node_id"`
	PortNumber    int        `json:"port_number" yaml:"port_number"`
}

type Nodes

type Nodes struct {
	// contains filtered or unexported fields
}

func (*Nodes) Create

func (n *Nodes) Create(node *Node) (*Node, error)

func (*Nodes) CreateUsingTemplate

func (n *Nodes) CreateUsingTemplate(node *Node, template *Template) (*Node, error)

func (*Nodes) Get

func (n *Nodes) Get(id string) (*Node, error)

func (*Nodes) List

func (n *Nodes) List() ([]*Node, error)

func (*Nodes) Start

func (n *Nodes) Start(id string) error

func (*Nodes) Stop

func (n *Nodes) Stop(id string) error

type Port

type Port struct {
	AdapterNumber int                    `json:"adapter_number,omitempty" yaml:"adapter_number,omitempty"`
	DataLinkTypes map[string]interface{} `json:"data_link_types,omitempty" yaml:"data_link_types,omitempty"`
	LinkType      string                 `json:"link_type,omitempty" yaml:"link_type,omitempty"`
	Name          string                 `json:"name,omitempty" yaml:"name,omitempty"`
	PortNumber    int                    `json:"port_number,omitempty" yaml:"port_number,omitempty"`
	ShortName     string                 `json:"short_name,omitempty" yaml:"short_name,omitempty"`
	MacAddress    string                 `json:"mac_address,omitempty" yaml:"mac_address,omitempty"`
	IpAddress     string                 `json:"ip_address,omitempty" yaml:"ip_address,omitempty"`
}

type Project

type Project struct {
	AutoClose           bool   `json:"auto_close,omitempty"`
	AutoOpen            bool   `json:"auto_open,omitempty"`
	AutoStart           bool   `json:"auto_start,omitempty"`
	DrawingGridSize     int    `json:"drawing_grid_size,omitempty"`
	Filename            string `json:"filename,omitempty"`
	GridSize            int    `json:"grid_size,omitempty"`
	Name                string `json:"name,omitempty"`
	Path                string `json:"path,omitempty"`
	ProjectId           string `json:"project_id,omitempty"`
	SceneHeight         int    `json:"scene_height,omitempty"`
	SceneWidth          int    `json:"scene_width,omitempty"`
	ShowGrid            bool   `json:"show_grid,omitempty"`
	ShowInterfaceLabels bool   `json:"show_interface_labels,omitempty"`
	ShowLayers          bool   `json:"show_layers,omitempty"`
	SnapToGrid          bool   `json:"snap_to_grid,omitempty"`
	Status              string `json:"status,omitempty"`
	Zoom                int    `json:"zoom,omitempty"`
}

type Projects

type Projects struct {
	// contains filtered or unexported fields
}

func (*Projects) Close

func (p *Projects) Close(id string) (string, error)

func (*Projects) Create

func (p *Projects) Create(project *Project) (*Project, error)

func (*Projects) Delete

func (p *Projects) Delete(id string) (string, error)

func (*Projects) Get

func (p *Projects) Get(id string) (*Project, error)

func (*Projects) List

func (p *Projects) List() ([]Project, error)

func (*Projects) Open

func (p *Projects) Open(id string) error

type Server

type Server struct {
	// contains filtered or unexported fields
}

func (*Server) Shutdown

func (s *Server) Shutdown() error

func (*Server) Start

func (s *Server) Start(configFile string) (*process.Process, bool, error)

func (*Server) Version

func (s *Server) Version() (*ServerVersion, error)

type ServerVersion

type ServerVersion struct {
	Local   bool   `json:"local,omitempty" yaml:"local"`
	Version string `json:"version,omitempty" yaml:"version"`
}

type Template

type Template struct {
	Builtin           bool            `json:"builtin,omitempty" yaml:"builtin"`
	Category          string          `json:"category,omitempty" yaml:"category"`
	ComputeId         string          `json:"compute_id,omitempty" yaml:"compute_id"`
	DefaultNameFormat string          `json:"default_name_format,omitempty" yaml:"default_name_format"`
	FirstPortName     string          `json:"first_port_name,omitempty" yaml:"first_port_name"`
	Name              string          `json:"name,omitempty" yaml:"name"`
	Symbol            string          `json:"symbol,omitempty" yaml:"symbol"`
	TemplateId        string          `json:"template_id,omitempty" yaml:"template_id"`
	TemplateType      string          `json:"template_type,omitempty" yaml:"template_type"`
	Usage             string          `json:"usage,omitempty" yaml:"usage"`
	Qemu              *TemplateQemu   `json:"-" yaml:"qemu"`
	Docker            *TemplateDocker `json:"-" yaml:"docker"`
}

func (Template) MarshalJSON

func (t Template) MarshalJSON() ([]byte, error)

func (*Template) UnmarshalJSON

func (t *Template) UnmarshalJSON(data []byte) error

type TemplateDocker

type TemplateDocker struct {
	Image             string   `json:"image,omitempty" yaml:"image,omitempty"`
	Usage             string   `json:"usage,omitempty" yaml:"usage,omitempty"`
	Adapters          int      `json:"adapters,omitempty" yaml:"adapters,omitempty"`
	StartCommand      string   `json:"start_command,omitempty" yaml:"start_command,omitempty"`
	Environment       string   `json:"environment,omitempty" yaml:"environment,omitempty"`
	ConsoleType       string   `json:"console_type,omitempty" yaml:"console_type,omitempty"`
	ConsoleAutoStart  bool     `json:"console_auto_start,omitempty" yaml:"console_auto_start,omitempty"`
	ConsoleHttpPort   int      `json:"console_http_port,omitempty" yaml:"console_http_port,omitempty"`
	ConsoleHttpPath   string   `json:"console_http_path,omitempty" yaml:"console_http_path,omitempty"`
	ConsoleResolution string   `json:"console_resolution,omitempty" yaml:"console_resolution,omitempty"`
	ExtraHosts        string   `json:"extra_hosts,omitempty" yaml:"extra_hosts,omitempty"`
	ExtraVolumes      []string `json:"extra_volumes,omitempty" yaml:"extra_volumes,omitempty"`
	CustomAdapters    []*struct {
		Schema               string   `json:"$schema,omitempty" yaml:"$schema,omitempty"`
		Description          string   `json:"description,omitempty" yaml:"description,omitempty"`
		Type                 any      `json:"type,omitempty" yaml:"type,omitempty"`
		Properties           any      `json:"properties,omitempty" yaml:"properties,omitempty"`
		Required             []string `json:"required,omitempty" yaml:"required,omitempty"`
		AdditionalProperties bool     `json:"additionalProperties,omitempty" yaml:"additionalProperties,omitempty"`
	} `json:"custom_adapters,omitempty" yaml:"custom_adapters,omitempty"`
}

type TemplateQemu

type TemplateQemu struct {
	Options           string `json:"options,omitempty" yaml:"options"`
	KernelCommandLine string `json:"kernel_command_line,omitempty" yaml:"kernel_command_line"`
	AdapterType       string `json:"adapter_type,omitempty" yaml:"adapter_type"`
	Adapters          int    `json:"adapters,omitempty" yaml:"adapters"`
	BootPriority      string `json:"boot_priority,omitempty" yaml:"boot_priority"`
	ConsoleType       string `json:"console_type,omitempty" yaml:"console_type"`
	HdaDiskInterface  string `json:"hda_disk_interface,omitempty" yaml:"hda_disk_interface"`
	Ram               int64  `json:"ram,omitempty" yaml:"ram"`
	Path              string `json:"qemu_path,omitempty" yaml:"qemu_path"`
	PortNameFormat    string `json:"port_name_format,omitempty" yaml:"port_name_format"`
	BiosImage         string `json:"bios_image,omitempty" yaml:"bios_image"`
	HdaDiskImage      string `json:"hda_disk_image,omitempty" yaml:"hda_disk_image"`
	CdromImage        string `json:"cdrom_image,omitempty" yaml:"cdrom_image"`
}

type Templates

type Templates struct {
	// contains filtered or unexported fields
}

func (*Templates) Close

func (t *Templates) Close(id string) (string, error)

func (*Templates) Create

func (t *Templates) Create(template *Template) (*Template, error)

func (*Templates) Delete

func (t *Templates) Delete(id string) (string, error)

func (*Templates) Get

func (t *Templates) Get(id string) (*Template, error)

func (*Templates) List

func (t *Templates) List() ([]Template, error)

Jump to

Keyboard shortcuts

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