tbclient

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const HostURL = "http://localhost:8080"

HostURL Defaulted to local service instance

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	HostURL     string
	Token       string
	Debug       bool
	UserAgent   string
	DisableGzip bool
}

func NewClient

func NewClient(host, authToken *string) *Client

func (*Client) CreateExternalDnsRecord added in v1.0.1

func (c *Client) CreateExternalDnsRecord(externalDnsRecord ExternalDnsRecord) (*ExternalDnsRecord, error)

func (*Client) CreateHw

func (c *Client) CreateHw(hw Hw) (*Hw, error)

func (*Client) CreateInboundProxyRule added in v1.0.1

func (c *Client) CreateInboundProxyRule(inboundProxyRule InboundProxyRule) (*InboundProxyRule, error)

func (*Client) CreateIpNatRule

func (c *Client) CreateIpNatRule(ipNatRule IpNatRule) (*IpNatRule, error)

func (*Client) CreateLicense

func (c *Client) CreateLicense(license License) (*License, error)

func (*Client) CreateMailServer added in v1.0.1

func (c *Client) CreateMailServer(mailServer MailServer) (*MailServer, error)

func (*Client) CreateNetwork

func (c *Client) CreateNetwork(network Network) (*Network, error)

func (*Client) CreateTelephonyItem added in v1.0.1

func (c *Client) CreateTelephonyItem(telephonyItem TelephonyItem) (*TelephonyItem, error)

func (*Client) CreateTopology

func (c *Client) CreateTopology(topology Topology) (*Topology, error)

func (*Client) CreateVm

func (c *Client) CreateVm(vm Vm) (*Vm, error)

func (*Client) CreateVmNatRule added in v1.0.1

func (c *Client) CreateVmNatRule(vmNatRule VmNatRule) (*VmNatRule, error)

func (*Client) DeleteExternalDnsRecord added in v1.0.1

func (c *Client) DeleteExternalDnsRecord(uid string) error

func (*Client) DeleteHw

func (c *Client) DeleteHw(uid string) error

func (*Client) DeleteInboundProxyRule added in v1.0.1

func (c *Client) DeleteInboundProxyRule(uid string) error

func (*Client) DeleteIpNatRule

func (c *Client) DeleteIpNatRule(uid string) error

func (*Client) DeleteLicense

func (c *Client) DeleteLicense(uid string) error

func (*Client) DeleteMailServer added in v1.0.1

func (c *Client) DeleteMailServer(uid string) error

func (*Client) DeleteNetwork

func (c *Client) DeleteNetwork(networkUid string) error

func (*Client) DeleteTelephonyItem added in v1.0.1

func (c *Client) DeleteTelephonyItem(uid string) error

func (*Client) DeleteTopology

func (c *Client) DeleteTopology(topologyUid string) error

func (*Client) DeleteVm

func (c *Client) DeleteVm(vmUid string) error

func (*Client) DeleteVmNatRule added in v1.0.1

func (c *Client) DeleteVmNatRule(uid string) error

func (*Client) GetAllExternalDnsRecords added in v1.0.1

func (c *Client) GetAllExternalDnsRecords(topologyUid string) ([]ExternalDnsRecord, error)

func (*Client) GetAllHws

func (c *Client) GetAllHws(topologyUid string) ([]Hw, error)

func (*Client) GetAllInboundProxyRules added in v1.0.1

func (c *Client) GetAllInboundProxyRules(topologyUid string) ([]InboundProxyRule, error)

func (*Client) GetAllInventoryDnsAssets added in v1.0.1

func (c *Client) GetAllInventoryDnsAssets(topologyUid string) ([]InventoryDnsAsset, error)

func (*Client) GetAllInventoryHwScripts

func (c *Client) GetAllInventoryHwScripts(topologyUid string) ([]InventoryHwScript, error)

func (*Client) GetAllInventoryHwTemplateConfigs

func (c *Client) GetAllInventoryHwTemplateConfigs(topologyUid string) ([]InventoryHwScript, error)

