Documentation ¶
Index ¶
- Constants
- type ChangeVmPowerStateRequest
- type ChangeVmPowerStateResponse
- type Client
- type CreateVirtualNetworkRequest
- type CreateVirtualNetworkResponse
- type CreateVmCopyRequest
- type CreateVmCopyResponse
- type CreateVmNetworkAdapterRequest
- type CreateVmNetworkAdapterResponse
- type DeletePortForwardingRequest
- type DeletePortForwardingResponse
- type DeleteSharedFolderRequest
- type DeleteSharedFolderResponse
- type DeleteVmNetworkAdapterRequest
- type DeleteVmNetworkAdapterResponse
- type DeleteVmRequest
- type DeleteVmResponse
- type GetAllMacToIpSettingsForDhcpServiceResponse
- type GetAllPortForwardingsResponse
- type GetAllVirtualNetworksResponse
- type GetAllVmNetworkAdaptersResponse
- type GetIpStackConfigurationOfAllNics
- type GetVmAllSharedFoldersMountedResponse
- type GetVmConfigParamsResponse
- type GetVmIpAddressResponse
- type GetVmListRequest
- type GetVmListResponse
- type GetVmPowerStateResponse
- type GetVmRestrictionsInformationResponse
- type GetVmSettingInformationRequest
- type GetVmSettingInformationResponse
- type MountVmNewSharedFolderRequest
- type MountVmNewSharedFolderResponse
- type Params
- type RegisterVmToVmLibraryRequest
- type RegisterVmToVmLibraryResponse
- type UpdateMacToIpBindingRequest
- type UpdateMacToIpBindingResponse
- type UpdatePortForwardingRequest
- type UpdatePortForwardingResponse
- type UpdateVmConfigParamsRequest
- type UpdateVmConfigParamsResponse
- type UpdateVmNetworkAdapterRequest
- type UpdateVmNetworkAdapterResponse
- type UpdateVmSettingRequest
- type UpdateVmSettingResponse
- type UpdateVmSharedFolderMountedRequest
- type UpdateVmSharedFolderMountedResponse
- type VmwareFusionError
Constants ¶
View Source
const ( DefaultHost = "127.0.0.1" DefaultPort = 8697 )
View Source
const ( VMWareRestContentType string = "application/vnd.vmware.vmw.rest-v1+json" ApplicationJSONContentType string = "application/json" )
View Source
const ( VMWareAPI_GetAllVirtualNetworks = "/vmnet" VMWareAPI_GetAllMacToIpSettingsForDhcpService = "/vmnet/{vmnet}/mactoip" VMWareAPI_GetAllPortForwardings = "/vmnet/{vmnet}/portforward" VMWareAPI_UpdateMacToIpBinding = "/vmnet/{vmnet}/mactoip/{mac}" VMWareAPI_UpdatePortForwarding = "/vmnet/{vmnet}/portforward/{protocol}/{port}" VMWareAPI_CreateVirtualNetwork = "/vmnets" VMWareAPI_DeletePortForwarding = "/vmnet/{vmnet}/portforward/{protocol}/{port}" VMWareAPI_GetVmList = "/vms" VMWareAPI_GetVm = "/vms/{id}" VMWareAPI_GetVmConfigParams = "/vms/{id}/params/{name}" VMWareAPI_GetVmRestrictionsInformation = "/vms/{id}/restrictions" VMWareAPI_UpdateVmSetting = "/vms/{id}" VMWareAPI_UpdateVmConfigParams = "/vms/{id}/params" VMWareAPI_CreateVmCopy = "/vms" VMWareAPI_RegisterVmToVmLibrary = "/vms/registration" VMWareAPI_DeleteVm = "/vms/{id}" VMWareAPI_GetVmIpAddress = "/vms/{id}/ip" VMWareAPI_GetAllVmNetworkAdapters = "/vms/{id}/nic" VMWareAPI_GetIpStackConfigurationOfAllNics = "/vms/{id}/nicips" VMWareAPI_UpdateVmNetworkAdapter = "/vms/{id}/nic/{index}" VMWareAPI_CreateVmNetworkAdapter = "/vms/{id}/nic" VMWareAPI_DeleteVmNetworkAdapter = "/vms/{id}/nic/{index}" VMWareAPI_GetVmPowerState = "/vms/{id}/power" VMWareAPI_ChangeVmPowerState = "/vms/{id}/power" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeVmPowerStateRequest ¶
type ChangeVmPowerStateRequest struct { }
type ChangeVmPowerStateResponse ¶
type ChangeVmPowerStateResponse struct {
PowerState string `json:"power_state"`
}
type Client ¶
type Client struct { Client *resty.Client BaseURL *url.URL Username string Password string Insecure bool }
Client to invoke VMWare Fusion RESTful API.
func (*Client) GetVm ¶
func (c *Client) GetVm(request GetVmSettingInformationRequest, params Params) (*GetVmSettingInformationResponse, *VmwareFusionError)
func (*Client) GetVmList ¶
func (c *Client) GetVmList(request GetVmListRequest, params Params) (*GetVmListResponse, *VmwareFusionError)
type CreateVmCopyRequest ¶
type CreateVmCopyResponse ¶
type DeletePortForwardingRequest ¶
type DeletePortForwardingRequest struct { }
type DeletePortForwardingResponse ¶
type DeletePortForwardingResponse struct { }
type DeleteSharedFolderRequest ¶
type DeleteSharedFolderRequest struct { }
type DeleteSharedFolderResponse ¶
type DeleteSharedFolderResponse struct { }
type DeleteVmNetworkAdapterRequest ¶
type DeleteVmNetworkAdapterRequest struct { }
type DeleteVmNetworkAdapterResponse ¶
type DeleteVmNetworkAdapterResponse struct { }
type DeleteVmRequest ¶
type DeleteVmRequest struct { }
type DeleteVmResponse ¶
type DeleteVmResponse struct { }
type GetIpStackConfigurationOfAllNics ¶
type GetIpStackConfigurationOfAllNics struct { Nics struct { Mac string `json:"mac"` Ip []string `json:"ip"` Dns struct { Hostname string `json:"hostname"` Domainname string `json:"domainname"` Server []string `json:"server"` Search []string `json:"search"` } `json:"dns"` Wins struct { Primary string `json:"primary"` Secondary string `json:"secondary"` } `json:"wins"` Dhcp4 struct { Enabled bool `json:"enabled"` Setting string `json:"setting"` } `json:"dhcp4"` Dhcp6 struct { Enabled bool `json:"enabled"` Setting string `json:"setting"` } `json:"dhcp6"` } `json:"nics"` Routes []struct { Dest string `json:"dest"` Prefix int `json:"prefix"` Nexthop string `json:"nexthop"` Interface int `json:"interface"` Type int `json:"type"` Metric int `json:"metric"` } `json:"routes"` Dns struct { Hostname string `json:"hostname"` Domainname string `json:"domainname"` Server []string `json:"server"` Search []string `json:"search"` } `json:"dns"` Wins struct { Primary string `json:"primary"` Secondary string `json:"secondary"` } `json:"wins"` DhcpV4 struct { Enabled bool `json:"enabled"` Setting string `json:"setting"` } `json:"dhcpv4"` DhcpV6 struct { Enabled bool `json:"enabled"` Setting string `json:"setting"` } `json:"dhcpv6"` }
type GetVmIpAddressResponse ¶
type GetVmIpAddressResponse struct {
Ip string `json:"ip"`
}
type GetVmListRequest ¶
type GetVmListRequest struct { }
type GetVmListResponse ¶
type GetVmPowerStateResponse ¶
type GetVmPowerStateResponse struct {
PowerState string `json:"power_state"`
}
type GetVmRestrictionsInformationResponse ¶
type GetVmRestrictionsInformationResponse struct { Id string `json:"id"` ManagedOrg string `json:"managedOrg"` IntegrityConstraint string `json:"integrityconstraint"` Cpu struct { Processors int `json:"processors"` } `json:"cpu"` Memory int `json:"memory"` ApplianceView struct { Author string `json:"author"` Version string `json:"version"` Port int `json:"port"` ShowAtPowerOn string `json:"showAtPowerOn"` } `json:"applianceView"` CddvdList struct { Num int `json:"num"` Devices []struct { Index int `json:"index"` StartConnected string `json:"startConnected"` ConnectionStatus int `json:"connectionStatus"` DevicePath string `json:"devicePath"` } `json:"devices"` } `json:"cddvdList"` FloopyList struct { Num int `json:"num"` Devices []struct { Index int `json:"index"` StartConnected string `json:"startConnected"` ConnectionStatus int `json:"connectionStatus"` DevicePath string `json:"devicePath"` } `json:"devices"` } `json:"floopyList"` FirewareType int `json:"firewareType"` GuestIsolation struct { CopyDisabled string `json:"copyDisabled"` DndDisabled string `json:"dndDisabled"` HgfsDisabled string `json:"hgfsDisabled"` PasteDisabled string `json:"pasteDisabled"` } `json:"guestIsolation"` NicList struct { Num int `json:"num"` Nics []struct { Index int `json:"index"` Type string `json:"type"` VmNet string `json:"vmnet"` MacAddress string `json:"macAddress"` } `json:"nics"` } `json:"niclist"` ParallelPortList struct { Num int `json:"num"` Devices []struct { Index int `json:"index"` StartConnected string `json:"startConnected"` ConnectionStatus int `json:"connectionStatus"` DevicePath string `json:"devicePath"` } `json:"devices"` } `json:"parallelPortList"` SerialPortList struct { Num int `json:"num"` Devices []struct { Index int `json:"index"` StartConnected string `json:"startConnected"` ConnectionStatus int `json:"connectionStatus"` DevicePath string `json:"devicePath"` } `json:"devices"` } `json:"serialPortList"` UsbList struct { Num int `json:"num"` UsbDevices []struct { Index int `json:"index"` Connected string `json:"connected"` BackingInfo string `json:"backingInfo"` BackingType int `json:"BackingType"` } `json:"usbDevices"` } `json:"usbList"` RemoteVNC struct { VNCEnabled string `json:"VNCEnabled"` VNCPort int `json:"VNCPort"` } `json:"remoteVNC"` }
type GetVmSettingInformationRequest ¶
type GetVmSettingInformationRequest struct { }
type MountVmNewSharedFolderRequest ¶
type MountVmNewSharedFolderRequest struct {}
type UpdateMacToIpBindingRequest ¶
type UpdateMacToIpBindingRequest struct {
IP string `json:"IP"`
}
type UpdatePortForwardingResponse ¶
type UpdatePortForwardingResponse = VmwareFusionError
type UpdateVmConfigParamsResponse ¶
type UpdateVmConfigParamsResponse = VmwareFusionError
type UpdateVmSettingRequest ¶
type UpdateVmSettingResponse ¶
type UpdateVmSharedFolderMountedRequest ¶
type UpdateVmSharedFolderMountedRequest struct {}
type VmwareFusionError ¶
func FromRawError ¶
func FromRawError(err error) VmwareFusionError
func SendRequest ¶
Click to show internal directories.
Click to hide internal directories.