Documentation ¶
Index ¶
- type Alert
- type Broker
- type BrokerConfig
- type BrokerGuest
- type BrokerPool
- type ChangeFeed
- type ChangeFeedMessage
- type Client
- func (client *Client) AssignGuest(poolID, username, realm, guest string) (interface{}, error)
- func (client *Client) BrokerAssign(poolID string) (BrokerGuest, error)
- func (client *Client) BrokerAssignments() ([]BrokerPool, error)
- func (client *Client) BrokerConnect(guest string, outputType string, connection string) ([]byte, error)
- func (client *Client) BrokerLogin(username, password, realm, token, mfaToken string) error
- func (client *Client) CheckHostVersion(minimumVersion string) error
- func (client *Client) ClusterID() (string, error)
- func (client *Client) CopyFile(srcStorageID, srcFilePath, destStorageID, destFilePath string) (*Task, error)
- func (client *Client) GetAlert(id string) (Alert, error)
- func (client *Client) GetBroker(clusterID string) (Broker, error)
- func (client *Client) GetBrokerConfig() (BrokerConfig, error)
- func (client *Client) GetChangeFeed(table string, filter map[string]string, includeInitial bool) (*ChangeFeed, error)
- func (client *Client) GetChangeFeedWithContext(ctx context.Context, table string, filter map[string]string, ...) (*ChangeFeed, error)
- func (client *Client) GetCluster(id string) (Cluster, error)
- func (client *Client) GetGateway(clusterID string) (Gateway, error)
- func (client *Client) GetGuest(name string) (*Guest, error)
- func (client *Client) GetHost(hostid string) (Host, error)
- func (client *Client) GetHostByIP(ip string) (*Host, error)
- func (client *Client) GetHostByName(name string) (*Host, error)
- func (client *Client) GetPool(id string) (*Pool, error)
- func (client *Client) GetPoolByName(name string) (*Pool, error)
- func (client *Client) GetProfile(id string) (*Profile, error)
- func (client *Client) GetProfileByName(name string) (*Profile, error)
- func (client *Client) GetRealm(name string) (Realm, error)
- func (client *Client) GetStoragePool(id string) (*StoragePool, error)
- func (client *Client) GetStoragePoolByName(name string) (*StoragePool, error)
- func (client *Client) GetTask(id string) (*Task, error)
- func (client *Client) GetTaskByName(name string) (*Task, error)
- func (client *Client) GetTemplate(name string) (Template, error)
- func (client *Client) GetUser(id string) (*User, error)
- func (client *Client) GetUserByGroupName(name string) (*User, error)
- func (client *Client) GetUserByName(name string) (*User, error)
- func (client *Client) HostID() (string, error)
- func (client *Client) HostVersion() (Version, error)
- func (client *Client) JoinHost(username, password, ipAddress string) (*Task, error)
- func (client *Client) ListAlerts(query string) ([]Alert, error)
- func (client *Client) ListClusters(query string) ([]Cluster, error)
- func (client *Client) ListGuestPools(query string) ([]Pool, error)
- func (client *Client) ListGuests(query string) ([]Guest, error)
- func (client *Client) ListHosts(query string) ([]Host, error)
- func (client *Client) ListProfiles(query string) ([]Profile, error)
- func (client *Client) ListRealms(query string) ([]Realm, error)
- func (client *Client) ListStoragePools(query string) ([]StoragePool, error)
- func (client *Client) ListTasks(query string) ([]Task, error)
- func (client *Client) ListTemplates(query string) ([]Template, error)
- func (client *Client) ListUsers(query string) ([]User, error)
- func (client *Client) Login(username, password, realm string) error
- func (client *Client) MetricsExport(metric string, entity string, resolution uint, output string) ([]byte, error)
- func (client *Client) MetricsLatest(metric string, entity string, resolution uint) ([]byte, error)
- func (client *Client) MoveFile(srcStorageID, srcFilePath, destStorageID, destFilePath string) (*Task, error)
- func (client *Client) ReleaseGuest(poolID, username, guest string) error
- func (client *Client) ResetBroker(clusterID string) error
- func (client *Client) SetBroker(clusterID string, brokerSettings Broker) error
- func (client *Client) SetGateway(clusterID string, gatewaySettings Gateway) error
- func (client *Client) SetToken(token string)
- type Cluster
- func (cluster Cluster) ClearEmailAlerts(client *Client) error
- func (cluster *Cluster) DisableBackup(client *Client) error
- func (cluster *Cluster) DisableSharedStorage(client *Client) (*Task, error)
- func (cluster *Cluster) EnableBackup(client *Client, startWindow string, endWindow string) error
- func (cluster *Cluster) EnableSharedStorage(client *Client, storageUtilization int, minSetSize int) (*Task, error)
- func (cluster *Cluster) GetLicenseInfo(client *Client) (string, string, error)
- func (cluster Cluster) SendTestEmail(client *Client) error
- func (cluster Cluster) SetEmailAlerts(client *Client, emailAlerts EmailAlerts) error
- func (cluster *Cluster) SetLicense(client *Client, key string) error
- func (cluster Cluster) String() string
- func (cluster Cluster) UpdateSoftware(client *Client, packageName string) (*Task, error)
- type ClusterBackup
- type DiskInfo
- type EmailAlerts
- type ExternalGuest
- type Gateway
- type GatewayHost
- type Guest
- func (guest *Guest) Delete(client *Client) error
- func (guest *Guest) ListBackups(client *Client, storageId string) ([]string, error)
- func (guest *Guest) Migrate(client *Client, destinationHostid string) error
- func (guest *Guest) Poweroff(client *Client) error
- func (guest *Guest) Poweron(client *Client) error
- func (guest *Guest) Reboot(client *Client) error
- func (guest *Guest) Refresh(client *Client) error
- func (guest *Guest) Reset(client *Client) error
- func (guest *Guest) ResetRecord(client *Client) error
- func (guest *Guest) Restore(client *Client, storageId, backup string) (*Task, error)
- func (guest *Guest) Shutdown(client *Client) error
- func (guest *Guest) StartBackup(client *Client, storageId string) (*Task, error)
- func (guest Guest) String() string
- func (guest *Guest) Update(client *Client) (string, error)
- func (guest Guest) WaitForGuest(client *Client, timeout time.Duration) error
- func (guest Guest) WaitForGuestWithContext(ctx context.Context, client *Client, timeout time.Duration) error
- type GuestAgentMetadata
- type GuestBackup
- type GuestBrokerConnection
- type GuestBrokerOptions
- type GuestDisk
- type GuestError
- type GuestMigrationMetadata
- type GuestNetwork
- type GuestSessionInfo
- type GuestSnapshot
- type Host
- func (host *Host) ChangeGatewayMode(client *Client, enable bool) error
- func (host *Host) Delete(client *Client) error
- func (host Host) DeleteNetwork(client *Client, name string) error
- func (host *Host) DeleteSoftware(client *Client, pkg string) error
- func (host *Host) DisableCRS(client *Client) error
- func (host *Host) EnableCRS(client *Client) error
- func (host Host) GetNetwork(client *Client, name string) (HostNetwork, error)
- func (host *Host) GetState(client *Client) (string, error)
- func (host Host) ListInterfaces(client *Client) ([]HostNetworkInterface, error)
- func (host Host) ListNetworks(client *Client) ([]string, error)
- func (host *Host) ListSoftware(client *Client) (HostPackageInfo, error)
- func (host *Host) Reboot(client *Client) error
- func (host Host) ResetInterfaceSettings(client *Client, nic string) error
- func (host *Host) RestartNetworking(client *Client) error
- func (host *Host) RestartServices(client *Client) error
- func (host Host) SetNetwork(client *Client, net HostNetwork) error
- func (host *Host) SetState(client *Client, state string) (*Task, error)
- func (host *Host) Shutdown(client *Client) error
- func (host Host) String() string
- func (host *Host) UnjoinCluster(client *Client) (*Task, error)
- func (host *Host) UpdateAppliance(client *Client) (string, error)
- func (host Host) UpdateInterfaceSettings(client *Client, nic string, settings HostNetworkInterfaceSettings) error
- func (host *Host) UploadSoftware(client *Client, filename string) error
- type HostDevice
- type HostNetwork
- type HostNetworkInterface
- type HostNetworkInterfaceSettings
- type HostPackageInfo
- type Pool
- func (pool *Pool) Assign(client *Client, realm, username, group string) error
- func (pool *Pool) Create(client *Client) (string, error)
- func (pool *Pool) Delete(client *Client) error
- func (pool *Pool) DeleteAssignment(client *Client) error
- func (pool *Pool) Merge(client *Client) error
- func (pool *Pool) Refresh(client *Client) error
- func (pool *Pool) Snapshot(client *Client) error
- func (pool Pool) String() string
- func (pool *Pool) Update(client *Client) (string, error)
- func (pool Pool) WaitForPool(client *Client, targetState string, timeout time.Duration) error
- func (pool Pool) WaitForPoolWithContext(ctx context.Context, client *Client, targetState string, timeout time.Duration) error
- type PoolAffinity
- type PoolAssignment
- type PoolAssignmentAutoClear
- type PoolBackup
- type PoolCloudInit
- type PoolDisk
- type PoolGuestProfile
- type PoolHostDevice
- type PoolInterface
- type Profile
- type ProfileADConfig
- type ProfileBackup
- type ProfileBrokerOptions
- type ProfileUserVolumes
- type Realm
- type RealmServiceAccount
- type StateChronology
- type StoragePool
- func (pool *StoragePool) Browse(client *Client, filePath string, recursive bool) ([]StoragePoolFileInfo, error)
- func (pool *StoragePool) ConvertDisk(client *Client, srcFilename, dstStorageID, dstFilename, dstFormat string) (*Task, error)
- func (pool *StoragePool) CopyURL(client *Client, url, filePath string) (*Task, error)
- func (pool *StoragePool) Create(client *Client) (string, error)
- func (pool *StoragePool) CreateDisk(client *Client, filename, format string, size uint) (*Task, error)
- func (pool *StoragePool) Delete(client *Client) error
- func (pool *StoragePool) DeleteFile(client *Client, filename string) error
- func (pool *StoragePool) DiskInfo(client *Client, filePath string) (DiskInfo, error)
- func (pool *StoragePool) Download(client *Client, filePath string) (*http.Response, error)
- func (pool *StoragePool) DownloadWithContext(ctx context.Context, client *Client, filePath string) (*http.Response, error)
- func (pool *StoragePool) GrowDisk(client *Client, filePath string, size uint) (*Task, error)
- func (pool *StoragePool) Start(client *Client) error
- func (pool *StoragePool) Stop(client *Client) error
- func (pool StoragePool) String() string
- func (pool *StoragePool) Upload(client *Client, filename, targetFilename string) error
- type StoragePoolFileInfo
- type Task
- func (task *Task) ForceComplete(client *Client) error
- func (task Task) String() string
- func (task Task) WaitForTask(client *Client, printProgress bool) (*Task, error)
- func (task Task) WaitForTaskWithContext(ctx context.Context, client *Client, printProgress bool) (*Task, error)
- func (task Task) WatchTask(client *Client, taskData chan Task, errorChannel chan error)
- func (task Task) WatchTaskWithContext(ctx context.Context, client *Client, taskData chan Task, ...)
- type Template
- func (template *Template) Analyze(client *Client) error
- func (template *Template) Author(client *Client) error
- func (template *Template) Create(client *Client) (string, error)
- func (template *Template) Delete(client *Client) error
- func (template *Template) Duplicate(client *Client, dstName, dstStorage, dstFilename string) (*Task, error)
- func (template *Template) Load(client *Client, storage string) error
- func (template Template) String() string
- func (template *Template) Unload(client *Client) error
- func (template *Template) Update(client *Client) (string, error)
- type TemplateDisk
- type TemplateInterface
- type User
- type UserPreferences
- type UserSession
- type UserVolume
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alert ¶
type Alert struct { Acknowledged bool `json:"acknowledged"` Class string `json:"class"` Count int `json:"count"` ID string `json:"id"` Level string `json:"level"` Message string `json:"message"` Ref struct { Cluster string `json:"cluster"` Host string `json:"host"` } `json:"ref"` Tags []string `json:"tags"` Timestamp interface{} `json:"timestamp"` Type string `json:"type"` }
Alert structure for alerts
func (*Alert) Acknowledge ¶
Acknowledge marks an alert as acknowledged
type Broker ¶
type Broker struct { AutoConnectUserDesktop bool `json:"autoConnectUserDesktop,omitempty"` BackgroundColor string `json:"backgroundColor,omitempty"` BgImage string `json:"bgImage,omitempty"` BgImageFilename string `json:"bgImageFilename,omitempty"` ButtonTextColor string `json:"buttonTextColor,omitempty"` Disclaimer string `json:"disclaimer,omitempty"` Enabled bool `json:"enabled"` External bool `json:"external"` ExternalProfile string `json:"externalProfile,omitempty"` Favicon string `json:"favicon,omitempty"` FaviconFilename string `json:"faviconFilename,omitempty"` HideRealms bool `json:"hideRealms,omitempty"` HideRelease bool `json:"hideRelease,omitempty"` Logo string `json:"logo,omitempty"` LogoFilename string `json:"logoFilename,omitempty"` MainColor string `json:"mainColor,omitempty"` PassthroughAuthentication bool `json:"passthroughAuthentication,omitempty"` TextColor string `json:"textColor,omitempty"` Title string `json:"title,omitempty"` TwoFormAuth interface{} `json:"twoFormAuth,omitempty"` AllowPhysical bool `json:"allowPhysical,omitempty"` }
Broker settings from the cluster table
type BrokerConfig ¶
type BrokerConfig struct { AutoConnectUserDesktop bool `json:"autoConnectUserDesktop"` BackgroundColor string `json:"backgroundColor"` BgImage string `json:"bgImage"` BgImageFilename string `json:"bgImageFilename"` ButtonTextColor string `json:"buttonTextColor"` ClientSourceIsolation bool `json:"clientSourceIsolation"` Disclaimer string `json:"disclaimer"` Enabled bool `json:"enabled"` External bool `json:"external"` ExternalProfile string `json:"externalProfile"` Favicon string `json:"favicon"` FaviconFilename string `json:"faviconFilename"` HideRealms bool `json:"hideRealms"` HideRelease bool `json:"hideRelease"` Logo string `json:"logo"` LogoFilename string `json:"logoFilename"` MainColor string `json:"mainColor"` PassthroughAuthentication bool `json:"passthroughAuthentication"` TextColor string `json:"textColor"` Title string `json:"title"` TwoFormAuth struct { Enabled bool `json:"enabled"` EnforceLocal bool `json:"enforceLocal"` Type string `json:"type"` } `json:"twoFormAuth"` Remote bool `json:"remote"` }
type BrokerGuest ¶
type BrokerGuest struct { Name string `json:"name"` UUID string `json:"uuid"` HostID string `json:"hostid"` GuestState string `json:"guestState"` Username string `json:"username"` PoolID string `json:"poolID"` IP string `json:"ip"` Connections []GuestBrokerConnection `json:"connections"` UserVolume *UserVolume `json:"userVolume,omitempty"` }
BrokerGuest describes a guest assignment
type BrokerPool ¶
type BrokerPool struct { ID string `json:"id"` Name string `json:"name"` Os string `json:"os"` UserGroup string `json:"userGroup"` Guests []BrokerGuest `json:"guests"` }
BrokerPool describes a pool received from BrokerLogin
type ChangeFeed ¶
type ChangeFeed struct { Data chan ChangeFeedMessage Done chan struct{} // contains filtered or unexported fields }
ChangeFeed wrapper around a websocket to monitor database changes
func (*ChangeFeed) Close ¶
func (feed *ChangeFeed) Close() error
Close disconnects the changefeed websocket
type ChangeFeedMessage ¶
type ChangeFeedMessage struct { OldValue json.RawMessage `json:"old_val"` NewValue json.RawMessage `json:"new_val"` Error error }
ChangeFeedMessage contains a change from the database
type Client ¶
type Client struct { Host string Port uint AllowInsecure bool UserAgent string // contains filtered or unexported fields }
Client is a wrapper around the hiveio rest api
func (*Client) AssignGuest ¶
AssignGuest assign a user to a specific guest
func (*Client) BrokerAssign ¶
func (client *Client) BrokerAssign(poolID string) (BrokerGuest, error)
BrokerAssign requests a desktop from a pool
func (*Client) BrokerAssignments ¶
func (client *Client) BrokerAssignments() ([]BrokerPool, error)
BrokerAssignments returns an array of assignments for the logged in user
func (*Client) BrokerConnect ¶
func (client *Client) BrokerConnect(guest string, outputType string, connection string) ([]byte, error)
BrokerConnect request the rdp file to connect to a guest. outputType can be rdp, json, or hio
func (*Client) BrokerLogin ¶
BrokerLogin connects to the broker with the provided username, password, and realm returns nil or an error
func (*Client) CheckHostVersion ¶
CheckHostVersion returns an error if minimumVersion is greater than the host software version
func (*Client) CopyFile ¶
func (client *Client) CopyFile(srcStorageID, srcFilePath, destStorageID, destFilePath string) (*Task, error)
CopyFile copies a file in a storage pool to a new file in another storage pool
func (*Client) GetBrokerConfig ¶
func (client *Client) GetBrokerConfig() (BrokerConfig, error)
GetBrokerConfig returns the configuration options of the broker
func (*Client) GetChangeFeed ¶
func (client *Client) GetChangeFeed(table string, filter map[string]string, includeInitial bool) (*ChangeFeed, error)
GetChangeFeed returns a ChangeFeed for monitoring the specified table filter can be used to limit the changes monitored. example to monitor a single task: client.GetChangeFeed("task", map[string]string{"id": task.ID})
func (*Client) GetChangeFeedWithContext ¶
func (client *Client) GetChangeFeedWithContext(ctx context.Context, table string, filter map[string]string, includeInitial bool) (*ChangeFeed, error)
GetChangeFeedWithContext returns a ChangeFeed for monitoring the specified table with a custom context filter can be used to limit the changes monitored. example to monitor a single task: client.GetChangeFeed("task", map[string]string{"id": task.ID})
func (*Client) GetCluster ¶
GetCluster request a cluster by id
func (*Client) GetGateway ¶
GetGateway returns the gateway settings for the cluster
func (*Client) GetHostByIP ¶
GetHostByIP requests a host by hostname
func (*Client) GetHostByName ¶
GetHostByName requests a host by hostname
func (*Client) GetPoolByName ¶
GetPoolByName request a task by name
func (*Client) GetProfile ¶
GetProfile requests a profile by id
func (*Client) GetProfileByName ¶
GetProfileByName requests a profile by name
func (*Client) GetStoragePool ¶
func (client *Client) GetStoragePool(id string) (*StoragePool, error)
GetStoragePool requests a storage pool by id
func (*Client) GetStoragePoolByName ¶
func (client *Client) GetStoragePoolByName(name string) (*StoragePool, error)
GetStoragePoolByName requests a storage pool by name
func (*Client) GetTaskByName ¶
GetTaskByName request a task by name
func (*Client) GetTemplate ¶
GetTemplate request a template by name
func (*Client) GetUserByGroupName ¶
GetUserByGroupName request a user by groupname
func (*Client) GetUserByName ¶
GetUserByName request a user by name
func (*Client) HostVersion ¶
HostVersion returns the software version of the host the client is connected to
func (*Client) ListAlerts ¶
ListAlerts lists all alerts with an optional filter string
func (*Client) ListClusters ¶
ListClusters request a list of all clusters
func (*Client) ListGuestPools ¶
ListGuestPools returns an array of all guest pools with an optional filter string
func (*Client) ListGuests ¶
ListGuests returns an array of all guests with an optional filter string
func (*Client) ListProfiles ¶
ListProfiles returns an array of all profiles with an optional filter string
func (*Client) ListRealms ¶
ListRealms returns an array of all realms with an optional filter string
func (*Client) ListStoragePools ¶
func (client *Client) ListStoragePools(query string) ([]StoragePool, error)
ListStoragePools returns an array of storage pools with an optional filter string
func (*Client) ListTemplates ¶
ListTemplates returns an array of templates with an optional filter string
func (*Client) Login ¶
Login attempts to connect to the server specified in Client with the provided username, password, and realm
func (*Client) MetricsExport ¶
func (client *Client) MetricsExport(metric string, entity string, resolution uint, output string) ([]byte, error)
MetricsExport export metrics as json or csv output can be json or csv
func (*Client) MetricsLatest ¶
MetricsLatest gets the latest metric for entity. metric can be host, guest, storage, pool, and cluster resolution can be 20, 900, 3600, or 21600
func (*Client) MoveFile ¶
func (client *Client) MoveFile(srcStorageID, srcFilePath, destStorageID, destFilePath string) (*Task, error)
MoveFile moves or renames a file in a storage pool
func (*Client) ReleaseGuest ¶
ReleaseGuest release a guest that is currently assigned
func (*Client) ResetBroker ¶
ResetBroker updates broker settings for the cluster
func (*Client) SetGateway ¶
SetGateway updates gateway settings for the cluster
type Cluster ¶
type Cluster struct { AdminPassword string `json:"adminPassword"` Broker *Broker `json:"broker"` Gateway *Gateway `json:"gateway"` HiveSense struct { AwsAccessKeyID string `json:"awsAccessKeyId,omitempty"` AwsSecretAccessKey string `json:"awsSecretAccessKey,omitempty"` CustomerName string `json:"customerName,omitempty"` Enabled bool `json:"enabled"` LogStatus string `json:"logStatus,omitempty"` UploadFrequency int `json:"uploadFrequency,omitempty"` } `json:"hiveSense"` ID string `json:"id"` License *struct { Expiration time.Time `json:"expiration"` Type string `json:"type"` MaxGuests int `json:"maxGuests,omitempty"` } `json:"license"` Name string `json:"name"` Enabled bool `json:"enabled"` Hosts []struct { Hostid string `json:"hostid"` State string `json:"state"` } `json:"hosts"` ID string `json:"id"` MinSetSize int `json:"minSetSize"` State string `json:"state"` StorageUtilization int `json:"storageUtilization"` } `json:"sharedStorage"` Backup *ClusterBackup `json:"backup,omitempty"` Tags []string `json:"tags"` EmailAlerts EmailAlerts `json:"emailAlerts,omitempty"` }
Cluster record from the rest api
func (Cluster) ClearEmailAlerts ¶
ClearEmailAlerts updates email alert settings
func (*Cluster) DisableBackup ¶
DisableBackup disable automatic data protection
func (*Cluster) DisableSharedStorage ¶
DisableSharedStorage disables shared storage on the cluster
func (*Cluster) EnableBackup ¶
EnableBackup enable automatic data protection startWindow and endWindow must be strings in the format "01:00:00"
func (*Cluster) EnableSharedStorage ¶
func (cluster *Cluster) EnableSharedStorage(client *Client, storageUtilization int, minSetSize int) (*Task, error)
EnableSharedStorage enable shared storage on a cluster storageUtilization is a percentage for the amount of storage to be allocated for shared storage minSetSize is the number of host to grow the storage by (2 or 3)
func (*Cluster) GetLicenseInfo ¶
GetLicenseInfo Lookup license information for the current cluster
func (Cluster) SendTestEmail ¶
SendTestEmail sends an email to test the email alert settings
func (Cluster) SetEmailAlerts ¶
func (cluster Cluster) SetEmailAlerts(client *Client, emailAlerts EmailAlerts) error
EmailAlerts updates email alert settings
func (*Cluster) SetLicense ¶
SetLicense replaces the license for the cluster
type ClusterBackup ¶
type ClusterBackup struct { Enabled bool `json:"enabled"` StartWindow string `json:"startWindow"` EndWindow string `json:"endWindow"` }
ClusterBackup data protection settings from the cluster table
type DiskInfo ¶
type DiskInfo struct { Filename string `json:"filename,omitempty"` Format string `json:"format,omitempty"` VirtualSize uint `json:"virtual-size,omitempty"` ActualSize uint `json:"actual-size,omitempty"` DirtyFlag bool `json:"dirty-flag,omitempty"` ClusterSize uint `json:"cluster-size,omitempty"` Encrypted bool `json:"encrypted,omitempty"` BackingFilename string `json:"backing-filename,omitempty"` FullBackingFilename string `json:"full-backing-filename,omitempty"` Snapshots []string `json:"snapshots,omitempty"` }
DiskInfo contains information about a disk from a storage pool
type EmailAlerts ¶
type EmailAlerts struct { Service string `json:"service,omitempty"` Host string `json:"host,omitempty"` SMTPPort uint `json:"smtpPort,omitempty"` Secure bool `json:"secure"` Username string `json:"username"` Password string `json:"password"` Level string `json:"level,omitempty"` From string `json:"from,omitempty"` To string `json:"to"` BlackList []map[string]interface{} `json:"blackList,omitempty"` }
Settings for email alerts
type ExternalGuest ¶
type ExternalGuest struct { GuestName string `json:"guestName,omitempty"` Address string `json:"address,omitempty"` Username string `json:"username,omitempty"` ADGroup string `json:"ADGroup,omitempty"` Realm string `json:"realm,omitempty"` OS string `json:"os,omitempty"` DisablePortCheck bool `json:"disablePortCheck"` BrokerOptions *GuestBrokerOptions `json:"brokerOptions,omitempty"` }
ExternalGuest is used to add external guest records to the system
type Gateway ¶
type Gateway struct { Enabled bool `json:"enabled"` ClientSourceIsolation bool `json:"clientSourceIsolation"` PersistentPortAssignment bool `json:"persistentPortAssignment"` Hosts map[string]GatewayHost `json:"hosts"` }
Gateway settings from the cluster table
type GatewayHost ¶
type Guest ¶
type Guest struct { Address string `json:"address,omitempty"` ADGroup string `json:"ADGroup,omitempty"` AgentInstalled bool `json:"agentInstalled"` AgentMetadata *GuestAgentMetadata `json:"agentMetadata"` AgentVersion string `json:"agentVersion,omitempty"` Backup *GuestBackup `json:"backup,omitempty"` Cpus int `json:"cpus,omitempty"` Currentmem int `json:"currentmem,omitempty"` Disks []GuestDisk `json:"disks,omitempty"` DuplicateMitigation bool `json:"duplicateMitigation"` Error *GuestError `json:"error,omitempty"` External bool `json:"external"` DisablePortCheck bool `json:"disablePortCheck"` Gateway string `json:"gateway,omitempty"` GPU bool `json:"gpu"` GuestState string `json:"guestState,omitempty"` HasBeenReady bool `json:"hasBeenReady,omitempty"` Hostid string `json:"hostid,omitempty"` HostDevices []HostDevice `json:"hostDevices,omitempty"` Hostname string `json:"hostname,omitempty"` Interfaces []GuestNetwork `json:"interfaces,omitempty"` Memory int `json:"memory,omitempty"` MigrationMetadata *GuestMigrationMetadata `json:"migrationMetadata,omitempty"` MigrationProcessing bool `json:"migrationProcessing"` Name string `json:"name,omitempty"` Os string `json:"os,omitempty"` Persistent bool `json:"persistent,omitempty"` PoolID string `json:"poolId,omitempty"` PreviousGuestState string `json:"previousGuestState,omitempty"` ProfileID string `json:"profileId,omitempty"` PublishedIP string `json:"publishedIp,omitempty"` RdpUserInjected bool `json:"rdpUserInjected,omitempty"` Realm string `json:"realm,omitempty"` SessionInfo *GuestSessionInfo `json:"sessionInfo,omitempty"` Stamp interface{} `json:"stamp,omitempty"` Standalone bool `json:"standalone"` StateChronology *StateChronology `json:"stateChronology,omitempty"` Tags []string `json:"tags,omitempty"` TargetState []string `json:"targetState,omitempty"` TemplateName string `json:"templateName,omitempty"` UserVolume *UserVolume `json:"userVolume,omitempty"` Username string `json:"username"` UserSessionState string `json:"userSessionState,omitempty"` UserSession *UserSession `json:"userSession,omitempty"` UUID string `json:"uuid,omitempty"` BrokerOptions *GuestBrokerOptions `json:"brokerOptions,omitempty"` Secureboot bool `json:"secureboot"` Machine string `json:"machine,omitempty"` }
Guest describes a guest record from the rest api
func (*Guest) ListBackups ¶
StartBackup requests starting a backup immediately
func (*Guest) ResetRecord ¶
ResetRecord forces a guest record to be reset so it can be rebuilt
func (*Guest) StartBackup ¶
StartBackup requests starting a backup immediately
func (Guest) WaitForGuest ¶
WaitForGuest waits for a guest state to match the targetState
type GuestAgentMetadata ¶
type GuestAgentMetadata struct { ActualVersion string `json:"actualVersion"` ExpectedVersion string `json:"expectedVersion"` Installed bool `json:"installed"` State string `json:"state"` UpdateStatus string `json:"updateStatus"` }
GuestAgentMetadata contains information fabout the hive agent on the guest
type GuestBackup ¶
type GuestBackup struct { Enabled bool `json:"enabled"` State string `json:"state,omitempty"` Frequency string `json:"frequency,omitempty"` TargetStorageID string `json:"targetStorageId,omitempty"` LastBackup interface{} `json:"lastBackup,omitempty"` StateMessage string `json:"stateMessage,omitempty"` Backups []string `json:"backups,omitempty"` }
GuestBackup is struct for backup data of VM
type GuestBrokerConnection ¶
type GuestBrokerConnection struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Port uint `json:"port,omitempty"` Protocol string `json:"protocol,omitempty"` DisableHtml5 bool `json:"disableHtml5"` Gateway struct { Disabled bool `json:"disabled"` Protocols []string `json:"prococols,omitempty"` Persistent bool `json:"persistent"` } `json:"gateway"` }
GuestBrokerConnection contains settings for a broker connection to a guest
type GuestBrokerOptions ¶
type GuestBrokerOptions struct { DefaultConnection string `json:"defaultConnection,omitempty"` Connections []GuestBrokerConnection `json:"connections,omitempty"` }
GuestBrokerOptions allows configuring broker connection settings for a guest
type GuestDisk ¶
type GuestDisk struct { Type string `json:"type"` Path string `json:"path"` DiskDriver string `json:"diskDriver"` Format string `json:"format"` Filename string `json:"filename"` StorageID string `json:"storageId"` Size int `json:"size"` Device string `json:"dev"` Backing string `json:"backing"` SerialNumber string `json:"serial"` OSVolume int `json:"osvolume"` BootOrder int `json:"bootOrder"` Cache string `json:"cache"` }
GuestDisk is the structure for GuestDisk object in db
type GuestError ¶
GuestError is a struct for errors in the guest record
type GuestMigrationMetadata ¶
type GuestMigrationMetadata struct { SourceHostId string `json:"sourceHostId"` SourceHostname string `json:"sourceHostname"` DestinationHostId string `json:"destinationHostId"` DestinationHostname string `json:"destinationHostname"` Progress int `json:"progress"` MigratableXml string `json:"migratableXml"` }
type GuestNetwork ¶
type GuestNetwork struct { Emulation string `json:"emulation"` MacAddress string `json:"macAddress"` NetworkType string `json:"network"` Vlan int `json:"vlan"` Bus string `json:"bus"` IPAddress string `json:"ipAddress"` }
GuestNetwork is the structure for guest network interfaces
type GuestSessionInfo ¶
type GuestSessionInfo struct { SessionID int `json:"sessionId"` SessionState string `json:"sessionState"` SourceIP string `json:"sourceIP"` SourceName string `json:"sourceName"` SessionWorkstationName string `json:"sessionWorkstationName"` SessionResolution string `json:"sessionResolution"` }
GuestSessionInfo is struct for sessioninfo of user on VM
type GuestSnapshot ¶
type GuestSnapshot struct { Name string `json:"name"` Domain string `json:"domain"` Current string `json:"current"` State string `json:"state"` Location string `json:"location"` Metadata string `json:"metadata"` }
GuestSnapshot is contains snapshot information about the guest
type Host ¶
type Host struct { Appliance struct { Broker bool `json:"broker"` ClusterID string `json:"clusterId"` Cma string `json:"cma"` CPUGovernor string `json:"cpuGovernor"` CRS bool `json:"crs"` DbName string `json:"dbName"` DoNotParticipate bool `json:"doNotParticipate"` Firmware struct { Active string `json:"active"` Software string `json:"software"` PendingSwap bool `json:"pendingSwap"` } `json:"firmware"` Hostname string `json:"hostname"` Loglevel string `json:"loglevel"` MaxCloneDensity int `json:"maxCloneDensity"` Ntp string `json:"ntp"` Timezone string `json:"timezone"` Role string `json:"role"` } `json:"appliance"` Capabilities struct { StorageTypes []string `json:"storageTypes"` } `json:"capabilities"` Certificate struct { Expiration interface{} `json:"expiration"` Issuer string `json:"issuer"` Status string `json:"status"` } `json:"certificate"` Hardware struct { BIOS struct { ReleaseDate string `json:"releaseDate"` Vender string `json:"vender"` Version string `json:"version"` } `json:"BIOS"` Chasis struct { AssetTag string `json:"assetTag"` Manufacturer string `json:"manufacturer"` Version string `json:"version"` } `json:"Chasis"` HyperThreadingEnabled bool `json:"HyperThreadingEnabled"` PhysicalCPUs int `json:"PhysicalCPUs"` PhysicalCoresPerCPU int `json:"PhysicalCoresPerCPU"` Processor []struct { Cores int `json:"cores"` Family string `json:"family"` Manufacturer string `json:"manufacturer"` Threads int `json:"threads"` Version string `json:"version"` } `json:"Processor"` System struct { Manufacturer string `json:"manufacturer"` ProductName string `json:"productName"` } `json:"System"` TotalPhysicalMemory int `json:"TotalPhysicalMemory"` CPUFeatures interface{} Memory []struct { Size int `json:"size"` Type string `json:"type"` } `json:"memory"` VideoCards []struct { Bus int `json:"bus"` DeviceClass int `json:"deviceClass"` DeviceID int `json:"deviceId"` Domain int `json:"domain"` Func int `json:"func"` IommuGroup int `json:"iommu_group"` Mode string `json:"mode"` Path string `json:"path"` Slot int `json:"slot"` VendorID int `json:"vendorId"` } `json:"videoCards"` } `json:"hardware"` Hostid string `json:"hostid"` Hostname string `json:"hostname"` IP string `json:"ip"` Networking map[string]interface{} `json:"networking"` RdbID string `json:"rdbId"` Software interface{} `json:"software"` State string `json:"state"` Storage struct { Blockdevices []interface{} `json:"blockdevices"` Disk map[string]interface{} `json:"disk"` RAM struct { RamdiskPercent int `json:"ramdiskPercent"` SwapSize int `json:"swapSize"` Swappiness int `json:"swappiness"` Zram struct { Compression string `json:"compression"` Dedup string `json:"dedup"` Filesystems struct { Users struct { Mountpoint string `json:"mountpoint"` } `json:"users"` } `json:"filesystems"` Mountpoint string `json:"mountpoint"` } `json:"zram"` } `json:"ram"` } `json:"storage"` Tags []string `json:"tags"` }
Host describes a host record from the rest api
func (*Host) ChangeGatewayMode ¶
ChangeGatewayMode enable or disable gateway mode on the host
func (Host) DeleteNetwork ¶
DeleteNetwork adds or edits network settings for the host
func (*Host) DeleteSoftware ¶
DeleteSoftware deletes a software package from a host
func (*Host) DisableCRS ¶
DisableCRS disables crs on the host
func (Host) GetNetwork ¶
func (host Host) GetNetwork(client *Client, name string) (HostNetwork, error)
GetNetwork retrieves settings for a host network
func (Host) ListInterfaces ¶
func (host Host) ListInterfaces(client *Client) ([]HostNetworkInterface, error)
ListInterfaces returns information about the network interfaces on a host
func (Host) ListNetworks ¶
ListNetworks returns a list of networks configured on the host
func (*Host) ListSoftware ¶
func (host *Host) ListSoftware(client *Client) (HostPackageInfo, error)
ListSoftware returns the current software version and available packages
func (Host) ResetInterfaceSettings ¶
UpdateNetworkInterface resets the settings for a nic
func (*Host) RestartNetworking ¶
RestartNetworking calls restarts networking on the host
func (*Host) RestartServices ¶
RestartServices calls restart hive services
func (Host) SetNetwork ¶
func (host Host) SetNetwork(client *Client, net HostNetwork) error
SetNetwork adds or edits network settings for the host
func (*Host) UnjoinCluster ¶
UnjoinCluster removes a host from the cluster
func (*Host) UpdateAppliance ¶
UpdateAppliance updates settings from Host.appliance
func (Host) UpdateInterfaceSettings ¶
func (host Host) UpdateInterfaceSettings(client *Client, nic string, settings HostNetworkInterfaceSettings) error
UpdateNetworkInterface hardcodes settings for a nic
type HostDevice ¶
type HostDevice struct { Type string `json:"type"` Model string `json:"model"` Managed bool `json:"managed"` Domain int `json:"domain"` Bus int `json:"bus"` Slot int `json:"slot"` Func int `json:"func"` UUID string `json:"uuid"` }
HostDevice is information about a device forwarded to the guest from the host
type HostNetwork ¶
type HostNetwork struct { Name string `json:"name,omitempty"` DHCP bool `json:"dhcp,omitempty"` DNS string `json:"dns,omitempty"` Gw string `json:"gw,omitempty"` Interface string `json:"interface,omitempty"` IP string `json:"ip,omitempty"` Mask string `json:"mask,omitempty"` Search string `json:"search,omitempty"` VLAN int `json:"vlan,omitempty"` }
type HostNetworkInterface ¶
type HostNetworkInterface struct { Name string `json:"name"` Address string `json:"address"` Speed int `json:"speed"` Carrier int `json:"carrier"` Duplex string `json:"duplex"` MTU int `json:"mtu"` LinkModes []struct { Speed string `json:"speed"` Duplex string `json:"duplex"` } `json:"linkModes"` Autoneg bool `json:"autoneg"` Link bool `json:"link"` PortTypes string `json:"portTypes"` Driver string `json:"driver"` }
type HostPackageInfo ¶
HostPackageInfo contains information about software and firmware packages
type Pool ¶
type Pool struct { ID string `json:"id,omitempty"` Density []int `json:"density"` Description string `json:"description,omitempty"` GuestProfile *PoolGuestProfile `json:"guestProfile,omitempty"` InjectAgent bool `json:"injectAgent"` Name string `json:"name"` PerformanceThreshold int `json:"performanceThreshold,omitempty"` ProfileID string `json:"profileId,omitempty"` Seed string `json:"seed,omitempty"` State string `json:"state,omitempty"` StorageID string `json:"storageId,omitempty"` StorageType string `json:"storageType,omitempty"` Tags []string `json:"tags,omitempty"` TargetState []string `json:"targetState,omitempty"` Type string `json:"type"` UserSessionLoginThreshold int `json:"userSessionLoginThreshold,omitempty"` Backup *PoolBackup `json:"backup,omitempty"` PoolAffinity *PoolAffinity `json:"poolAffinity"` Assignment *PoolAssignment `json:"assignment,omitempty"` }
Pool describes a guest pool record from the rest api
func (*Pool) DeleteAssignment ¶
DeleteAssignment removes the assignment for a standalone pool
func (Pool) WaitForPool ¶
WaitForPool waits for a pool to reach the desired state
type PoolAffinity ¶
type PoolAffinity struct { CustomCPUFeatures string `json:"customCpuFeatures,omitempty"` UseHostPassthrough bool `json:"useHostPassthrough"` AllowedHostIDs []string `json:"allowedHostIds,omitempty"` }
PoolAffinity host affinity settings for the pool
type PoolAssignment ¶
type PoolAssignment struct { Realm string `json:"realm,omitempty"` Username string `json:"username,omitempty"` ADGroup string `json:"ADGroup,omitempty"` AutoClear *PoolAssignmentAutoClear `json:"autoClear,omitempty"` }
type PoolAssignmentAutoClear ¶
type PoolBackup ¶
type PoolBackup struct { Enabled bool `json:"enabled"` Frequency string `json:"frequency"` TargetStorageID string `json:"targetStorageId"` IncrementalBackups int `json:"incrementalBackups"` }
PoolBackup data protection settings from a pool record
type PoolCloudInit ¶
type PoolCloudInit struct { Enabled bool `json:"enabled"` UserData string `json:"userData,omitempty"` NetworkConfig string `json:"networkConfig,omitempty"` }
PoolCloudInit cloud-init settings for a pool record
type PoolDisk ¶
type PoolDisk struct { BootOrder int `json:"bootOrder,omitempty"` DiskDriver string `json:"diskDriver,omitempty"` Filename string `json:"filename,omitempty"` StorageID string `json:"storageId,omitempty"` Type string `json:"type,omitempty"` }
PoolDisk disk structure for a pool record
type PoolGuestProfile ¶
type PoolGuestProfile struct { AgentInstalled bool `json:"agentInstalled"` CPU []int `json:"cpu,omitempty"` Debug bool `json:"debug,omitempty"` Disks []*PoolDisk `json:"disks,omitempty"` Firmware string `json:"firmware,omitempty"` Gpu bool `json:"gpu"` HostDevices []*PoolHostDevice `json:"hostDevices,omitempty"` Interfaces []*PoolInterface `json:"interfaces,omitempty"` Mem []int `json:"mem,omitempty"` OS string `json:"os,omitempty"` Persistent bool `json:"persistent"` Protocol string `json:"protocol,omitempty"` TemplateName string `json:"templateName,omitempty"` Vga string `json:"vga,omitempty"` CloudInit *PoolCloudInit `json:"cloudInit,omitempty"` BrokerOptions *GuestBrokerOptions `json:"brokerOptions,omitempty"` Secureboot bool `json:"secureboot"` Machine string `json:"machine,omitempty"` }
PoolGuestProfile guestProfile section of a pool record
type PoolHostDevice ¶
type PoolHostDevice struct { Bus int `json:"bus"` Domain int `json:"domain"` Func int `json:"func"` Managed bool `json:"managed"` Slot int `json:"slot"` Type string `json:"type"` UUID string `json:"uuid,omitempty"` }
PoolHostDevice a hostdevice to share with a virtual machine
type PoolInterface ¶
type PoolInterface struct { Emulation string `json:"emulation,omitempty"` Network string `json:"network,omitempty"` Vlan interface{} `json:"vlan,omitempty"` IPAddress string `json:"ipAddress"` MacAddress string `json:"macAddress,omitempty"` }
PoolInterface network interface settings for a pool
type Profile ¶
type Profile struct { AdConfig *ProfileADConfig `json:"adConfig,omitempty"` BrokerOptions *ProfileBrokerOptions `json:"brokerOptions,omitempty"` BypassBroker bool `json:"bypassBroker"` ID string `json:"id,omitempty"` Name string `json:"name"` Tags []string `json:"tags,omitempty"` Timezone string `json:"timezone,omitempty"` UserVolumes *ProfileUserVolumes `json:"userVolumes,omitempty"` Vlan int `json:"vlan,omitempty"` Backup *ProfileBackup `json:"backup,omitempty"` }
Profile is a profile record from the rest api
type ProfileADConfig ¶
type ProfileADConfig struct { Domain string `json:"domain,omitempty"` Ou string `json:"ou,omitempty"` Password string `json:"password,omitempty"` UserGroup string `json:"userGroup,omitempty"` Username string `json:"username,omitempty"` }
ProfileADConfig contains the active directory settings for a profile
type ProfileBackup ¶
type ProfileBackup struct { Enabled bool `json:"enabled"` Frequency string `json:"frequency"` TargetStorageID string `json:"targetStorageId"` UserVolumeList []string `json:"userVolumeList,omitempty"` LastBackup interface{} `json:"lastBackup,omitempty"` }
ProfileBackup contains data protection settings for a profile
type ProfileBrokerOptions ¶
type ProfileBrokerOptions struct { AllowDesktopComposition bool `json:"allowDesktopComposition"` AudioCapture bool `json:"audioCapture"` DisableFullWindowDrag bool `json:"disableFullWindowDrag"` DisableMenuAnims bool `json:"disableMenuAnims"` DisablePrinter bool `json:"disablePrinter"` DisableThemes bool `json:"disableThemes"` DisableWallpaper bool `json:"disableWallpaper"` HideAuthenticationFailure bool `json:"hideAuthenticationFailure"` InjectPassword bool `json:"injectPassword"` RedirectCSSP bool `json:"redirectCSSP"` RedirectClipboard bool `json:"redirectClipboard"` RedirectDisk bool `json:"redirectDisk"` RedirectPNP bool `json:"redirectPNP"` RedirectPrinter bool `json:"redirectPrinter"` RedirectSmartCard bool `json:"redirectSmartCard"` RedirectUSB bool `json:"redirectUSB"` SmartResize bool `json:"smartResize"` FailOnCertMismatch bool `json:"failOnCertMismatch"` EnableHTML5 bool `json:"enableHtml5"` }
ProfileBrokerOptions contains rdp settings for a profile
type ProfileUserVolumes ¶
type ProfileUserVolumes struct { BackupSchedule int `json:"backupSchedule,omitempty"` Repository string `json:"repository,omitempty"` Size int `json:"size,omitempty"` Target string `json:"target,omitempty"` }
ProfileUserVolumes contains user volume settings for a profile
type Realm ¶
type Realm struct { Alias string `json:"alias,omitempty"` Enabled bool `json:"enabled"` ForceTLS bool `json:"forceTls"` FQDN string `json:"fqdn"` Name string `json:"name"` Site string `json:"site,omitempty"` Tags []string `json:"tags,omitempty"` Verified bool `json:"verified"` ServiceAccount *RealmServiceAccount `json:"serviceAccount,omitempty"` }
Realm describes a realm from the rest api
type RealmServiceAccount ¶
type RealmServiceAccount struct { Username string `json:"username"` Password string `json:"password"` }
RealmServiceAccount contains an active directory service account for the realm
type StateChronology ¶
type StateChronology struct { Current string `json:"current"` Next string `json:"next"` Target string `json:"target"` }
StateChronology state tracking for the guest
type StoragePool ¶
type StoragePool struct { ID string `json:"id,omitempty"` Name string `json:"name"` Type string `json:"type"` Server string `json:"server,omitempty"` Path string `json:"path,omitempty"` URL string `json:"url,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` Key string `json:"key,omitempty"` MountOptions []string `json:"mountOptions,omitempty"` Roles []string `json:"roles,omitempty"` Tags []string `json:"tags,omitempty"` S3AccessKeyID string `json:"s3AccessKeyId,omitempty"` S3SecretAccessKey string `json:"s3SecretAccessKey,omitempty"` S3Region string `json:"s3Region,omitempty"` S3Provider string `json:"s3Provider,omitempty"` S3Endpoint string `json:"s3Endpoint,omitempty"` Disabled bool `json:"disabled"` Replicated bool `json:"replicated,omitempty"` }
StoragePool describes a storage pool returned from the rest api
func (*StoragePool) Browse ¶
func (pool *StoragePool) Browse(client *Client, filePath string, recursive bool) ([]StoragePoolFileInfo, error)
Browse returns a list of files from a storage pool
func (*StoragePool) ConvertDisk ¶
func (pool *StoragePool) ConvertDisk(client *Client, srcFilename, dstStorageID, dstFilename, dstFormat string) (*Task, error)
ConvertDisk converts or copies a disk to a new file
func (*StoragePool) CopyURL ¶
func (pool *StoragePool) CopyURL(client *Client, url, filePath string) (*Task, error)
CopyURL downloads a file from a http url into a storage pool
func (*StoragePool) Create ¶
func (pool *StoragePool) Create(client *Client) (string, error)
Create creates a new storage pool
func (*StoragePool) CreateDisk ¶
func (pool *StoragePool) CreateDisk(client *Client, filename, format string, size uint) (*Task, error)
CreateDisk creates a new disk in the storage pool
func (*StoragePool) Delete ¶
func (pool *StoragePool) Delete(client *Client) error
Delete deletes a storage pool
func (*StoragePool) DeleteFile ¶
func (pool *StoragePool) DeleteFile(client *Client, filename string) error
DeleteFile deletes a file from a storage pool
func (*StoragePool) DiskInfo ¶
func (pool *StoragePool) DiskInfo(client *Client, filePath string) (DiskInfo, error)
DiskInfo retrieves information about a disk in the storage pool
func (*StoragePool) DownloadWithContext ¶
func (pool *StoragePool) DownloadWithContext(ctx context.Context, client *Client, filePath string) (*http.Response, error)
DownloadWithContext downloads a file from a storage pool with a custom context
func (*StoragePool) Start ¶
func (pool *StoragePool) Start(client *Client) error
Start re-enables a stopped storage pool
func (*StoragePool) Stop ¶
func (pool *StoragePool) Stop(client *Client) error
Stop disables a storage pool
func (StoragePool) String ¶
func (pool StoragePool) String() string
type StoragePoolFileInfo ¶
type StoragePoolFileInfo struct { Path string `json:"Path"` Name string `json:"Name"` Size int `json:"Size"` MimeType string `json:"MimeType"` ModTime string `json:"ModTime"` IsDir bool `json:"IsDir"` }
StoragePoolFileInfo contains information about the files returned by Browse
type Task ¶
type Task struct { Cancellable bool `json:"cancellable"` Description string `json:"description"` FinishedTime time.Time `json:"finishedTime"` ID string `json:"id"` LastUpdatedTime time.Time `json:"lastUpdatedTime"` Message string `json:"message"` Name string `json:"name"` Progress float32 `json:"progress"` QueueTime int `json:"queueTime"` Ref struct { Cluster string `json:"cluster"` Host string `json:"host"` } `json:"ref"` StartTime time.Time `json:"startTime"` State string `json:"state"` Tags []string `json:"tags"` Type string `json:"type"` Username string `json:"username"` }
Task describes a task record from the rest api
func (*Task) ForceComplete ¶
ForceComplete marks a task as completed in the database
func (Task) WaitForTask ¶
WaitForTask blocks until a task is complete and returns the task
func (Task) WaitForTaskWithContext ¶
func (task Task) WaitForTaskWithContext(ctx context.Context, client *Client, printProgress bool) (*Task, error)
WaitForTask blocks until a task is complete and returns the task
type Template ¶
type Template struct { Name string `json:"name"` Description string `json:"description"` Vcpu int `json:"vcpu"` Mem int `json:"mem"` OS string `json:"os"` Firmware string `json:"firmware,omitempty"` Gpu bool `json:"gpu,omitempty"` DisplayDriver string `json:"displayDriver,omitempty"` Interfaces []*TemplateInterface `json:"interfaces,omitempty"` Drivers bool `json:"drivers"` Disks []*TemplateDisk `json:"disks,omitempty"` State string `json:"state,omitempty"` StateMessage string `json:"stateMessage,omitempty"` ManualAgentInstall bool `json:"manualAgentInstall"` TemplateMap map[string]interface{} `json:"templateMap,omitempty"` BrokerOptions *GuestBrokerOptions `json:"brokerOptions,omitempty"` Secureboot bool `json:"secureboot"` Machine string `json:"machine,omitempty"` }
Template a template record from the rest interface
func (*Template) Duplicate ¶
func (template *Template) Duplicate(client *Client, dstName, dstStorage, dstFilename string) (*Task, error)
Duplicate copies a template
func (*Template) Load ¶
Load stages a template to storage across the cluster stoarge can be "disk" or "ram"
type TemplateDisk ¶
type TemplateDisk struct { DiskDriver string `json:"diskDriver"` Filename string `json:"filename"` Format string `json:"format,omitempty"` Path string `json:"path,omitempty"` //TODO: Is this actually used? Size int `json:"size"` StorageID string `json:"storageId"` Type string `json:"type"` OsVolume int `json:"osvolume"` }
TemplateDisk a disk from a template record
type TemplateInterface ¶
type TemplateInterface struct { Network string `json:"network"` Vlan int `json:"vlan"` Emulation string `json:"emulation"` }
TemplateInterface a network interface from a template record
type User ¶
type User struct { ID string `json:"id,omitempty"` GroupName string `json:"groupName,omitempty"` Password string `json:"password,omitempty"` Preferences *UserPreferences `json:"preferences,omitempty"` Realm string `json:"realm,omitempty"` Role string `json:"role,omitempty"` Tags []string `json:"tags,omitempty"` Username string `json:"username,omitempty"` }
User describes a user record
type UserPreferences ¶
type UserPreferences struct {
UiTimeout float64 `json:"uiTimeout,omitempty"`
}
UserPreferences
type UserSession ¶
type UserSession struct { UserSessionState string `json:"userSessionState"` LastUserLoginTime interface{} `json:"lastUserLoginTime"` LastLoginDuration int `json:"lastLoginDuration"` DisconnectTime interface{} `json:"disconnectTime"` }
UserSession contains user session information for a guest
type UserVolume ¶
type UserVolume struct { State string `json:"state,omitempty"` LastReplication interface{} `json:"lastReplication,omitempty"` RepliacationRequested interface{} `json:"replicationRequested,omitempty"` Source string `json:"source,omitempty"` Target string `json:"target,omitempty"` RunningBackup bool `json:"runningBackup,omitempty"` StateMessage interface{} `json:"stateMessage,omitempty"` DiskFrozen bool `json:"diskFrozen,omitempty"` BackupSchedule int `json:"backupSchedule,omitempty"` }
UserVolume is the struct for uservolume on guest record