func (*Client) GetAllInventoryHws

func (c *Client) GetAllInventoryHws(topologyUid string) ([]InventoryHw, error)

func (*Client) GetAllInventoryLicenses

func (c *Client) GetAllInventoryLicenses(topologyUid string) ([]InventoryLicense, error)

func (*Client) GetAllInventoryNetworks

func (c *Client) GetAllInventoryNetworks(topologyUid string) ([]InventoryNetwork, error)

func (*Client) GetAllInventorySrvProtocols added in v1.0.1

func (c *Client) GetAllInventorySrvProtocols() ([]InventorySrvProtocol, error)

func (*Client) GetAllInventoryTelephonyItems added in v1.0.1

func (c *Client) GetAllInventoryTelephonyItems(topologyUid string) ([]InventoryTelephonyItem, error)

func (*Client) GetAllInventoryVms

func (c *Client) GetAllInventoryVms(topologyUid string) ([]InventoryVm, error)

func (*Client) GetAllIpNatRules

func (c *Client) GetAllIpNatRules(topologyUid string) ([]IpNatRule, error)

func (*Client) GetAllLicenses

func (c *Client) GetAllLicenses(topologyUid string) ([]License, error)

func (*Client) GetAllMailServers added in v1.0.1

func (c *Client) GetAllMailServers(topologyUid string) ([]MailServer, error)

func (*Client) GetAllNetworks

func (c *Client) GetAllNetworks(topologyUid string) ([]Network, error)

func (*Client) GetAllNicTypes

func (c *Client) GetAllNicTypes() ([]NicType, error)

func (*Client) GetAllOsFamilies

func (c *Client) GetAllOsFamilies() ([]OsFamily, error)

func (*Client) GetAllTelephonyItems added in v1.0.1

func (c *Client) GetAllTelephonyItems(topologyUid string) ([]TelephonyItem, error)

func (*Client) GetAllTopologies

func (c *Client) GetAllTopologies() ([]Topology, error)

func (*Client) GetAllVmNatRules added in v1.0.1

func (c *Client) GetAllVmNatRules(topologyUid string) ([]VmNatRule, error)

func (*Client) GetAllVms

func (c *Client) GetAllVms(topologyUid string) ([]Vm, error)

func (*Client) GetDocumentation added in v1.0.1

func (c *Client) GetDocumentation(uid string) (*Documentation, error)

func (*Client) GetExternalDnsRecord added in v1.0.1

func (c *Client) GetExternalDnsRecord(uid string) (*ExternalDnsRecord, error)

func (*Client) GetHw

func (c *Client) GetHw(uid string) (*Hw, error)

func (*Client) GetHwStartOrder

func (c *Client) GetHwStartOrder(topologyUid string) (*HwStartOrder, error)

func (*Client) GetIpNatRule

func (c *Client) GetIpNatRule(uid string) (*IpNatRule, error)

func (*Client) GetLicense

func (c *Client) GetLicense(uid string) (*License, error)

func (*Client) GetNetwork

func (c *Client) GetNetwork(uid string) (*Network, error)

func (*Client) GetRemoteAccess

func (c *Client) GetRemoteAccess(topologyUid string) (*RemoteAccess, error)

func (*Client) GetScenario

func (c *Client) GetScenario(topologyUid string) (*Scenario, error)

func (*Client) GetTopology

func (c *Client) GetTopology(uid string) (*Topology, error)

func (*Client) GetVm

func (c *Client) GetVm(uid string) (*Vm, error)

func (*Client) GetVmNatRule added in v1.0.1

func (c *Client) GetVmNatRule(uid string) (*VmNatRule, error)

func (*Client) GetVmStartOrder

func (c *Client) GetVmStartOrder(topologyUid string) (*VmStartOrder, error)

func (*Client) GetVmStopOrder

func (c *Client) GetVmStopOrder(topologyUid string) (*VmStopOrder, error)

func (*Client) UpdateDocumentation added in v1.0.1

