Class: tunnel
A tunnel for network traffic
Published in: | XenServer 5.6 FP1 (cowley) | A tunnel for network traffic |
Enums
tunnel_protocol
Values: | gre | GRE protocol |
| vxlan | VxLAN Protocol |
Fields
PIF ref
access_PIF
[RO/constructor]
The interface through which the tunnel is accessed
Default value: | Null |
Published in: | XenServer 5.6 FP1 (cowley) | The interface through which the tunnel is accessed |
(string → string) map
other_config
[RW]
Additional configuration
Default value: | {} |
Published in: | XenServer 5.6 FP1 (cowley) | Additional configuration |
enum tunnel_protocol
protocol
[RW]
The protocol used for tunneling (either GRE or VxLAN)
Default value: | gre |
Published in: | XAPI 1.250.0 (1.250.0) | Add protocol field to tunnel |
(string → string) map
status
[RW]
Status information about the tunnel
Default value: | {"active" -> "false"} |
Published in: | XenServer 5.6 FP1 (cowley) | Status information about the tunnel |
PIF ref
transport_PIF
[RO/constructor]
The interface used by the tunnel
Default value: | Null |
Published in: | XenServer 5.6 FP1 (cowley) | The interface used by the tunnel |
string
uuid
[RO/runtime]
Unique identifier/object reference
Published in: | XenServer 5.6 FP1 (cowley) | Unique identifier/object reference |
Messages
void
add_to_other_config
(session ref, tunnel ref, string, string)
Add the given key-value pair to the other_config field of the given tunnel.
Parameters: | session ref session_id | 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 |
Published in: | XenServer 5.6 FP1 (cowley) | Additional configuration |
void
add_to_status
(session ref, tunnel ref, string, string)
Add the given key-value pair to the status field of the given tunnel.
Parameters: | session ref session_id | 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 |
Published in: | XenServer 5.6 FP1 (cowley) | Status information about the tunnel |
tunnel ref
create
(session ref, PIF ref, network ref, enum tunnel_protocol)
Create a tunnel
Parameters: | session ref session_id | Reference to a valid session |
| PIF ref transport_PIF | PIF which receives the tagged traffic |
| network ref network | Network to receive the tunnelled traffic |
| enum tunnel_protocol protocol | Protocol used for the tunnel (GRE or VxLAN) |
Minimum role: | pool-operator |
Result: | The reference of the created tunnel object |
Errors: | OPENVSWITCH_NOT_ACTIVE | This operation needs the OpenVSwitch networking backend to be enabled on all hosts in the pool. |
| TRANSPORT_PIF_NOT_CONFIGURED | The tunnel transport PIF has no IP configuration set. |
| IS_TUNNEL_ACCESS_PIF | Cannot create a VLAN or tunnel on top of a tunnel access PIF - use the underlying transport PIF instead. |
Published in: | XenServer 5.6 FP1 (cowley) | Create a tunnel |
void
destroy
(session ref, tunnel ref)
Destroy a tunnel
Parameters: | session ref session_id | Reference to a valid session |
| tunnel ref self | tunnel to destroy |
Minimum role: | pool-operator |
Published in: | XenServer 5.6 FP1 (cowley) | Destroy a tunnel |
PIF ref
get_access_PIF
(session ref, tunnel ref)
Get the access_PIF field of the given tunnel.
Parameters: | session ref session_id | Reference to a valid session |
| tunnel ref self | reference to the object |
Minimum role: | read-only |
Result: | value of the field |
Published in: | XenServer 5.6 FP1 (cowley) | The interface through which the tunnel is accessed |
tunnel ref set
get_all
(session ref)
Return a list of all the tunnels known to the system.
Parameters: | session ref session_id | Reference to a valid session |
Minimum role: | read-only |
Result: | references to all objects |
Published in: | XenServer 5.6 FP1 (cowley) | A tunnel for network traffic |
(tunnel ref → tunnel record) map
get_all_records
(session ref)
Return a map of tunnel references to tunnel records for all tunnels known to the system.
Parameters: | session ref session_id | Reference to a valid session |
Minimum role: | read-only |
Result: | records of all objects |
Published in: | XenServer 5.6 FP1 (cowley) | A tunnel for network traffic |
tunnel ref
get_by_uuid
(session ref, string)
Get a reference to the tunnel instance with the specified UUID.
Parameters: | session ref session_id | Reference to a valid session |
| string uuid | UUID of object to return |
Minimum role: | read-only |
Result: | reference to the object |
Published in: | XenServer 5.6 FP1 (cowley) | A tunnel for network traffic |
(string → string) map
get_other_config
(session ref, tunnel ref)
Get the other_config field of the given tunnel.
Parameters: | session ref session_id | Reference to a valid session |
| tunnel ref self | reference to the object |
Minimum role: | read-only |
Result: | value of the field |
Published in: | XenServer 5.6 FP1 (cowley) | Additional configuration |
enum tunnel_protocol
get_protocol
(session ref, tunnel ref)
Get the protocol field of the given tunnel.
Parameters: | session ref session_id | Reference to a valid session |
| tunnel ref self | reference to the object |
Minimum role: | read-only |
Result: | value of the field |
Published in: | XAPI 1.250.0 (1.250.0) | Add protocol field to tunnel |
tunnel record
get_record
(session ref, tunnel ref)
Get a record containing the current state of the given tunnel.
Parameters: | session ref session_id | Reference to a valid session |
| tunnel ref self | reference to the object |
Minimum role: | read-only |
Result: | all fields from the object |
Published in: | XenServer 5.6 FP1 (cowley) | A tunnel for network traffic |
(string → string) map
get_status
(session ref, tunnel ref)
Get the status field of the given tunnel.
Parameters: | session ref session_id | Reference to a valid session |
| tunnel ref self | reference to the object |
Minimum role: | read-only |
Result: | value of the field |
Published in: | XenServer 5.6 FP1 (cowley) | Status information about the tunnel |
PIF ref
get_transport_PIF
(session ref, tunnel ref)
Get the transport_PIF field of the given tunnel.
Parameters: | session ref session_id | Reference to a valid session |
| tunnel ref self | reference to the object |
Minimum role: | read-only |
Result: | value of the field |
Published in: | XenServer 5.6 FP1 (cowley) | The interface used by the tunnel |
string
get_uuid
(session ref, tunnel ref)
Get the uuid field of the given tunnel.
Parameters: | session ref session_id | Reference to a valid session |
| tunnel ref self | reference to the object |
Minimum role: | read-only |
Result: | value of the field |
Published in: | XenServer 5.6 FP1 (cowley) | Unique identifier/object reference |
void
remove_from_other_config
(session ref, tunnel ref, string)
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.
Parameters: | session ref session_id | Reference to a valid session |
| tunnel ref self | reference to the object |
| string key | Key to remove |
Minimum role: | pool-operator |
Published in: | XenServer 5.6 FP1 (cowley) | Additional configuration |
void
remove_from_status
(session ref, tunnel ref, string)
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.
Parameters: | session ref session_id | Reference to a valid session |
| tunnel ref self | reference to the object |
| string key | Key to remove |
Minimum role: | pool-operator |
Published in: | XenServer 5.6 FP1 (cowley) | Status information about the tunnel |
void
set_other_config
(session ref, tunnel ref, (string → string) map)
Set the other_config field of the given tunnel.
Parameters: | session ref session_id | Reference to a valid session |
| tunnel ref self | reference to the object |
| (string → string) map value | New value to set |
Minimum role: | pool-operator |
Published in: | XenServer 5.6 FP1 (cowley) | Additional configuration |
void
set_protocol
(session ref, tunnel ref, enum tunnel_protocol)
Set the protocol field of the given tunnel.
Parameters: | session ref session_id | Reference to a valid session |
| tunnel ref self | reference to the object |
| enum tunnel_protocol value | New value to set |
Minimum role: | pool-operator |
Published in: | XAPI 1.250.0 (1.250.0) | Add protocol field to tunnel |
void
set_status
(session ref, tunnel ref, (string → string) map)
Set the status field of the given tunnel.
Parameters: | session ref session_id | Reference to a valid session |
| tunnel ref self | reference to the object |
| (string → string) map value | New value to set |
Minimum role: | pool-operator |
Published in: | XenServer 5.6 FP1 (cowley) | Status information about the tunnel |