Skip to content

Fred78290/vmrest-go-client

Repository files navigation

All buildsQuality Gate Status Licence

Go API client for vmrest

vmrest 1.3.0 build-20800274

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

  • API version: 1.3.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.GoClientCodegen

Installation

go get github.com/Fred78290/vmrest-go-client

Documentation for API Endpoints

Class Method HTTP request Description
HostNetworksManagementApi CreateNetwork Post /vmnets Creates a virtual network
HostNetworksManagementApi DeletePortforward Delete /vmnet/{vmnet}/portforward/{protocol}/{port} Deletes port forwarding
HostNetworksManagementApi GetAllNetworks Get /vmnet Returns all virtual networks
HostNetworksManagementApi GetMACToIPs Get /vmnet/{vmnet}/mactoip Returns all MAC-to-IP settings for DHCP service
HostNetworksManagementApi GetPortforwards Get /vmnet/{vmnet}/portforward Returns all port forwardings
HostNetworksManagementApi UpdateMacToIP Put /vmnet/{vmnet}/mactoip/{mac} Updates the MAC-to-IP binding
HostNetworksManagementApi UpdatePortforward Put /vmnet/{vmnet}/portforward/{protocol}/{port} Updates port forwarding
VMManagementApi ConfigVMParams Put /vms/{id}/configparams update the vm config params
VMManagementApi CreateVM Post /vms Creates a copy of the VM
VMManagementApi DeleteVM Delete /vms/{id} Deletes a VM
VMManagementApi GetAllVMs Get /vms Returns a list of VM IDs and paths for all VMs
VMManagementApi GetVM Get /vms/{id} Returns the VM setting information of a VM
VMManagementApi GetVMParams Get /vms/{id}/params/{name} Get the VM config params
VMManagementApi GetVMRestrictions Get /vms/{id}/restrictions Returns the restrictions information of the VM
VMManagementApi RegisterVM Post /vms/registration Register VM to VM Library
VMManagementApi UpdateVM Put /vms/{id} Updates the VM settings
VMNetworkAdaptersManagementApi CreateNICDevice Post /vms/{id}/nic Creates a network adapter in the VM
VMNetworkAdaptersManagementApi DeleteNICDevice Delete /vms/{id}/nic/{index} Deletes a VM network adapter
VMNetworkAdaptersManagementApi GetAllNICDevices Get /vms/{id}/nic Returns all network adapters in the VM
VMNetworkAdaptersManagementApi GetIPAddress Get /vms/{id}/ip Returns the IP address of a VM
VMNetworkAdaptersManagementApi GetNicInfo Get /vms/{id}/nicips Returns the IP stack configuration of all NICs of a VM
VMNetworkAdaptersManagementApi UpdateNICDevice Put /vms/{id}/nic/{index} Updates a network adapter in the VM
VMPowerManagementApi ChangePowerState Put /vms/{id}/power Changes the VM power state
VMPowerManagementApi GetPowerState Get /vms/{id}/power Returns the power state of the VM
VMSharedFoldersManagementApi CreateSharedFolder Post /vms/{id}/sharedfolders Mounts a new shared folder in the VM
VMSharedFoldersManagementApi DeleteSharedFolder Delete /vms/{id}/sharedfolders/{folder id} Deletes a shared folder
VMSharedFoldersManagementApi GetAllSharedFolders Get /vms/{id}/sharedfolders Returns all shared folders mounted in the VM
VMSharedFoldersManagementApi UpdataSharedFolder Put /vms/{id}/sharedfolders/{folder id} Updates a shared folder mounted in the VM

Documentation For Models

Example

import (
  "github.com/Fred78290/vmrest-go-client/client"
)

func main() {
  cfg := client.NewConfiguration("username", "password", 8697, true)

  if client, err := client.NewAPIClient(cfg); err == nil {
    vms, _ := client.GetAllVMs()
  }
}