func (c *Client) UpdateDocumentation(documentation Documentation) (*Documentation, error)

func (*Client) UpdateExternalDnsRecord added in v1.0.1

func (c *Client) UpdateExternalDnsRecord(externalDnsRecord ExternalDnsRecord) (*ExternalDnsRecord, error)

func (*Client) UpdateHw

func (c *Client) UpdateHw(hw Hw) (*Hw, error)

func (*Client) UpdateHwStartOrder

func (c *Client) UpdateHwStartOrder(hwStartOrder HwStartOrder) (*HwStartOrder, error)

func (*Client) UpdateLicense

func (c *Client) UpdateLicense(license License) (*License, error)

func (*Client) UpdateNetwork

func (c *Client) UpdateNetwork(network Network) (*Network, error)

func (*Client) UpdateRemoteAccess

func (c *Client) UpdateRemoteAccess(remoteAccess RemoteAccess) (*RemoteAccess, error)

func (*Client) UpdateScenario

func (c *Client) UpdateScenario(Scenario Scenario) (*Scenario, error)

func (*Client) UpdateTopology

func (c *Client) UpdateTopology(topology Topology) (*Topology, error)

func (*Client) UpdateVm

func (c *Client) UpdateVm(vm Vm) (*Vm, error)

func (*Client) UpdateVmStartOrder

func (c *Client) UpdateVmStartOrder(vmStartOrder VmStartOrder) (*VmStartOrder, error)

func (*Client) UpdateVmStopOrder

func (c *Client) UpdateVmStopOrder(vmStopOrder VmStopOrder) (*VmStopOrder, error)

type ClientError

type ClientError struct {
	VndErrors []vndError
	Status    string
}

func (*ClientError) Error

func (e *ClientError) Error() string

type Documentation added in v1.0.1

type Documentation struct {
	Uid              string `json:"uid,omitempty"`
	DocumentationUrl string `json:"documentationUrl"`
}

type ExternalDnsNatRule added in v1.0.1

type ExternalDnsNatRule struct {
	Uid string `json:"uid"`
}

type ExternalDnsRecord added in v1.0.1

type ExternalDnsRecord struct {
	Uid               string                 `json:"uid,omitempty"`
	Hostname          string                 `json:"hostname,omitempty"`
	ARecord           string                 `json:"aRecord,omitempty"`
	InventoryDnsAsset *InventoryDnsAsset     `json:"inventoryDnsAsset"`
	NatRule           *ExternalDnsNatRule    `json:"natRule"`
	SrvRecords        []ExternalDnsSrvRecord `json:"srvRecords"`
	Topology          *Topology              `json:"topology"`
}

type ExternalDnsSrvRecord added in v1.0.1

type ExternalDnsSrvRecord struct {
	Uid      string `json:"uid,omitempty"`
	Service  string `json:"service"`
	Protocol string `json:"protocol"`
	Port     int    `json:"port"`
}

type Hw

type Hw struct {
	Uid                    string             `json:"uid,omitempty"`
	Name                   string             `json:"name,omitempty"`
	PowerControlEnabled    *bool              `json:"powerControlEnabled"`
	HardwareConsoleEnabled *bool              `json:"hardwareConsoleEnabled"`
	StartupScript          *InventoryHwScript `json:"inventoryStartupScript"`
	CustomScript           *InventoryHwScript `json:"inventoryCustomScript"`
	ShutdownScript         *InventoryHwScript `json:"inventoryShutdownScript"`
	TemplateConfigScript   *InventoryHwScript `json:"inventoryTemplateConfigScript"`
	NetworkInterfaces      []HwNic            `json:"hardwareNetworkInterfaces"`
	InventoryHardwareItem  *InventoryHw       `json:"inventoryHardwareItem"`
	Topology               *Topology          `json:"topology"`
}

type HwNic

type HwNic struct {
	Uid              string         `json:"uid,omitempty"`
	Network          Network        `json:"network"`
	NetworkInterface InventoryHwNic `json:"networkInterface"`
}

