Class: tunnel

Last published : Oct 01, 2026
A tunnel for network traffic

Fields for class: tunnel

Field Type Qualifier Description
access_PIF PIF ref RO/constructor The interface through which the tunnel is accessed
other_config (string -> string) map RW Additional configuration
protocol tunnel_protocol RW The protocol used for tunneling (either GRE or VxLAN)
status (string -> string) map RW Status information about the tunnel
transport_PIF PIF ref RO/constructor The interface used by the tunnel
uuid string RO/runtime Unique identifier/object reference

RPCs associated with class: tunnel

RPC name: addtootherconfig

Overview:
Add the given keyvalue pair to the otherconfig field of the given tunnel.
Signature:
void add_to_other_config (session ref session_ref, tunnel ref self, string key, string value)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
tunnel ref self reference to the object
string key Key to add
string value Value to add
Minimum Role: pool-operator
Return Type: void

RPC name: addtostatus

Overview:
Add the given keyvalue pair to the status field of the given tunnel.
Signature:
void add_to_status (session ref session_ref, tunnel ref self, string key, string value)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
tunnel ref self reference to the object
string key Key to add
string value Value to add
Minimum Role: pool-operator
Return Type: void

RPC name: create

Overview:
Create a tunnel
Signature:
tunnel ref create (session ref session_ref, PIF ref transport_PIF, network ref network, tunnel_protocol protocol)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
PIF ref transport_PIF PIF which receives the tagged traffic
network ref network Network to receive the tunnelled traffic
tunnel_protocol protocol Protocol used for the tunnel (GRE or VxLAN)
Minimum Role: pool-operator
Return Type: tunnel ref
The reference of the created tunnel object
Possible Error Codes: OPENVSWITCH_NOT_ACTIVE, TRANSPORT_PIF_NOT_CONFIGURED, IS_TUNNEL_ACCESS_PIF

RPC name: destroy

Overview:
Destroy a tunnel
Signature:
void destroy (session ref session_ref, tunnel ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
tunnel ref self tunnel to destroy
Minimum Role: pool-operator
Return Type: void

RPC name: getaccessPIF

Overview:
Get the accessPIF field of the given tunnel.
Signature:
PIF ref get_access_PIF (session ref session_ref, tunnel ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
tunnel ref self reference to the object
Minimum Role: read-only
Return Type: PIF ref
value of the field

RPC name: getall

Overview:
Return a list of all the tunnels known to the system.
Signature:
tunnel ref set get_all (session ref session_ref)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
Minimum Role: read-only
Return Type: tunnel ref set
references to all objects

RPC name: getallrecords

Overview:
Return a map of tunnel references to tunnel records for all tunnels known to the system.
Signature:
(tunnel ref -> tunnel record) map get_all_records (session ref session_ref)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
Minimum Role: read-only
Return Type: (tunnel ref -> tunnel record) map
records of all objects

RPC name: getbyuuid

Overview:
Get a reference to the tunnel instance with the specified UUID.
Signature:
tunnel ref get_by_uuid (session ref session_ref, string uuid)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
string uuid UUID of object to return
Minimum Role: read-only
Return Type: tunnel ref
reference to the object

RPC name: getotherconfig

Overview:
Get the otherconfig field of the given tunnel.
Signature:
(string -> string) map get_other_config (session ref session_ref, tunnel ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
tunnel ref self reference to the object
Minimum Role: read-only
Return Type: (string -> string) map
value of the field

RPC name: getprotocol

Overview:
Get the protocol field of the given tunnel.
Signature:
tunnel_protocol get_protocol (session ref session_ref, tunnel ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
tunnel ref self reference to the object
Minimum Role: read-only
Return Type: tunnel_protocol
value of the field

RPC name: getrecord

Overview:
Get a record containing the current state of the given tunnel.
Signature:
tunnel record get_record (session ref session_ref, tunnel ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
tunnel ref self reference to the object
Minimum Role: read-only
Return Type: tunnel record
all fields from the object

RPC name: getstatus

Overview:
Get the status field of the given tunnel.
Signature:
(string -> string) map get_status (session ref session_ref, tunnel ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
tunnel ref self reference to the object
Minimum Role: read-only
Return Type: (string -> string) map
value of the field

RPC name: gettransportPIF

Overview:
Get the transportPIF field of the given tunnel.
Signature:
PIF ref get_transport_PIF (session ref session_ref, tunnel ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
tunnel ref self reference to the object
Minimum Role: read-only
Return Type: PIF ref
value of the field

RPC name: getuuid

Overview:
Get the uuid field of the given tunnel.
Signature:
string get_uuid (session ref session_ref, tunnel ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
tunnel ref self reference to the object
Minimum Role: read-only
Return Type: string
value of the field

RPC name: removefromotherconfig

Overview:
Remove the given key and its corresponding value from the otherconfig field of the given tunnel. If the key is not in that Map, then do nothing.
Signature:
void remove_from_other_config (session ref session_ref, tunnel ref self, string key)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
tunnel ref self reference to the object
string key Key to remove
Minimum Role: pool-operator
Return Type: void

RPC name: removefromstatus

Overview:
Remove the given key and its corresponding value from the status field of the given tunnel. If the key is not in that Map, then do nothing.
Signature:
void remove_from_status (session ref session_ref, tunnel ref self, string key)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
tunnel ref self reference to the object
string key Key to remove
Minimum Role: pool-operator
Return Type: void

RPC name: setotherconfig

Overview:
Set the otherconfig field of the given tunnel.
Signature:
void set_other_config (session ref session_ref, tunnel ref self, (string -> string) map value)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
tunnel ref self reference to the object
(string -> string) map value New value to set
Minimum Role: pool-operator
Return Type: void

RPC name: setprotocol

Overview:
Set the protocol field of the given tunnel.
Signature:
void set_protocol (session ref session_ref, tunnel ref self, tunnel_protocol value)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
tunnel ref self reference to the object
tunnel_protocol value New value to set
Minimum Role: pool-operator
Return Type: void

RPC name: setstatus

Overview:
Set the status field of the given tunnel.
Signature:
void set_status (session ref session_ref, tunnel ref self, (string -> string) map value)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
tunnel ref self reference to the object
(string -> string) map value New value to set
Minimum Role: pool-operator
Return Type: void