Develop for XenServer

Class: PUSB

A physical USB device

Fields for class: PUSB

Field Type Qualifier Description
description string RO/constructor USB device description
host host ref RO/constructor Physical machine that owns the USB device
other_config (string -> string) map RW additional configuration
passthrough_enabled bool RO/runtime enabled for passthrough
path string RO/constructor port path of USB device
product_desc string RO/constructor product description of the USB device
product_id string RO/constructor product id of the USB device
serial string RO/constructor serial of the USB device
speed float RO/constructor USB device speed
USB_group USB_group ref RO/constructor USB group the PUSB is contained in
uuid string RO/runtime Unique identifier/object reference
vendor_desc string RO/constructor vendor description of the USB device
vendor_id string RO/constructor vendor id of the USB device
version string RO/constructor USB device version

RPCs associated with class: PUSB

RPC name: add_to_other_config

Overview:

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

Signature:

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

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
PUSB ref self reference to the object
string key Key to add
string value Value to add

Minimum Role: pool-admin

Return Type: void

RPC name: get_all

Overview:

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

Signature:

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

references to all objects

RPC name: get_all_records

Overview:

Return a map of PUSB references to PUSB records for all PUSBs known to the system.

Signature:

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

records of all objects

RPC name: get_by_uuid

Overview:

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

Signature:

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

reference to the object

RPC name: get_description

Overview:

Get the description field of the given PUSB.

Signature:

string get_description (session ref session_ref, PUSB ref self)
<!--NeedCopy-->

Arguments:

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

Minimum Role: read-only

Return Type: string

value of the field

RPC name: get_host

Overview:

Get the host field of the given PUSB.

Signature:

host ref get_host (session ref session_ref, PUSB ref self)
<!--NeedCopy-->

Arguments:

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

Minimum Role: read-only

Return Type: host ref

value of the field

RPC name: get_other_config

Overview:

Get the other_config field of the given PUSB.

Signature:

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

Arguments:

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

Minimum Role: read-only

Return Type: (string -> string) map

value of the field

RPC name: get_passthrough_enabled

Overview:

Get the passthrough_enabled field of the given PUSB.

Signature:

bool get_passthrough_enabled (session ref session_ref, PUSB ref self)
<!--NeedCopy-->

Arguments:

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

Minimum Role: read-only

Return Type: bool

value of the field

RPC name: get_path

Overview:

Get the path field of the given PUSB.

Signature:

string get_path (session ref session_ref, PUSB ref self)
<!--NeedCopy-->

Arguments:

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

Minimum Role: read-only

Return Type: string

value of the field

RPC name: get_product_desc

Overview:

Get the product_desc field of the given PUSB.

Signature:

string get_product_desc (session ref session_ref, PUSB ref self)
<!--NeedCopy-->

Arguments:

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

Minimum Role: read-only

Return Type: string

value of the field

RPC name: get_product_id

Overview:

Get the product_id field of the given PUSB.

Signature:

string get_product_id (session ref session_ref, PUSB ref self)
<!--NeedCopy-->

Arguments:

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

Minimum Role: read-only

Return Type: string

value of the field

RPC name: get_record

Overview:

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

Signature:

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

Arguments:

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

Minimum Role: read-only

Return Type: PUSB record

all fields from the object

RPC name: get_serial

Overview:

Get the serial field of the given PUSB.

Signature:

string get_serial (session ref session_ref, PUSB ref self)
<!--NeedCopy-->

Arguments:

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

Minimum Role: read-only

Return Type: string

value of the field

RPC name: get_speed

Overview:

Get the speed field of the given PUSB.

Signature:

float get_speed (session ref session_ref, PUSB ref self)
<!--NeedCopy-->

Arguments:

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

Minimum Role: read-only

Return Type: float

value of the field

RPC name: get_USB_group

Overview:

Get the USB_group field of the given PUSB.

Signature:

USB_group ref get_USB_group (session ref session_ref, PUSB ref self)
<!--NeedCopy-->

Arguments:

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

Minimum Role: read-only

Return Type: USB_group ref

value of the field

RPC name: get_uuid

Overview:

Get the uuid field of the given PUSB.

Signature:

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

Arguments:

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

Minimum Role: read-only

Return Type: string

value of the field

RPC name: get_vendor_desc

Overview:

Get the vendor_desc field of the given PUSB.

Signature:

string get_vendor_desc (session ref session_ref, PUSB ref self)
<!--NeedCopy-->

Arguments:

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

Minimum Role: read-only

Return Type: string

value of the field

RPC name: get_vendor_id

Overview:

Get the vendor_id field of the given PUSB.

Signature:

string get_vendor_id (session ref session_ref, PUSB ref self)
<!--NeedCopy-->

Arguments:

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

Minimum Role: read-only

Return Type: string

value of the field

RPC name: get_version

Overview:

Get the version field of the given PUSB.

Signature:

string get_version (session ref session_ref, PUSB ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
PUSB 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 PUSB. If the key is not in that Map, then do nothing.

Signature:

void remove_from_other_config (session ref session_ref, PUSB ref self, string key)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
PUSB ref self reference to the object
string key Key to remove

Minimum Role: pool-admin

Return Type: void

RPC name: scan

Overview:

Signature:

void scan (session ref session_ref, host ref host)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
host ref host The host

Minimum Role: pool-admin

Return Type: void

RPC name: set_other_config

Overview:

Set the other_config field of the given PUSB.

Signature:

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

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
PUSB ref self reference to the object
(string -> string) map value New value to set

Minimum Role: pool-admin

Return Type: void

RPC name: set_passthrough_enabled

Overview:

Signature:

void set_passthrough_enabled (session ref session_ref, PUSB ref self, bool value)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
PUSB ref self this PUSB
bool value passthrough is enabled when true and disabled with false

Minimum Role: pool-admin

Return Type: void