type HwStartOrder

type HwStartOrder struct {
	Uid       string            `json:"uid,omitempty"`
	Ordered   bool              `json:"ordered"`
	Positions []HwStartPosition `json:"positions"`
	Topology  *Topology         `json:"topology"`
}

type HwStartPosition

type HwStartPosition struct {
	Position     int `json:"position"`
	DelaySeconds int `json:"delaySeconds"`
	Hw           *Hw `json:"hardwareItem"`
}
type InboundProxyHyperlink struct {
	Show bool   `json:"show"`
	Text string `json:"text"`
}

type InboundProxyRule added in v1.0.1

type InboundProxyRule struct {
	Uid         string                 `json:"uid,omitempty"`
	TcpPort     int                    `json:"tcpPort"`
	Ssl         bool                   `json:"ssl"`
	UrlPath     string                 `json:"urlPath"`
	VmNicTarget *TrafficVmNicTarget    `json:"vmNicTarget"`
	Hyperlink   *InboundProxyHyperlink `json:"hyperlink"`
	Topology    *Topology              `json:"topology"`
}

type InventoryDnsAsset added in v1.0.1

type InventoryDnsAsset struct {
	Id   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type InventoryHw

type InventoryHw struct {
	Id                       string           `json:"id,omitempty"`
	Name                     string           `json:"name,omitempty"`
	Description              string           `json:"description,omitempty"`
	PowerControlAvailable    bool             `json:"powerControlAvailable"`
	HardwareConsoleAvailable bool             `json:"hardwareConsoleAvailable"`
	NetworkInterfaces        []InventoryHwNic `json:"networkInterfaces"`
}

type InventoryHwNic

type InventoryHwNic struct {
	Id string `json:"id"`
}

type InventoryHwScript

type InventoryHwScript struct {
	Uid  string `json:"uid"`
	Name string `json:"name,omitempty"`
}

type InventoryLicense

type InventoryLicense struct {
	Id       string `json:"id,omitempty"`
	Name     string `json:"name,omitempty"`
	Quantity int    `json:"quantity,omitempty"`
}

type InventoryNetwork

type InventoryNetwork struct {
	Id     string `json:"id,omitempty"`
	Type   string `json:"type,omitempty"`
	Subnet string `json:"subnet,omitempty"`
}

InventoryNetwork

type InventorySrvProtocol added in v1.0.1

type InventorySrvProtocol struct {
	Id       string `json:"id"`
	Protocol string `json:"protocol"`
}

type InventoryTelephonyItem added in v1.0.1

type InventoryTelephonyItem struct {
	Id          string `json:"id"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
}

type InventoryVm

type InventoryVm struct {
	Id                  string                   `json:"id,omitempty"`
	Datacenter          string                   `json:"datacenter,omitempty"`
	OriginalName        string                   `json:"originalName,omitempty"`
	OriginalDescription string                   `json:"originalDescription,omitempty"`
	CpuQty              uint64                   `json:"cpuQty,omitempty"`
	MemoryMb            uint64                   `json:"memoryMb,omitempty"`
	NetworkInterfaces   []InventoryVmNic         `json:"networkInterfaces,omitempty"`
	RemoteAccess        *InventoryVmRemoteAccess `json:"remoteAccess,omitempty"`
}

type InventoryVmNic

type InventoryVmNic struct {
	InventoryNetworkId string `json:"inventoryNetworkId,omitempty"`
	Name               string `json:"name,omitempty"`
	IpAddress          string `json:"ipAddress,omitempty"`
	MacAddress         string `json:"macAddress,omitempty"`
	Type               string `json:"type,omitempty"`
	RdpEnabled         bool   `json:"rdpEnabled"`
	SshEnabled         bool   `json:"sshEnabled"`
}

type InventoryVmRemoteAccess

type InventoryVmRemoteAccess struct {
	RdpAutoLogin bool `json:"rdpAutoLogin"`
	RdpEnabled   bool `json:"rdpEnabled"`
	SshEnabled   bool `json:"sshEnabled"`
}

type IpNatRule

type IpNatRule struct {
	Uid      string      `json:"uid,omitempty"`
	EastWest bool        `json:"eastWest"`
	Target   IpNatTarget `json:"target"`
	Topology *Topology   `json:"topology"`
}

type IpNatTarget

type IpNatTarget struct {
	IpAddress string `json:"ipAddress"`
	Name      string `json:"name"`
}

type License

type License struct {
	Uid              string            `json:"uid,omitempty"`
	Quantity         int               `json:"quantity,omitempty"`
	InventoryLicense *InventoryLicense `json:"inventoryLicense"`
	Topology         *Topology         `json:"topology"`
}

type MailServer added in v1.0.1

type MailServer struct {
	Uid               string              `json:"uid,omitempty"`
	InventoryDnsAsset *InventoryDnsAsset  `json:"inventoryDnsAsset"`
	VmNicTarget       *TrafficVmNicTarget `json:"vmNicTarget"`
	Topology          *Topology           `json:"topology"`
}

type Network

type Network struct {
	Uid              string            `json:"uid,omitempty"`
	Name             string            `json:"name"`
	Description      string            `json:"description"`
	InventoryNetwork *InventoryNetwork `json:"inventoryNetwork"`
	Topology         *Topology         `json:"topology"`
}

Network

type NicType

type NicType struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

Nic Type

type OsFamily

type OsFamily struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

OS Family

type RemoteAccess

type RemoteAccess struct {
	Uid                string    `json:"uid,omitempty"`
	AnyconnectEnabled  bool      `json:"anyconnectEnabled"`
	EndpointKitEnabled bool      `json:"endpointKitEnabled"`
	Topology           *Topology `json:"topology"`
}

type Scenario

type Scenario struct {
	Uid      string           `json:"uid,omitempty"`
	Question string           `json:"question,omitempty"`
	Enabled  bool             `json:"enabled"`
	Options  []ScenarioOption `json:"scenarioOptions"`
	Topology *Topology        `json:"topology"`
}

type ScenarioOption

type ScenarioOption struct {
	Uid          string `json:"uid,omitempty"`
	InternalName string `json:"internalName,omitempty"`
	DisplayName  string `json:"displayName,omitempty"`
}

type TelephonyItem added in v1.0.1

type TelephonyItem struct {
	Uid                    string                  `json:"uid,omitempty"`
	Name                   string                  `json:"name,omitempty"`
	InventoryTelephonyItem *InventoryTelephonyItem `json:"inventoryTelephonyItem"`
	Topology               *Topology               `json:"topology"`
}

type Topology

type Topology struct {
	Uid         string `json:"uid,omitempty"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Datacenter  string `json:"datacenter"`
	Notes       string `json:"notes"`
	Status      string `json:"status,omitempty"`
}

Topology

type TrafficVmNicTarget added in v1.0.1

type TrafficVmNicTarget struct {
	Uid       string `json:"uid,omitempty"`
	IpAddress string `json:"ipAddress,omitempty"`
	Vm        *Vm    `json:"vm,omitempty"`
}

type Vm

type Vm struct {
	Uid                  string              `json:"uid,omitempty"`
	Name                 string              `json:"name,omitempty"`
	Description          string              `json:"description,omitempty"`
	MemoryMb             uint64              `json:"memoryMb,omitempty"`
	CpuQty               uint64              `json:"cpuQty,omitempty"`
	NestedHypervisor     *bool               `json:"nestedHypervisor"`
	InventoryVmId        string              `json:"inventoryVmId,omitempty"`
	TopologyInvariantUid string              `json:"topologyInvariantUid,omitempty"`
	OsFamily             string              `json:"osFamily,omitempty"`
	RemoteAccess         *VmRemoteAccess     `json:"remoteAccess"`
	VmNetworkInterfaces  []VmNic             `json:"vmNetworkInterfaces"`
	AdvancedSettings     *VmAdvancedSettings `json:"advancedSettings"`
	GuestAutomation      *VmGuestAutomation  `json:"guestAutomation"`
	ShutdownAutomation   *VmGuestAutomation  `json:"shutdownAutomation"`
	DhcpConfig           *VmDhcpConfig       `json:"dhcpConfig"`
	Topology             *Topology           `json:"topology"`
}

type VmAdvancedSettings

type VmAdvancedSettings struct {
	NameInHypervisor      string `json:"nameInHypervisor,omitempty"`
	BiosUuid              string `json:"biosUuid,omitempty"`
	NotStarted            bool   `json:"notStarted"`
	AllDisksNonPersistent bool   `json:"allDisksNonPersistent"`
}

type VmDhcpConfig added in v1.0.1

type VmDhcpConfig struct {
	DefaultGatewayIp string `json:"defaultGatewayIp"`
}

type VmGuestAutomation

type VmGuestAutomation struct {
	Command   string `json:"command,omitempty"`
	DelaySecs uint32 `json:"delaySecs"`
}

type VmNatRule added in v1.0.1

type VmNatRule struct {
	Uid      string      `json:"uid,omitempty"`
	EastWest bool        `json:"eastWest"`
	Target   VmNatTarget `json:"target"`
	Topology *Topology   `json:"topology"`
}

type VmNatTarget added in v1.0.1

type VmNatTarget struct {
	IpAddress string `json:"ipAddress,omitempty"`
	Name      string `json:"name,omitempty"`
	VmNic     *VmNic `json:"targetItem"`
}

type VmNic

type VmNic struct {
	Uid        string    `json:"uid,omitempty"`
	Name       string    `json:"name,omitempty"`
	MacAddress string    `json:"macAddress,omitempty"`
	IpAddress  string    `json:"ipAddress,omitempty"`
	Type       string    `json:"type,omitempty"`
	InUse      bool      `json:"inUse"`
	AssignDhcp bool      `json:"assignDhcp"`
	Rdp        *VmNicRdp `json:"rdp"`
	Ssh        *VmNicSsh `json:"ssh"`
	Network    *Network  `json:"network"`
}

type VmNicRdp

type VmNicRdp struct {
	Enabled   bool `json:"enabled"`
	AutoLogin bool `json:"autoLogin"`
}

type VmNicSsh

type VmNicSsh struct {
	Enabled bool `json:"enabled"`
}

type VmRemoteAccess

type VmRemoteAccess struct {
	Username           string                            `json:"username,omitempty"`
	Password           string                            `json:"password,omitempty"`
	VmConsoleEnabled   bool                              `json:"vmConsoleEnabled"`
	DisplayCredentials *VmRemoteAccessDisplayCredentials `json:"displayCredentials,omitempty"`
	InternalUrls       []VmRemoteAccessInternalUrl       `json:"internalUrls"`
}

type VmRemoteAccessDisplayCredentials

type VmRemoteAccessDisplayCredentials struct {
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

type VmRemoteAccessInternalUrl

type VmRemoteAccessInternalUrl struct {
	Location    string `json:"location,omitempty"`
	Description string `json:"description,omitempty"`
}

type VmStartOrder

type VmStartOrder struct {
	Uid       string            `json:"uid,omitempty"`
	Ordered   bool              `json:"ordered"`
	Positions []VmStartPosition `json:"positions"`
	Topology  *Topology         `json:"topology"`
}

type VmStartPosition

type VmStartPosition struct {
	Position     int `json:"position"`
	DelaySeconds int `json:"delaySeconds"`
	Vm           *Vm `json:"vm"`
}

type VmStopOrder

type VmStopOrder struct {
	Uid       string           `json:"uid,omitempty"`
	Ordered   bool             `json:"ordered"`
	Positions []VmStopPosition `json:"positions"`
	Topology  *Topology        `json:"topology"`
}

type VmStopPosition

type VmStopPosition struct {
	Position int `json:"position"`
	Vm       *Vm `json:"vm"`
}

Jump to

Keyboard shortcuts

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