Class: PBD
The physical block devices through which hosts access SRs
Published in: | XenServer 4.0 (rio) | The physical block devices through which hosts access SRs |
Fields
bool
currently_attached
[RO/runtime]
is the SR currently attached on this host?
Published in: | XenServer 4.0 (rio) | is the SR currently attached on this host? |
(string → string) map
device_config
[RO/constructor]
a config string to string map that is provided to the host's SR-backend-driver
Published in: | XenServer 4.0 (rio) | a config string to string map that is provided to the host's SR-backend-driver |
host ref
host
[RO/constructor]
physical machine on which the pbd is available
Published in: | XenServer 4.0 (rio) | physical machine on which the pbd is available |
(string → string) map
other_config
[RW]
additional configuration
Default value: | {} |
Published in: | XenServer 4.1 (miami) | additional configuration |
SR ref
SR
[RO/constructor]
the storage repository that the pbd realises
Published in: | XenServer 4.0 (rio) | the storage repository that the pbd realises |
string
uuid
[RO/runtime]
Unique identifier/object reference
Published in: | XenServer 4.0 (rio) | Unique identifier/object reference |
Messages
void
add_to_other_config
(session ref, PBD ref, string, string)
Add the given key-value pair to the other_config field of the given PBD.
Parameters: | session ref session_id | Reference to a valid session |
| PBD ref self | reference to the object |
| string key | Key to add |
| string value | Value to add |
Minimum role: | pool-operator |
Published in: | XenServer 4.1 (miami) | additional configuration |
PBD ref
create
(session ref, PBD record)
Create a new PBD instance, and return its handle.
The constructor args are: host*, SR*, device_config*, other_config (* = non-optional).
Parameters: | session ref session_id | Reference to a valid session |
| PBD record args | All constructor arguments |
Minimum role: | pool-operator |
Result: | reference to the newly created object |
Published in: | XenServer 4.0 (rio) | The physical block devices through which hosts access SRs |
void
destroy
(session ref, PBD ref)
Destroy the specified PBD instance.
Parameters: | session ref session_id | Reference to a valid session |
| PBD ref self | reference to the object |
Minimum role: | pool-operator |
Published in: | XenServer 4.0 (rio) | The physical block devices through which hosts access SRs |
PBD ref set
get_all
(session ref)
Return a list of all the PBDs 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 4.0 (rio) | The physical block devices through which hosts access SRs |
(PBD ref → PBD record) map
get_all_records
(session ref)
Return a map of PBD references to PBD records for all PBDs 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 4.0 (rio) | The physical block devices through which hosts access SRs |
PBD ref
get_by_uuid
(session ref, string)
Get a reference to the PBD 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 4.0 (rio) | The physical block devices through which hosts access SRs |
bool
get_currently_attached
(session ref, PBD ref)
Get the currently_attached field of the given PBD.
Parameters: | session ref session_id | Reference to a valid session |
| PBD ref self | reference to the object |
Minimum role: | read-only |
Result: | value of the field |
Published in: | XenServer 4.0 (rio) | is the SR currently attached on this host? |
(string → string) map
get_device_config
(session ref, PBD ref)
Get the device_config field of the given PBD.
Parameters: | session ref session_id | Reference to a valid session |
| PBD ref self | reference to the object |
Minimum role: | read-only |
Result: | value of the field |
Published in: | XenServer 4.0 (rio) | a config string to string map that is provided to the host's SR-backend-driver |
host ref
get_host
(session ref, PBD ref)
Get the host field of the given PBD.
Parameters: | session ref session_id | Reference to a valid session |
| PBD ref self | reference to the object |
Minimum role: | read-only |
Result: | value of the field |
Published in: | XenServer 4.0 (rio) | physical machine on which the pbd is available |
(string → string) map
get_other_config
(session ref, PBD ref)
Get the other_config field of the given PBD.
Parameters: | session ref session_id | Reference to a valid session |
| PBD ref self | reference to the object |
Minimum role: | read-only |
Result: | value of the field |
Published in: | XenServer 4.1 (miami) | additional configuration |
PBD record
get_record
(session ref, PBD ref)
Get a record containing the current state of the given PBD.
Parameters: | session ref session_id | Reference to a valid session |
| PBD ref self | reference to the object |
Minimum role: | read-only |
Result: | all fields from the object |
Published in: | XenServer 4.0 (rio) | The physical block devices through which hosts access SRs |
SR ref
get_SR
(session ref, PBD ref)
Get the SR field of the given PBD.
Parameters: | session ref session_id | Reference to a valid session |
| PBD ref self | reference to the object |
Minimum role: | read-only |
Result: | value of the field |
Published in: | XenServer 4.0 (rio) | the storage repository that the pbd realises |
string
get_uuid
(session ref, PBD ref)
Get the uuid field of the given PBD.
Parameters: | session ref session_id | Reference to a valid session |
| PBD ref self | reference to the object |
Minimum role: | read-only |
Result: | value of the field |
Published in: | XenServer 4.0 (rio) | Unique identifier/object reference |
void
plug
(session ref, PBD ref)
Activate the specified PBD, causing the referenced SR to be attached and scanned
Parameters: | session ref session_id | Reference to a valid session |
| PBD ref self | The PBD to activate |
Minimum role: | pool-operator |
Errors: | SR_UNKNOWN_DRIVER | The SR could not be connected because the driver was not recognised. |
Published in: | XenServer 4.0 (rio) | Activate the specified PBD, causing the referenced SR to be attached and scanned |
void
remove_from_other_config
(session ref, PBD ref, string)
Remove the given key and its corresponding value from the other_config field of the given PBD. If the key is not in that Map, then do nothing.
Parameters: | session ref session_id | Reference to a valid session |
| PBD ref self | reference to the object |
| string key | Key to remove |
Minimum role: | pool-operator |
Published in: | XenServer 4.1 (miami) | additional configuration |
void
set_device_config
(session ref, PBD ref, (string → string) map)
Sets the PBD's device_config field
Parameters: | session ref session_id | Reference to a valid session |
| PBD ref self | The PBD to modify |
| (string → string) map value | The new value of the PBD's device_config |
Minimum role: | pool-operator |
Published in: | XenServer 4.1 (miami) | Sets the PBD's device_config field |
void
set_other_config
(session ref, PBD ref, (string → string) map)
Set the other_config field of the given PBD.
Parameters: | session ref session_id | Reference to a valid session |
| PBD ref self | reference to the object |
| (string → string) map value | New value to set |
Minimum role: | pool-operator |
Published in: | XenServer 4.1 (miami) | additional configuration |
void
unplug
(session ref, PBD ref)
Deactivate the specified PBD, causing the referenced SR to be detached and nolonger scanned
Parameters: | session ref session_id | Reference to a valid session |
| PBD ref self | The PBD to deactivate |
Minimum role: | pool-operator |
Published in: | XenServer 4.0 (rio) | Deactivate the specified PBD, causing the referenced SR to be detached and nolonger scanned |