Class: SR
A storage repository
Fields for class: SR
Field | Type | Qualifier | Description |
---|---|---|---|
allowed_operations |
storage_operations set |
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. |
blobs |
(string -> blob ref) map |
RO/runtime | Binary blobs associated with this SR |
clustered |
bool |
RO/runtime | True if the SR is using aggregated local storage |
content_type |
string |
RO/constructor | the type of the SR’s content, if required (e.g. ISOs) |
current_operations |
(string -> storage_operations) map |
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. |
introduced_by |
DR_task ref |
RO/runtime | The disaster recovery task which introduced this SR |
is_tools_sr |
bool |
RO/runtime | True if this is the SR that contains the Tools ISO VDIs |
local_cache_enabled |
bool |
RO/runtime | True if this SR is assigned to be the local cache for its host |
name_description |
string |
RO/constructor | a notes field containing human-readable description |
name_label |
string |
RO/constructor | a human-readable name |
other_config |
(string -> string) map |
RW | additional configuration |
PBDs |
PBD ref set |
RO/runtime | describes how particular hosts can see this storage repository |
physical_size |
int |
RO/constructor | total physical size of the repository (in bytes) |
physical_utilisation |
int |
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 |
shared |
bool |
RO/runtime | true if this SR is (capable of being) shared between multiple hosts |
sm_config |
(string -> string) map |
RW | SM dependent data |
tags |
string set |
RW | user-specified tags for categorization purposes |
type |
string |
RO/constructor | type of the storage repository |
uuid |
string |
RO/runtime | Unique identifier/object reference |
VDIs |
VDI ref set |
RO/runtime | all virtual disks known to this storage repository |
virtual_allocation |
int |
RO/runtime | sum of virtual_sizes of all VDIs in this storage repository (in bytes) |
RPCs associated with class: SR
RPC name: add_tags
Overview:
Add the given value to the tags field of the given SR. If the value is already in that Set, then do nothing.
Signature:
void add_tags (session ref session_ref, SR ref self, string value)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
string |
value |
New value to add |
Minimum Role: vm-operator
Return Type: void
RPC name: add_to_other_config
Overview:
Add the given key-value pair to the other_config field of the given SR.
Signature:
void add_to_other_config (session ref session_ref, SR ref self, string key, string value)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
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
Return Type: void
RPC name: add_to_sm_config
Overview:
Add the given key-value pair to the sm_config field of the given SR.
Signature:
void add_to_sm_config (session ref session_ref, SR ref self, string key, string value)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
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
Return Type: void
RPC name: assert_can_host_ha_statefile
Overview:
Returns successfully if the given SR can host an HA statefile. Otherwise returns an error to explain why not
Signature:
void assert_can_host_ha_statefile (session ref session_ref, SR ref sr)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
sr |
The SR to query |
Minimum Role: pool-operator
Return Type: void
RPC name: assert_supports_database_replication
Overview:
Returns successfully if the given SR supports database replication. Otherwise returns an error to explain why not.
Signature:
void assert_supports_database_replication (session ref session_ref, SR ref sr)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
sr |
The SR to query |
Minimum Role: pool-operator
Return Type: void
RPC name: create
Overview:
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)
Signature:
SR ref create (session ref session_ref, host ref host, (string -> string) map device_config, int physical_size, string name_label, string name_description, string type, string content_type, bool shared, (string -> string) map sm_config)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
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
Return Type: SR ref
The reference of the newly created Storage Repository.
Possible Error Codes: SR_UNKNOWN_DRIVER
RPC name: create_new_blob
Overview:
Create a placeholder for a named binary blob of data that is associated with this SR
Signature:
blob ref create_new_blob (session ref session_ref, SR ref sr, string name, string mime_type, bool public)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
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
Return Type: blob ref
The reference of the blob, needed for populating its data
RPC name: destroy
Overview:
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)
Signature:
void destroy (session ref session_ref, SR ref sr)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
sr |
The SR to destroy |
Minimum Role: pool-operator
Return Type: void
Possible Error Codes: SR_HAS_PBD
RPC name: disable_database_replication
Overview:
Signature:
void disable_database_replication (session ref session_ref, SR ref sr)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
sr |
The SR to which metadata should be no longer replicated |
Minimum Role: pool-operator
Return Type: void
RPC name: enable_database_replication
Overview:
Signature:
void enable_database_replication (session ref session_ref, SR ref sr)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
sr |
The SR to which metadata should be replicated |
Minimum Role: pool-operator
Return Type: void
RPC name: forget
Overview:
Removing specified SR-record from database, without attempting to remove SR from disk
Signature:
void forget (session ref session_ref, SR ref sr)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
sr |
The SR to destroy |
Minimum Role: pool-operator
Return Type: void
Possible Error Codes: SR_HAS_PBD
RPC name: forget_data_source_archives
Overview:
Forget the recorded statistics related to the specified data source
Signature:
void forget_data_source_archives (session ref session_ref, SR ref sr, string data_source)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
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
Return Type: void
RPC name: get_all
Overview:
Return a list of all the SRs known to the system.
Signature:
SR 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: SR ref set
references to all objects
RPC name: get_all_records
Overview:
Return a map of SR references to SR records for all SRs known to the system.
Signature:
(SR ref -> SR 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: (SR ref -> SR record) map
records of all objects
RPC name: get_allowed_operations
Overview:
Get the allowed_operations field of the given SR.
Signature:
storage_operations set get_allowed_operations (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: storage_operations set
value of the field
RPC name: get_blobs
Overview:
Get the blobs field of the given SR.
Signature:
(string -> blob ref) map get_blobs (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: (string -> blob ref) map
value of the field
RPC name: get_by_name_label
Overview:
Get all the SR instances with the given label.
Signature:
SR ref set get_by_name_label (session ref session_ref, string label)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
string |
label |
label of object to return |
Minimum Role: read-only
Return Type: SR ref set
references to objects with matching names
RPC name: get_by_uuid
Overview:
Get a reference to the SR instance with the specified UUID.
Signature:
SR 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: SR ref
reference to the object
RPC name: get_clustered
Overview:
Get the clustered field of the given SR.
Signature:
bool get_clustered (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: bool
value of the field
RPC name: get_content_type
Overview:
Get the content_type field of the given SR.
Signature:
string get_content_type (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: string
value of the field
RPC name: get_current_operations
Overview:
Get the current_operations field of the given SR.
Signature:
(string -> storage_operations) map get_current_operations (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: (string -> storage_operations) map
value of the field
RPC name: get_data_sources
Overview:
Signature:
data_source record set get_data_sources (session ref session_ref, SR ref sr)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
sr |
The SR to interrogate |
Minimum Role: read-only
Return Type: data_source record set
A set of data sources
RPC name: get_introduced_by
Overview:
Get the introduced_by field of the given SR.
Signature:
DR_task ref get_introduced_by (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: DR_task ref
value of the field
RPC name: get_is_tools_sr
Overview:
Get the is_tools_sr field of the given SR.
Signature:
bool get_is_tools_sr (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: bool
value of the field
RPC name: get_local_cache_enabled
Overview:
Get the local_cache_enabled field of the given SR.
Signature:
bool get_local_cache_enabled (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: bool
value of the field
RPC name: get_name_description
Overview:
Get the name/description field of the given SR.
Signature:
string get_name_description (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: string
value of the field
RPC name: get_name_label
Overview:
Get the name/label field of the given SR.
Signature:
string get_name_label (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: string
value of the field
RPC name: get_other_config
Overview:
Get the other_config field of the given SR.
Signature:
(string -> string) map get_other_config (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: (string -> string) map
value of the field
RPC name: get_PBDs
Overview:
Get the PBDs field of the given SR.
Signature:
PBD ref set get_PBDs (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: PBD ref set
value of the field
RPC name: get_physical_size
Overview:
Get the physical_size field of the given SR.
Signature:
int get_physical_size (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: int
value of the field
RPC name: get_physical_utilisation
Overview:
Get the physical_utilisation field of the given SR.
Signature:
int get_physical_utilisation (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: int
value of the field
RPC name: get_record
Overview:
Get a record containing the current state of the given SR.
Signature:
SR record get_record (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: SR record
all fields from the object
RPC name: get_shared
Overview:
Get the shared field of the given SR.
Signature:
bool get_shared (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: bool
value of the field
RPC name: get_sm_config
Overview:
Get the sm_config field of the given SR.
Signature:
(string -> string) map get_sm_config (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: (string -> string) map
value of the field
RPC name: get_supported_types
Overview:
Return a set of all the SR types supported by the system
Signature:
string set get_supported_types (session ref session_ref)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
Minimum Role: read-only
Return Type: string set
the supported SR types
RPC name: get_tags
Overview:
Get the tags field of the given SR.
Signature:
string set get_tags (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: string set
value of the field
RPC name: get_type
Overview:
Get the type field of the given SR.
Signature:
string get_type (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: string
value of the field
RPC name: get_uuid
Overview:
Get the uuid field of the given SR.
Signature:
string get_uuid (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: string
value of the field
RPC name: get_VDIs
Overview:
Get the VDIs field of the given SR.
Signature:
VDI ref set get_VDIs (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: VDI ref set
value of the field
RPC name: get_virtual_allocation
Overview:
Get the virtual_allocation field of the given SR.
Signature:
int get_virtual_allocation (session ref session_ref, SR ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: int
value of the field
RPC name: introduce
Overview:
Introduce a new Storage Repository into the managed system
Signature:
SR ref introduce (session ref session_ref, string uuid, string name_label, string name_description, string type, string content_type, bool shared, (string -> string) map sm_config)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
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
Return Type: SR ref
The reference of the newly introduced Storage Repository.
RPC name: make
This message is deprecated.
Overview:
Create a new Storage Repository on disk. This call is deprecated: use SR.create instead.
Signature:
string make (session ref session_ref, host ref host, (string -> string) map device_config, int physical_size, string name_label, string name_description, string type, string content_type, (string -> string) map sm_config)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
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
Return Type: string
The uuid of the newly created Storage Repository.
RPC name: probe
Overview:
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.
Signature:
string probe (session ref session_ref, host ref host, (string -> string) map device_config, string type, (string -> string) map sm_config)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
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
Return Type: string
An XML fragment containing the scan results. These are specific to the scan being performed, and the backend.
RPC name: probe_ext
Overview:
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.
Signature:
probe_result record set probe_ext (session ref session_ref, host ref host, (string -> string) map device_config, string type, (string -> string) map sm_config)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
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
Return Type: probe_result record set
A set of records containing the scan results.
RPC name: query_data_source
Overview:
Query the latest value of the specified data source
Signature:
float query_data_source (session ref session_ref, SR ref sr, string data_source)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
sr |
The SR |
string |
data_source |
The data source to query |
Minimum Role: read-only
Return Type: float
The latest value, averaged over the last 5 seconds
RPC name: record_data_source
Overview:
Start recording the specified data source
Signature:
void record_data_source (session ref session_ref, SR ref sr, string data_source)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
sr |
The SR |
string |
data_source |
The data source to record |
Minimum Role: pool-operator
Return Type: void
RPC name: remove_from_other_config
Overview:
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.
Signature:
void remove_from_other_config (session ref session_ref, SR ref self, string key)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
string |
key |
Key to remove |
Minimum Role: pool-operator
Return Type: void
RPC name: remove_from_sm_config
Overview:
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.
Signature:
void remove_from_sm_config (session ref session_ref, SR ref self, string key)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
string |
key |
Key to remove |
Minimum Role: pool-operator
Return Type: void
RPC name: remove_tags
Overview:
Remove the given value from the tags field of the given SR. If the value is not in that Set, then do nothing.
Signature:
void remove_tags (session ref session_ref, SR ref self, string value)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
string |
value |
Value to remove |
Minimum Role: vm-operator
Return Type: void
RPC name: scan
Overview:
Refreshes the list of VDIs associated with an SR
Signature:
void scan (session ref session_ref, SR ref sr)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
sr |
The SR to scan |
Minimum Role: vm-power-admin
Return Type: void
RPC name: set_name_description
Overview:
Set the name description of the SR
Signature:
void set_name_description (session ref session_ref, SR ref sr, string value)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
sr |
The SR |
string |
value |
The name description for the SR |
Minimum Role: pool-operator
Return Type: void
RPC name: set_name_label
Overview:
Set the name label of the SR
Signature:
void set_name_label (session ref session_ref, SR ref sr, string value)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
sr |
The SR |
string |
value |
The name label for the SR |
Minimum Role: pool-operator
Return Type: void
RPC name: set_other_config
Overview:
Set the other_config field of the given SR.
Signature:
void set_other_config (session ref session_ref, SR ref self, (string -> string) map value)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
(string -> string) map |
value |
New value to set |
Minimum Role: pool-operator
Return Type: void
RPC name: set_physical_size
Overview:
Sets the SR’s physical_size field
Signature:
void set_physical_size (session ref session_ref, SR ref self, int value)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
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
Return Type: void
RPC name: set_shared
Overview:
Sets the shared flag on the SR
Signature:
void set_shared (session ref session_ref, SR ref sr, bool value)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
sr |
The SR |
bool |
value |
True if the SR is shared |
Minimum Role: pool-operator
Return Type: void
RPC name: set_sm_config
Overview:
Set the sm_config field of the given SR.
Signature:
void set_sm_config (session ref session_ref, SR ref self, (string -> string) map value)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
(string -> string) map |
value |
New value to set |
Minimum Role: pool-operator
Return Type: void
RPC name: set_tags
Overview:
Set the tags field of the given SR.
Signature:
void set_tags (session ref session_ref, SR ref self, string set value)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
self |
reference to the object |
string set |
value |
New value to set |
Minimum Role: vm-operator
Return Type: void
RPC name: update
Overview:
Refresh the fields on the SR object
Signature:
void update (session ref session_ref, SR ref sr)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
SR ref |
sr |
The SR whose fields should be refreshed |
Minimum Role: pool-operator
Return Type: void
In this article
- Fields for class: SR
-
RPCs associated with class: SR
- RPC name: add_tags
- RPC name: add_to_other_config
- RPC name: add_to_sm_config
- RPC name: assert_can_host_ha_statefile
- RPC name: assert_supports_database_replication
- RPC name: create
- RPC name: create_new_blob
- RPC name: destroy
- RPC name: disable_database_replication
- RPC name: enable_database_replication
- RPC name: forget
- RPC name: forget_data_source_archives
- RPC name: get_all
- RPC name: get_all_records
- RPC name: get_allowed_operations
- RPC name: get_blobs
- RPC name: get_by_name_label
- RPC name: get_by_uuid
- RPC name: get_clustered
- RPC name: get_content_type
- RPC name: get_current_operations
- RPC name: get_data_sources
- RPC name: get_introduced_by
- RPC name: get_is_tools_sr
- RPC name: get_local_cache_enabled
- RPC name: get_name_description
- RPC name: get_name_label
- RPC name: get_other_config
- RPC name: get_PBDs
- RPC name: get_physical_size
- RPC name: get_physical_utilisation
- RPC name: get_record
- RPC name: get_shared
- RPC name: get_sm_config
- RPC name: get_supported_types
- RPC name: get_tags
- RPC name: get_type
- RPC name: get_uuid
- RPC name: get_VDIs
- RPC name: get_virtual_allocation
- RPC name: introduce
- RPC name: make
- RPC name: probe
- RPC name: probe_ext
- RPC name: query_data_source
- RPC name: record_data_source
- RPC name: remove_from_other_config
- RPC name: remove_from_sm_config
- RPC name: remove_tags
- RPC name: scan
- RPC name: set_name_description
- RPC name: set_name_label
- RPC name: set_other_config
- RPC name: set_physical_size
- RPC name: set_shared
- RPC name: set_sm_config
- RPC name: set_tags
- RPC name: update