Develop for XenServer

Class: tunnel

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: add_to_other_config

Overview:

Add the given key-value pair to the other_config field of the given tunnel.

Signature:

void add_to_other_config (session ref session_ref, tunnel ref self, string key, string value)
<!--NeedCopy-->

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: add_to_status

Overview:

Add the given key-value 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)
<!--NeedCopy-->

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)
<!--NeedCopy-->

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)
<!--NeedCopy-->

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: get_access_PIF

Overview:

Get the access_PIF field of the given tunnel.

Signature:

PIF ref get_access_PIF (session ref session_ref, tunnel ref self)
<!--NeedCopy-->

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: get_all

Overview:

Return a list of all the tunnels known to the system.

Signature:

tunnel ref set get_all (session ref session_ref)
<!--NeedCopy-->

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: get_all_records

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)
<!--NeedCopy-->

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: get_by_uuid

Overview:

Get a reference to the tunnel instance with the specified UUID.

Signature:

tunnel ref get_by_uuid (session ref session_ref, string uuid)
<!--NeedCopy-->

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: get_other_config

Overview:

Get the other_config field of the given tunnel.

Signature:

(string -> string) map get_other_config (session ref session_ref, tunnel ref self)
<!--NeedCopy-->

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: get_protocol

Overview:

Get the protocol field of the given tunnel.

Signature:

tunnel_protocol get_protocol (session ref session_ref, tunnel ref self)
<!--NeedCopy-->

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: get_record

Overview:

Get a record containing the current state of the given tunnel.

Signature:

tunnel record get_record (session ref session_ref, tunnel ref self)
<!--NeedCopy-->

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: get_status

Overview:

Get the status field of the given tunnel.

Signature:

(string -> string) map get_status (session ref session_ref, tunnel ref self)
<!--NeedCopy-->

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: get_transport_PIF

Overview:

Get the transport_PIF field of the given tunnel.

Signature:

PIF ref get_transport_PIF (session ref session_ref, tunnel ref self)
<!--NeedCopy-->

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: get_uuid

Overview:

Get the uuid field of the given tunnel.

Signature:

string get_uuid (session ref session_ref, tunnel ref self)
<!--NeedCopy-->

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: remove_from_other_config

Overview:

Remove the given key and its corresponding value from the other_config 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)
<!--NeedCopy-->

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: remove_from_status

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)
<!--NeedCopy-->

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: set_other_config

Overview:

Set the other_config field of the given tunnel.

Signature:

void set_other_config (session ref session_ref, tunnel ref self, (string -> string) map value)
<!--NeedCopy-->

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: set_protocol

Overview:

Set the protocol field of the given tunnel.

Signature:

void set_protocol (session ref session_ref, tunnel ref self, tunnel_protocol value)
<!--NeedCopy-->

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: set_status

Overview:

Set the status field of the given tunnel.

Signature:

void set_status (session ref session_ref, tunnel ref self, (string -> string) map value)
<!--NeedCopy-->

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