Develop for XenServer

Class: network_sriov

network-sriov which connects logical pif and physical pif

Fields for class: network_sriov

Field Type Qualifier Description
configuration_mode sriov_configuration_mode RO/runtime The mode for configure network sriov
logical_PIF PIF ref RO/constructor The logical PIF to connect to the SR-IOV network after enable SR-IOV on the physical PIF
physical_PIF PIF ref RO/constructor The PIF that has SR-IOV enabled
requires_reboot bool RO/runtime Indicates whether the host need to be rebooted before SR-IOV is enabled on the physical PIF
uuid string RO/runtime Unique identifier/object reference

RPCs associated with class: network_sriov

RPC name: create

Overview:

Enable SR-IOV on the specific PIF. It will create a network-sriov based on the specific PIF and automatically create a logical PIF to connect the specific network.

Signature:

network_sriov ref create (session ref session_ref, PIF ref pif, network ref network)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
PIF ref pif PIF on which to enable SR-IOV
network ref network Network to connect SR-IOV virtual functions with VM VIFs

Minimum Role: pool-operator

Return Type: network_sriov ref

The reference of the created network_sriov object

RPC name: destroy

Overview:

Disable SR-IOV on the specific PIF. It will destroy the network-sriov and the logical PIF accordingly.

Signature:

void destroy (session ref session_ref, network_sriov ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
network_sriov ref self SRIOV to destroy

Minimum Role: pool-operator

Return Type: void

RPC name: get_all

Overview:

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

Signature:

network_sriov 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: network_sriov ref set

references to all objects

RPC name: get_all_records

Overview:

Return a map of network_sriov references to network_sriov records for all network_sriovs known to the system.

Signature:

(network_sriov ref -> network_sriov 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: (network_sriov ref -> network_sriov record) map

records of all objects

RPC name: get_by_uuid

Overview:

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

Signature:

network_sriov 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: network_sriov ref

reference to the object

RPC name: get_configuration_mode

Overview:

Get the configuration_mode field of the given network_sriov.

Signature:

sriov_configuration_mode get_configuration_mode (session ref session_ref, network_sriov ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
network_sriov ref self reference to the object

Minimum Role: read-only

Return Type: sriov_configuration_mode

value of the field

RPC name: get_logical_PIF

Overview:

Get the logical_PIF field of the given network_sriov.

Signature:

PIF ref get_logical_PIF (session ref session_ref, network_sriov ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
network_sriov ref self reference to the object

Minimum Role: read-only

Return Type: PIF ref

value of the field

RPC name: get_physical_PIF

Overview:

Get the physical_PIF field of the given network_sriov.

Signature:

PIF ref get_physical_PIF (session ref session_ref, network_sriov ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
network_sriov ref self reference to the object

Minimum Role: read-only

Return Type: PIF ref

value of the field

RPC name: get_record

Overview:

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

Signature:

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

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
network_sriov ref self reference to the object

Minimum Role: read-only

Return Type: network_sriov record

all fields from the object

RPC name: get_remaining_capacity

Overview:

Get the number of free SR-IOV VFs on the associated PIF

Signature:

int get_remaining_capacity (session ref session_ref, network_sriov ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
network_sriov ref self the NETWORK_SRIOV object

Minimum Role: read-only

Return Type: int

The number of free SR-IOV VFs on the associated PIF

RPC name: get_requires_reboot

Overview:

Get the requires_reboot field of the given network_sriov.

Signature:

bool get_requires_reboot (session ref session_ref, network_sriov ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
network_sriov ref self reference to the object

Minimum Role: read-only

Return Type: bool

value of the field

RPC name: get_uuid

Overview:

Get the uuid field of the given network_sriov.

Signature:

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

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
network_sriov ref self reference to the object

Minimum Role: read-only

Return Type: string

value of the field