Skip to content

Latest commit

 

History

History
200 lines (127 loc) · 6.97 KB

File metadata and controls

200 lines (127 loc) · 6.97 KB

\HostNetworksManagementApi

All URIs are relative to http://localhost/api

Method HTTP request Description
CreateNetwork Post /vmnets Creates a virtual network
DeletePortforward Delete /vmnet/{vmnet}/portforward/{protocol}/{port} Deletes port forwarding
GetAllNetworks Get /vmnet Returns all virtual networks
GetMACToIPs Get /vmnet/{vmnet}/mactoip Returns all MAC-to-IP settings for DHCP service
GetPortforwards Get /vmnet/{vmnet}/portforward Returns all port forwardings
UpdateMacToIP Put /vmnet/{vmnet}/mactoip/{mac} Updates the MAC-to-IP binding
UpdatePortforward Put /vmnet/{vmnet}/portforward/{protocol}/{port} Updates port forwarding

CreateNetwork

Network CreateNetwork(ctx, parameters) Creates a virtual network

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
parameters CreateVmnetParameter Host network to be created

Return type

Network

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/vnd.vmware.vmw.rest-v1+json
  • Accept: application/vnd.vmware.vmw.rest-v1+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeletePortforward

DeletePortforward(ctx, vmnet, protocol, port) Deletes port forwarding

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
vmnet string NAT type of virtual network
protocol string Protocol type: tcp, udp
port int32 Host port number

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/vnd.vmware.vmw.rest-v1+json
  • Accept: application/vnd.vmware.vmw.rest-v1+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetAllNetworks

Networks GetAllNetworks(ctx, ) Returns all virtual networks

Required Parameters

This endpoint does not need any parameter.

Return type

Networks

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/vnd.vmware.vmw.rest-v1+json
  • Accept: application/vnd.vmware.vmw.rest-v1+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetMACToIPs

MactoIps GetMACToIPs(ctx, vmnet) Returns all MAC-to-IP settings for DHCP service

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
vmnet string Virtual network that has DHCP enabled

Return type

MactoIps

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/vnd.vmware.vmw.rest-v1+json
  • Accept: application/vnd.vmware.vmw.rest-v1+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetPortforwards

Portforwards GetPortforwards(ctx, vmnet) Returns all port forwardings

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
vmnet string NAT type of virtual network

Return type

Portforwards

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/vnd.vmware.vmw.rest-v1+json
  • Accept: application/vnd.vmware.vmw.rest-v1+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateMacToIP

ErrorModel UpdateMacToIP(ctx, vmnet, mac, parameters) Updates the MAC-to-IP binding

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
vmnet string Virtual network that enabled DHCP
mac string Mac address that want to be mapped with a given IP
parameters MacToIpParameter IP that will be assigned to given Mac address. If empty IP, the original Mac to IP binding will be deleted

Return type

ErrorModel

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/vnd.vmware.vmw.rest-v1+json
  • Accept: application/vnd.vmware.vmw.rest-v1+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdatePortforward

ErrorModel UpdatePortforward(ctx, vmnet, protocol, port, parameters) Updates port forwarding

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
vmnet string NAT type of virtual network
protocol string Protocol type: tcp, udp
port int32 Host port number
parameters PortforwardParameter Guest to forward to

Return type

ErrorModel

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/vnd.vmware.vmw.rest-v1+json
  • Accept: application/vnd.vmware.vmw.rest-v1+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]