Class: SR
A storage repository
Published in: | XenServer 4.0 (rio) | A storage repository |
Enums
storage_operations
Values: | scan | Scanning backends for new or deleted VDIs |
destroy | Destroying the SR | |
forget | Forgetting about SR | |
plug | Plugging a PBD into this SR | |
unplug | Unplugging a PBD from this SR | |
update | Refresh the fields on the SR | |
vdi_create | Creating a new VDI | |
vdi_introduce | Introducing a new VDI | |
vdi_destroy | Destroying a VDI | |
vdi_resize | Resizing a VDI | |
vdi_clone | Cloneing a VDI | |
vdi_snapshot | Snapshotting a VDI | |
vdi_mirror | Mirroring a VDI | |
vdi_enable_cbt | Enabling changed block tracking for a VDI | |
vdi_disable_cbt | Disabling changed block tracking for a VDI | |
vdi_data_destroy | Deleting the data of the VDI | |
vdi_list_changed_blocks | Exporting a bitmap that shows the changed blocks between two VDIs | |
vdi_set_on_boot | Setting the on_boot field of the VDI | |
vdi_blocked | Blocking other operations for a VDI | |
vdi_copy | Copying the VDI | |
vdi_force_unlock | Forcefully unlocking the VDI | |
vdi_forget | Forgetting about the VDI | |
vdi_generate_config | Generating the configuration of the VDI | |
vdi_resize_online | Resizing the VDI online | |
vdi_update | Refreshing the fields on the VDI | |
pbd_create | Creating a PBD for this SR | |
pbd_destroy | Destroying one of this SR's PBDs |
Fields
PBD ref set
PBDs
[RO/runtime]
describes how particular hosts can see this storage repository
Published in: | XenServer 4.0 (rio) | describes how particular hosts can see this storage repository |
VDI ref set
VDIs
[RO/runtime]
all virtual disks known to this storage repository
Published in: | XenServer 4.0 (rio) | all virtual disks known to this storage repository |
enum storage_operations set
allowed_operations
[RO/runtime]
list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client.
Default value: | {} | |
Published in: | XenServer 4.0 (rio) | list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client. |
(string → blob ref) map
blobs
[RO/runtime]
Binary blobs associated with this SR
Default value: | {} | |
Published in: | XenServer 5.0 (orlando) | Binary blobs associated with this SR |
bool
clustered
[RO/runtime]
True if the SR is using aggregated local storage
Default value: | false | |
Published in: | XenServer 7.0 (dundee) |
string
content_type
[RO/constructor]
the type of the SR's content, if required (e.g. ISOs)
Published in: | XenServer 4.0 (rio) | the type of the SR's content, if required (e.g. ISOs) |
(string → enum storage_operations) map
current_operations
[RO/runtime]
links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task.
Default value: | {} | |
Published in: | XenServer 4.0 (rio) | links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task. |
DR_task ref
introduced_by
[RO/runtime]
The disaster recovery task which introduced this SR
Default value: | OpaqueRef:NULL | |
Published in: | XenServer 6.0 (boston) | The disaster recovery task which introduced this SR |
bool
is_tools_sr
[RO/runtime]
True if this is the SR that contains the Tools ISO VDIs
Default value: | false | |
Published in: | XenServer 7.0 (dundee) |
bool
local_cache_enabled
[RO/runtime]
True if this SR is assigned to be the local cache for its host
Default value: | false | |
Published in: | XenServer 5.6 FP1 (cowley) | True if this SR is assigned to be the local cache for its host |
string
name_description
[RO/constructor]
a notes field containing human-readable description
Default value: | "" | |
Published in: | XenServer 4.0 (rio) |
string
name_label
[RO/constructor]
a human-readable name
Default value: | "" | |
Published in: | XenServer 4.0 (rio) |
(string → string) map
other_config
[RW]
additional configuration
Published in: | XenServer 4.0 (rio) | additional configuration |
int
physical_size
[RO/constructor]
total physical size of the repository (in bytes)
Published in: | XenServer 4.0 (rio) | total physical size of the repository (in bytes) |
int
physical_utilisation
[RO/runtime]
physical space currently utilised on this storage repository (in bytes). Note that for sparse disk formats, physical_utilisation may be less than virtual_allocation
Published in: | XenServer 4.0 (rio) | physical space currently utilised on this storage repository (in bytes). Note that for sparse disk formats, physical_utilisation may be less than virtual_allocation |
bool
shared
[RO/runtime]
true if this SR is (capable of being) shared between multiple hosts
Published in: | XenServer 4.0 (rio) | true if this SR is (capable of being) shared between multiple hosts |
(string → string) map
sm_config
[RW]
SM dependent data
Default value: | {} | |
Published in: | XenServer 4.1 (miami) | SM dependent data |
string set
tags
[RW]
user-specified tags for categorization purposes
Default value: | {} | |
Published in: | XenServer 5.0 (orlando) | user-specified tags for categorization purposes |
string
type
[RO/constructor]
type of the storage repository
Published in: | XenServer 4.0 (rio) | type of the storage repository |
string
uuid
[RO/runtime]
Unique identifier/object reference
Published in: | XenServer 4.0 (rio) | Unique identifier/object reference |
int
virtual_allocation
[RO/runtime]
sum of virtual_sizes of all VDIs in this storage repository (in bytes)
Published in: | XenServer 4.0 (rio) | sum of virtual_sizes of all VDIs in this storage repository (in bytes) |
Messages
void
add_tags
(session ref, SR ref, string)
Add the given value to the tags field of the given SR. If the value is already in that Set, then do nothing.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
string value | New value to add | |
Minimum role: | vm-operator | |
Published in: | XenServer 5.0 (orlando) | user-specified tags for categorization purposes |
void
add_to_other_config
(session ref, SR ref, string, string)
Add the given key-value pair to the other_config field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
string key | Key to add | |
string value | Value to add | |
Minimum role: | pool-operator | |
Published in: | XenServer 4.0 (rio) | additional configuration |
void
add_to_sm_config
(session ref, SR ref, string, string)
Add the given key-value pair to the sm_config field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR 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) | SM dependent data |
void
assert_can_host_ha_statefile
(session ref, SR ref)
Returns successfully if the given SR can host an HA statefile. Otherwise returns an error to explain why not
Parameters: | session ref session_id | Reference to a valid session |
SR ref sr | The SR to query | |
Minimum role: | pool-operator | |
Published in: | XenServer 5.0 (orlando) | Returns successfully if the given SR can host an HA statefile. Otherwise returns an error to explain why not |
void
assert_supports_database_replication
(session ref, SR ref)
Returns successfully if the given SR supports database replication. Otherwise returns an error to explain why not.
Parameters: | session ref session_id | Reference to a valid session |
SR ref sr | The SR to query | |
Minimum role: | pool-operator | |
Published in: | XenServer 6.0 (boston) | Returns successfully if the given SR supports database replication. Otherwise returns an error to explain why not. |
SR ref
create
(session ref, host ref, (string → string) map, int, string, string, string, string, bool, (string → string) map)
Create a new Storage Repository and introduce it into the managed system, creating both SR record and PBD record to attach it to current host (with specified device_config parameters)
Parameters: | session ref session_id | Reference to a valid session |
host ref host | The host to create/make the SR on | |
(string → string) map device_config | The device config string that will be passed to backend SR driver | |
int physical_size | The physical size of the new storage repository | |
string name_label | The name of the new storage repository | |
string name_description | The description of the new storage repository | |
string type | The type of the SR; used to specify the SR backend driver to use | |
string content_type | The type of the new SRs content, if required (e.g. ISOs) | |
bool shared | True if the SR (is capable of) being shared by multiple hosts | |
(string → string) map sm_config | Storage backend specific configuration options | |
Minimum role: | pool-operator | |
Result: | The reference of the newly created Storage Repository. | |
Errors: | SR_UNKNOWN_DRIVER | The SR could not be connected because the driver was not recognised. |
Published in: | XenServer 4.0 (rio) | Create a new Storage Repository and introduce it into the managed system, creating both SR record and PBD record to attach it to current host (with specified device_config parameters) |
blob ref
create_new_blob
(session ref, SR ref, string, string, bool)
Create a placeholder for a named binary blob of data that is associated with this SR
Parameters: | session ref session_id | Reference to a valid session |
SR ref sr | The SR | |
string name | The name associated with the blob | |
string mime_type | The mime type for the data. Empty string translates to application/octet-stream | |
bool public | True if the blob should be publicly available | |
Minimum role: | pool-operator | |
Result: | The reference of the blob, needed for populating its data | |
Published in: | XenServer 5.0 (orlando) | Create a placeholder for a named binary blob of data that is associated with this SR |
void
destroy
(session ref, SR ref)
Destroy specified SR, removing SR-record from database and remove SR from disk. (In order to affect this operation the appropriate device_config is read from the specified SR's PBD on current host)
Parameters: | session ref session_id | Reference to a valid session |
SR ref sr | The SR to destroy | |
Minimum role: | pool-operator | |
Errors: | SR_HAS_PBD | The SR is still connected to a host via a PBD. It cannot be destroyed or forgotten. |
Published in: | XenServer 4.0 (rio) | Destroy specified SR, removing SR-record from database and remove SR from disk. (In order to affect this operation the appropriate device_config is read from the specified SR's PBD on current host) |
void
disable_database_replication
(session ref, SR ref)
Parameters: | session ref session_id | Reference to a valid session |
SR ref sr | The SR to which metadata should be no longer replicated | |
Minimum role: | pool-operator | |
Published in: | XenServer 6.0 (boston) |
void
enable_database_replication
(session ref, SR ref)
Parameters: | session ref session_id | Reference to a valid session |
SR ref sr | The SR to which metadata should be replicated | |
Minimum role: | pool-operator | |
Published in: | XenServer 6.0 (boston) |
void
forget
(session ref, SR ref)
Removing specified SR-record from database, without attempting to remove SR from disk
Parameters: | session ref session_id | Reference to a valid session |
SR ref sr | The SR to destroy | |
Minimum role: | pool-operator | |
Errors: | SR_HAS_PBD | The SR is still connected to a host via a PBD. It cannot be destroyed or forgotten. |
Published in: | XenServer 4.0 (rio) | Removing specified SR-record from database, without attempting to remove SR from disk |
void
forget_data_source_archives
(session ref, SR ref, string)
Forget the recorded statistics related to the specified data source
Parameters: | session ref session_id | Reference to a valid session |
SR ref sr | The SR | |
string data_source | The data source whose archives are to be forgotten | |
Minimum role: | pool-operator | |
Published in: | XenServer 7.0 (dundee) | Forget the recorded statistics related to the specified data source |
PBD ref set
get_PBDs
(session ref, SR ref)
Get the PBDs field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | describes how particular hosts can see this storage repository |
VDI ref set
get_VDIs
(session ref, SR ref)
Get the VDIs field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | all virtual disks known to this storage repository |
SR ref set
get_all
(session ref)
Return a list of all the SRs 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) | A storage repository |
(SR ref → SR record) map
get_all_records
(session ref)
Return a map of SR references to SR records for all SRs 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) | A storage repository |
enum storage_operations set
get_allowed_operations
(session ref, SR ref)
Get the allowed_operations field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client. |
(string → blob ref) map
get_blobs
(session ref, SR ref)
Get the blobs field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 5.0 (orlando) | Binary blobs associated with this SR |
SR ref set
get_by_name_label
(session ref, string)
Get all the SR instances with the given label.
Parameters: | session ref session_id | Reference to a valid session |
string label | label of object to return | |
Minimum role: | read-only | |
Result: | references to objects with matching names | |
Published in: | XenServer 4.0 (rio) | A storage repository |
SR ref
get_by_uuid
(session ref, string)
Get a reference to the SR 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) | A storage repository |
bool
get_clustered
(session ref, SR ref)
Get the clustered field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 7.0 (dundee) |
string
get_content_type
(session ref, SR ref)
Get the content_type field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | the type of the SR's content, if required (e.g. ISOs) |
(string → enum storage_operations) map
get_current_operations
(session ref, SR ref)
Get the current_operations field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task. |
data_source record set
get_data_sources
(session ref, SR ref)
Parameters: | session ref session_id | Reference to a valid session |
SR ref sr | The SR to interrogate | |
Minimum role: | read-only | |
Result: | A set of data sources | |
Published in: | XenServer 7.0 (dundee) |
DR_task ref
get_introduced_by
(session ref, SR ref)
Get the introduced_by field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 6.0 (boston) | The disaster recovery task which introduced this SR |
bool
get_is_tools_sr
(session ref, SR ref)
Get the is_tools_sr field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 7.0 (dundee) |
bool
get_local_cache_enabled
(session ref, SR ref)
Get the local_cache_enabled field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 5.6 FP1 (cowley) | True if this SR is assigned to be the local cache for its host |
string
get_name_description
(session ref, SR ref)
Get the name/description field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) |
string
get_name_label
(session ref, SR ref)
Get the name/label field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) |
(string → string) map
get_other_config
(session ref, SR ref)
Get the other_config field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | additional configuration |
int
get_physical_size
(session ref, SR ref)
Get the physical_size field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | total physical size of the repository (in bytes) |
int
get_physical_utilisation
(session ref, SR ref)
Get the physical_utilisation field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | physical space currently utilised on this storage repository (in bytes). Note that for sparse disk formats, physical_utilisation may be less than virtual_allocation |
SR record
get_record
(session ref, SR ref)
Get a record containing the current state of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | all fields from the object | |
Published in: | XenServer 4.0 (rio) | A storage repository |
bool
get_shared
(session ref, SR ref)
Get the shared field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | true if this SR is (capable of being) shared between multiple hosts |
(string → string) map
get_sm_config
(session ref, SR ref)
Get the sm_config field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.1 (miami) | SM dependent data |
string set
get_supported_types
(session ref)
Return a set of all the SR types supported by the system
Parameters: | session ref session_id | Reference to a valid session |
Minimum role: | read-only | |
Result: | the supported SR types | |
Published in: | XenServer 4.0 (rio) | Return a set of all the SR types supported by the system |
string set
get_tags
(session ref, SR ref)
Get the tags field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 5.0 (orlando) | user-specified tags for categorization purposes |
string
get_type
(session ref, SR ref)
Get the type field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | type of the storage repository |
string
get_uuid
(session ref, SR ref)
Get the uuid field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR 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 |
int
get_virtual_allocation
(session ref, SR ref)
Get the virtual_allocation field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | sum of virtual_sizes of all VDIs in this storage repository (in bytes) |
SR ref
introduce
(session ref, string, string, string, string, string, bool, (string → string) map)
Introduce a new Storage Repository into the managed system
Parameters: | session ref session_id | Reference to a valid session |
string uuid | The uuid assigned to the introduced SR | |
string name_label | The name of the new storage repository | |
string name_description | The description of the new storage repository | |
string type | The type of the SR; used to specify the SR backend driver to use | |
string content_type | The type of the new SRs content, if required (e.g. ISOs) | |
bool shared | True if the SR (is capable of) being shared by multiple hosts | |
(string → string) map sm_config | Storage backend specific configuration options | |
Minimum role: | pool-operator | |
Result: | The reference of the newly introduced Storage Repository. | |
Published in: | XenServer 4.0 (rio) | Introduce a new Storage Repository into the managed system |
Deprecated
string
make
(session ref, host ref, (string → string) map, int, string, string, string, string, (string → string) map)
Create a new Storage Repository on disk. This call is deprecated: use SR.create instead.
Parameters: | session ref session_id | Reference to a valid session |
host ref host | The host to create/make the SR on | |
(string → string) map device_config | The device config string that will be passed to backend SR driver | |
int physical_size | The physical size of the new storage repository | |
string name_label | The name of the new storage repository | |
string name_description | The description of the new storage repository | |
string type | The type of the SR; used to specify the SR backend driver to use | |
string content_type | The type of the new SRs content, if required (e.g. ISOs) | |
(string → string) map sm_config | Storage backend specific configuration options | |
Minimum role: | pool-operator | |
Result: | The uuid of the newly created Storage Repository. | |
Published in: | XenServer 4.0 (rio) | Create a new Storage Repository on disk |
Deprecated in: | XenServer 4.1 (miami) | Use SR.create instead |
string
probe
(session ref, host ref, (string → string) map, string, (string → string) map)
Perform a backend-specific scan, using the given device_config. If the device_config is complete, then this will return a list of the SRs present of this type on the device, if any. If the device_config is partial, then a backend-specific scan will be performed, returning results that will guide the user in improving the device_config.
Parameters: | session ref session_id | Reference to a valid session |
host ref host | The host to create/make the SR on | |
(string → string) map device_config | The device config string that will be passed to backend SR driver | |
string type | The type of the SR; used to specify the SR backend driver to use | |
(string → string) map sm_config | Storage backend specific configuration options | |
Minimum role: | pool-operator | |
Result: | An XML fragment containing the scan results. These are specific to the scan being performed, and the backend. | |
Published in: | XenServer 4.1 (miami) | Perform a backend-specific scan, using the given device_config. If the device_config is complete, then this will return a list of the SRs present of this type on the device, if any. If the device_config is partial, then a backend-specific scan will be performed, returning results that will guide the user in improving the device_config. |
probe_result record set
probe_ext
(session ref, host ref, (string → string) map, string, (string → string) map)
Perform a backend-specific scan, using the given device_config. If the device_config is complete, then this will return a list of the SRs present of this type on the device, if any. If the device_config is partial, then a backend-specific scan will be performed, returning results that will guide the user in improving the device_config.
Parameters: | session ref session_id | Reference to a valid session |
host ref host | The host to create/make the SR on | |
(string → string) map device_config | The device config string that will be passed to backend SR driver | |
string type | The type of the SR; used to specify the SR backend driver to use | |
(string → string) map sm_config | Storage backend specific configuration options | |
Minimum role: | pool-operator | |
Result: | A set of records containing the scan results. | |
Prototyped in: | XenServer 7.5 (kolkata) | |
Published in: | XenServer 7.6 (lima) |
float
query_data_source
(session ref, SR ref, string)
Query the latest value of the specified data source
Parameters: | session ref session_id | Reference to a valid session |
SR ref sr | The SR | |
string data_source | The data source to query | |
Minimum role: | read-only | |
Result: | The latest value, averaged over the last 5 seconds | |
Published in: | XenServer 7.0 (dundee) | Query the latest value of the specified data source |
void
record_data_source
(session ref, SR ref, string)
Start recording the specified data source
Parameters: | session ref session_id | Reference to a valid session |
SR ref sr | The SR | |
string data_source | The data source to record | |
Minimum role: | pool-operator | |
Published in: | XenServer 7.0 (dundee) | Start recording the specified data source |
void
remove_from_other_config
(session ref, SR ref, string)
Remove the given key and its corresponding value from the other_config field of the given SR. If the key is not in that Map, then do nothing.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
string key | Key to remove | |
Minimum role: | pool-operator | |
Published in: | XenServer 4.0 (rio) | additional configuration |
void
remove_from_sm_config
(session ref, SR ref, string)
Remove the given key and its corresponding value from the sm_config field of the given SR. If the key is not in that Map, then do nothing.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
string key | Key to remove | |
Minimum role: | pool-operator | |
Published in: | XenServer 4.1 (miami) | SM dependent data |
void
remove_tags
(session ref, SR ref, string)
Remove the given value from the tags field of the given SR. If the value is not in that Set, then do nothing.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
string value | Value to remove | |
Minimum role: | vm-operator | |
Published in: | XenServer 5.0 (orlando) | user-specified tags for categorization purposes |
void
scan
(session ref, SR ref)
Refreshes the list of VDIs associated with an SR
Parameters: | session ref session_id | Reference to a valid session |
SR ref sr | The SR to scan | |
Minimum role: | vm-power-admin | |
Published in: | XenServer 4.0 (rio) | Refreshes the list of VDIs associated with an SR |
void
set_name_description
(session ref, SR ref, string)
Set the name description of the SR
Parameters: | session ref session_id | Reference to a valid session |
SR ref sr | The SR | |
string value | The name description for the SR | |
Minimum role: | pool-operator | |
Published in: | XenServer 4.0 (rio) | Set the name description of the SR |
void
set_name_label
(session ref, SR ref, string)
Set the name label of the SR
Parameters: | session ref session_id | Reference to a valid session |
SR ref sr | The SR | |
string value | The name label for the SR | |
Minimum role: | pool-operator | |
Published in: | XenServer 4.0 (rio) | Set the name label of the SR |
void
set_other_config
(session ref, SR ref, (string → string) map)
Set the other_config field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
(string → string) map value | New value to set | |
Minimum role: | pool-operator | |
Published in: | XenServer 4.0 (rio) | additional configuration |
void
set_physical_size
(session ref, SR ref, int)
Sets the SR's physical_size field
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | The SR to modify | |
int value | The new value of the SR's physical_size | |
Minimum role: | pool-operator | |
Published in: | XenServer 4.1 (miami) | Sets the SR's physical_size field |
void
set_shared
(session ref, SR ref, bool)
Sets the shared flag on the SR
Parameters: | session ref session_id | Reference to a valid session |
SR ref sr | The SR | |
bool value | True if the SR is shared | |
Minimum role: | pool-operator | |
Published in: | XenServer 4.0 (rio) | Sets the shared flag on the SR |
void
set_sm_config
(session ref, SR ref, (string → string) map)
Set the sm_config field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
(string → string) map value | New value to set | |
Minimum role: | pool-operator | |
Published in: | XenServer 4.1 (miami) | SM dependent data |
void
set_tags
(session ref, SR ref, string set)
Set the tags field of the given SR.
Parameters: | session ref session_id | Reference to a valid session |
SR ref self | reference to the object | |
string set value | New value to set | |
Minimum role: | vm-operator | |
Published in: | XenServer 5.0 (orlando) | user-specified tags for categorization purposes |
void
update
(session ref, SR ref)
Refresh the fields on the SR object
Parameters: | session ref session_id | Reference to a valid session |
SR ref sr | The SR whose fields should be refreshed | |
Minimum role: | pool-operator | |
Published in: | XenServer 4.1.1 (symc) | Refresh the fields on the SR object |