Package com.xensource.xenapi
Class USBGroup
java.lang.Object
com.xensource.xenapi.XenAPIObject
com.xensource.xenapi.USBGroup
A group of compatible USBs across the resource pool
First published in XenServer 7.3.
- Author:
- Cloud Software Group, Inc.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Represents all the fields in a USBGroup -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToOtherConfig
(Connection c, String key, String value) Add the given key-value pair to the other_config field of the given USB_group.static USBGroup
Minimum allowed role: pool-admin First published in XenServer 7.3.static Task
createAsync
(Connection c, String nameLabel, String nameDescription, Map<String, String> otherConfig) Minimum allowed role: pool-admin First published in XenServer 7.3.void
Minimum allowed role: pool-admin First published in XenServer 7.3.Minimum allowed role: pool-admin First published in XenServer 7.3.boolean
If obj is a USBGroup, compares XenAPI references for equality.getAll
(Connection c) Return a list of all the USB_groups known to the system.static Map<USBGroup,
USBGroup.Record> Return a map of USB_group references to USB_group records for all USB_groups known to the system.getByNameLabel
(Connection c, String label) Get all the USB_group instances with the given label.static USBGroup
getByUuid
(Connection c, String uuid) Get a reference to the USB_group instance with the specified UUID.Get the name/description field of the given USB_group.Get the name/label field of the given USB_group.Get the other_config field of the given USB_group.Get the PUSBs field of the given USB_group.Get a record containing the current state of the given USB_group.Get the uuid field of the given USB_group.Get the VUSBs field of the given USB_group.int
hashCode()
void
removeFromOtherConfig
(Connection c, String key) Remove the given key and its corresponding value from the other_config field of the given USB_group.void
setNameDescription
(Connection c, String description) Set the name/description field of the given USB_group.void
setNameLabel
(Connection c, String label) Set the name/label field of the given USB_group.void
setOtherConfig
(Connection c, Map<String, String> otherConfig) Set the other_config field of the given USB_group.Methods inherited from class com.xensource.xenapi.XenAPIObject
isNull
-
Field Details
-
ref
The XenAPI reference (OpaqueRef) to this object.
-
-
Method Details
-
toWireString
- Specified by:
toWireString
in classXenAPIObject
- Returns:
- The XenAPI reference (OpaqueRef) to this object.
-
equals
If obj is a USBGroup, compares XenAPI references for equality. -
hashCode
public int hashCode() -
getRecord
public USBGroup.Record getRecord(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get a record containing the current state of the given USB_group. Minimum allowed role: read-only First published in XenServer 7.3.- Parameters:
c
- The connection the call is made on- Returns:
- all fields from the object
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getByUuid
public static USBGroup getByUuid(Connection c, String uuid) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get a reference to the USB_group instance with the specified UUID. Minimum allowed role: read-only First published in XenServer 7.3.- Parameters:
c
- The connection the call is made onuuid
- UUID of object to return- Returns:
- reference to the object
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getByNameLabel
public static Set<USBGroup> getByNameLabel(Connection c, String label) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get all the USB_group instances with the given label. Minimum allowed role: read-only First published in XenServer 7.3.- Parameters:
c
- The connection the call is made onlabel
- label of object to return- Returns:
- references to objects with matching names
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getUuid
public String getUuid(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get the uuid field of the given USB_group. Minimum allowed role: read-only First published in XenServer 7.3.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getNameLabel
public String getNameLabel(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get the name/label field of the given USB_group. Minimum allowed role: read-only First published in XenServer 7.3.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getNameDescription
public String getNameDescription(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get the name/description field of the given USB_group. Minimum allowed role: read-only First published in XenServer 7.3.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getPUSBs
public Set<PUSB> getPUSBs(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get the PUSBs field of the given USB_group. Minimum allowed role: read-only First published in XenServer 7.3.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getVUSBs
public Set<VUSB> getVUSBs(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get the VUSBs field of the given USB_group. Minimum allowed role: read-only First published in XenServer 7.3.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getOtherConfig
public Map<String,String> getOtherConfig(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get the other_config field of the given USB_group. Minimum allowed role: read-only First published in XenServer 7.3.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
setNameLabel
public void setNameLabel(Connection c, String label) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Set the name/label field of the given USB_group. Minimum allowed role: pool-admin First published in XenServer 7.3.- Parameters:
c
- The connection the call is made onlabel
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
setNameDescription
public void setNameDescription(Connection c, String description) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Set the name/description field of the given USB_group. Minimum allowed role: pool-admin First published in XenServer 7.3.- Parameters:
c
- The connection the call is made ondescription
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
setOtherConfig
public void setOtherConfig(Connection c, Map<String, String> otherConfig) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcExceptionSet the other_config field of the given USB_group. Minimum allowed role: pool-admin First published in XenServer 7.3.- Parameters:
c
- The connection the call is made onotherConfig
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
addToOtherConfig
public void addToOtherConfig(Connection c, String key, String value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Add the given key-value pair to the other_config field of the given USB_group. Minimum allowed role: pool-admin First published in XenServer 7.3.- Parameters:
c
- The connection the call is made onkey
- Key to addvalue
- Value to add- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
removeFromOtherConfig
public void removeFromOtherConfig(Connection c, String key) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Remove the given key and its corresponding value from the other_config field of the given USB_group. If the key is not in that Map, then do nothing. Minimum allowed role: pool-admin First published in XenServer 7.3.- Parameters:
c
- The connection the call is made onkey
- Key to remove- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
createAsync
public static Task createAsync(Connection c, String nameLabel, String nameDescription, Map<String, String> otherConfig) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcExceptionMinimum allowed role: pool-admin First published in XenServer 7.3.- Parameters:
c
- The connection the call is made onnameLabel
- No descriptionnameDescription
- No descriptionotherConfig
- No description- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
create
public static USBGroup create(Connection c, String nameLabel, String nameDescription, Map<String, String> otherConfig) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcExceptionMinimum allowed role: pool-admin First published in XenServer 7.3.- Parameters:
c
- The connection the call is made onnameLabel
- No descriptionnameDescription
- No descriptionotherConfig
- No description- Returns:
- USBGroup
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
destroyAsync
public Task destroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Minimum allowed role: pool-admin First published in XenServer 7.3.- Parameters:
c
- The connection the call is made on- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
destroy
public void destroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Minimum allowed role: pool-admin First published in XenServer 7.3.- Parameters:
c
- The connection the call is made on- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getAll
public static Set<USBGroup> getAll(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Return a list of all the USB_groups known to the system. Minimum allowed role: read-only First published in XenServer 7.3.- Parameters:
c
- The connection the call is made on- Returns:
- references to all objects
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getAllRecords
public static Map<USBGroup,USBGroup.Record> getAllRecords(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Return a map of USB_group references to USB_group records for all USB_groups known to the system. Minimum allowed role: read-only First published in XenServer 7.3.- Parameters:
c
- The connection the call is made on- Returns:
- records of all objects
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-