Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.xensource.xenapi
Class SR

    java.lang.Object
      com.xensource.xenapi.XenAPIObject
          com.xensource.xenapi.SR

    public class SR

extends XenAPIObject

A storage repository

Nested Class Summary
`static class` | `SR.Record` Represents all the fields in a SR

Field Summary
`protected String` | `ref` The XenAPI reference (OpaqueRef) to this object.

Method Summary
`void` | `addTags(Connection c, String value)` Add the given value to the tags field of the given SR.
`void` | `addToOtherConfig(Connection c, String key, String value)` Add the given key-value pair to the other_config field of the given SR.
`void` | `addToSmConfig(Connection c, String key, String value)` Add the given key-value pair to the sm_config field of the given SR.
`void` | `assertCanHostHaStatefile(Connection c)` Returns successfully if the given SR can host an HA statefile.
`Task` | `assertCanHostHaStatefileAsync(Connection c)` Returns successfully if the given SR can host an HA statefile.
`void` | `assertSupportsDatabaseReplication(Connection c)` Returns successfully if the given SR supports database replication.
`Task` | `assertSupportsDatabaseReplicationAsync(Connection c)` Returns successfully if the given SR supports database replication.
`static SR` | `create(Connection c, Host host, Map<String,String> deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, Map<String,String> smConfig)` 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)
`static Task` | `createAsync(Connection c, Host host, Map<String,String> deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, Map<String,String> smConfig)` 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` | `createNewBlob(Connection c, String name, String mimeType, Boolean _public)` Create a placeholder for a named binary blob of data that is associated with this SR
`Task` | `createNewBlobAsync(Connection c, String name, String mimeType, Boolean _public)` Create a placeholder for a named binary blob of data that is associated with this SR
`void` | `destroy(Connection c)` Destroy specified SR, removing SR-record from database and remove SR from disk.
`Task` | `destroyAsync(Connection c)` Destroy specified SR, removing SR-record from database and remove SR from disk.
`void` | `disableDatabaseReplication(Connection c)`
`Task` | `disableDatabaseReplicationAsync(Connection c)`
`void` | `enableDatabaseReplication(Connection c)`
`Task` | `enableDatabaseReplicationAsync(Connection c)`
`boolean` | `equals(Object obj)` If obj is a SR, compares XenAPI references for equality.
`void` | `forget(Connection c)` Removing specified SR-record from database, without attempting to remove SR from disk
`Task` | `forgetAsync(Connection c)` Removing specified SR-record from database, without attempting to remove SR from disk
`static Set<SR>` | `getAll(Connection c)` Return a list of all the SRs known to the system.
`Set<Types.StorageOperations>` | `getAllowedOperations(Connection c)` Get the allowed_operations field of the given SR.
`static Map<SR,SR.Record>` | `getAllRecords(Connection c)` Return a map of SR references to SR records for all SRs known to the system.
`Map<String,Blob>` | `getBlobs(Connection c)` Get the blobs field of the given SR.
`static Set<SR>` | `getByNameLabel(Connection c, String label)` Get all the SR instances with the given label.
`static SR` | `getByUuid(Connection c, String uuid)` Get a reference to the SR instance with the specified UUID.
`String` | `getContentType(Connection c)` Get the content_type field of the given SR.
`Map<String,Types.StorageOperations>` | `getCurrentOperations(Connection c)` Get the current_operations field of the given SR.
`DRTask` | `getIntroducedBy(Connection c)` Get the introduced_by field of the given SR.
`Boolean` | `getLocalCacheEnabled(Connection c)` Get the local_cache_enabled field of the given SR.
`String` | `getNameDescription(Connection c)` Get the name/description field of the given SR.
`String` | `getNameLabel(Connection c)` Get the name/label field of the given SR.
`Map<String,String>` | `getOtherConfig(Connection c)` Get the other_config field of the given SR.
`Set<PBD>` | `getPBDs(Connection c)` Get the PBDs field of the given SR.
`Long` | `getPhysicalSize(Connection c)` Get the physical_size field of the given SR.
`Long` | `getPhysicalUtilisation(Connection c)` Get the physical_utilisation field of the given SR.
`SR.Record` | `getRecord(Connection c)` Get a record containing the current state of the given SR.
`Boolean` | `getShared(Connection c)` Get the shared field of the given SR.
`Map<String,String>` | `getSmConfig(Connection c)` Get the sm_config field of the given SR.
`static Set<String>` | `getSupportedTypes(Connection c)` Return a set of all the SR types supported by the system
`Set<String>` | `getTags(Connection c)` Get the tags field of the given SR.
`String` | `getType(Connection c)` Get the type field of the given SR.
`String` | `getUuid(Connection c)` Get the uuid field of the given SR.
`Set<VDI>` | `getVDIs(Connection c)` Get the VDIs field of the given SR.
`Long` | `getVirtualAllocation(Connection c)` Get the virtual_allocation field of the given SR.
`int` | `hashCode()`
`static SR` | `introduce(Connection c, String uuid, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, Map<String,String> smConfig)` Introduce a new Storage Repository into the managed system
`static Task` | `introduceAsync(Connection c, String uuid, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, Map<String,String> smConfig)` Introduce a new Storage Repository into the managed system
`static String` | `make(Connection c, Host host, Map<String,String> deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, String contentType, Map<String,String> smConfig)` Deprecated.
`static Task` | `makeAsync(Connection c, Host host, Map<String,String> deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, String contentType, Map<String,String> smConfig)` Deprecated.
`static String` | `probe(Connection c, Host host, Map<String,String> deviceConfig, String type, Map<String,String> smConfig)` Perform a backend-specific scan, using the given device_config.
`static Task` | `probeAsync(Connection c, Host host, Map<String,String> deviceConfig, String type, Map<String,String> smConfig)` Perform a backend-specific scan, using the given device_config.
`void` | `removeFromOtherConfig(Connection c, String key)` Remove the given key and its corresponding value from the other_config field of the given SR.
`void` | `removeFromSmConfig(Connection c, String key)` Remove the given key and its corresponding value from the sm_config field of the given SR.
`void` | `removeTags(Connection c, String value)` Remove the given value from the tags field of the given SR.
`void` | `scan(Connection c)` Refreshes the list of VDIs associated with an SR
`Task` | `scanAsync(Connection c)` Refreshes the list of VDIs associated with an SR
`void` | `setNameDescription(Connection c, String value)` Set the name description of the SR
`Task` | `setNameDescriptionAsync(Connection c, String value)` Set the name description of the SR
`void` | `setNameLabel(Connection c, String value)` Set the name label of the SR
`Task` | `setNameLabelAsync(Connection c, String value)` Set the name label of the SR
`void` | `setOtherConfig(Connection c, Map<String,String> otherConfig)` Set the other_config field of the given SR.
`void` | `setPhysicalSize(Connection c, Long value)` Sets the SR's physical_size field
`void` | `setPhysicalUtilisation(Connection c, Long value)` Sets the SR's physical_utilisation field
`void` | `setShared(Connection c, Boolean value)` Sets the shared flag on the SR
`Task` | `setSharedAsync(Connection c, Boolean value)` Sets the shared flag on the SR
`void` | `setSmConfig(Connection c, Map<String,String> smConfig)` Set the sm_config field of the given SR.
`void` | `setTags(Connection c, Set<String> tags)` Set the tags field of the given SR.
`void` | `setVirtualAllocation(Connection c, Long value)` Sets the SR's virtual_allocation field
`String` | `toWireString()`
`void` | `update(Connection c)` Refresh the fields on the SR object
`Task` | `updateAsync(Connection c)` Refresh the fields on the SR object

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ref

    protected final String ref

  The XenAPI reference (OpaqueRef) to this object.

Method Detail

### toWireString

    public String toWireString()

  Specified by:
    `toWireString` in class `XenAPIObject`
  Returns:
    The XenAPI reference (OpaqueRef) to this object.

### equals

    public boolean equals(Object obj)

  If obj is a SR, compares XenAPI references for equality.

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### getRecord

    public SR.Record getRecord(Connection c)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException

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

  Returns:
    all fields from the object
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getByUuid

    public static SR getByUuid(Connection c,
                               String uuid)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException

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

  Parameters:
    `uuid` - UUID of object to return
  Returns:
    reference to the object
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getByNameLabel

    public static Set<SR> getByNameLabel(Connection c,
                                         String label)
                                  throws Types.BadServerResponse,
                                         Types.XenAPIException,
                                         org.apache.xmlrpc.XmlRpcException

  Get all the SR instances with the given label.

  Parameters:
    `label` - label of object to return
  Returns:
    references to objects with matching names
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getUuid

    public String getUuid(Connection c)
                   throws Types.BadServerResponse,
                          Types.XenAPIException,
                          org.apache.xmlrpc.XmlRpcException

  Get the uuid field of the given SR.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getNameLabel

    public String getNameLabel(Connection c)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException

  Get the name/label field of the given SR.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getNameDescription

    public String getNameDescription(Connection c)
                              throws Types.BadServerResponse,
                                     Types.XenAPIException,
                                     org.apache.xmlrpc.XmlRpcException

  Get the name/description field of the given SR.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getAllowedOperations

    public Set<Types.StorageOperations> getAllowedOperations(Connection c)
                                                      throws Types.BadServerResponse,
                                                             Types.XenAPIException,
                                                             org.apache.xmlrpc.XmlRpcException

  Get the allowed_operations field of the given SR.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getCurrentOperations

    public Map<String,Types.StorageOperations> getCurrentOperations(Connection c)
                                                             throws Types.BadServerResponse,
                                                                    Types.XenAPIException,
                                                                    org.apache.xmlrpc.XmlRpcException

  Get the current_operations field of the given SR.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getVDIs

    public Set<VDI> getVDIs(Connection c)
                     throws Types.BadServerResponse,
                            Types.XenAPIException,
                            org.apache.xmlrpc.XmlRpcException

  Get the VDIs field of the given SR.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getPBDs

    public Set<PBD> getPBDs(Connection c)
                     throws Types.BadServerResponse,
                            Types.XenAPIException,
                            org.apache.xmlrpc.XmlRpcException

  Get the PBDs field of the given SR.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getVirtualAllocation

    public Long getVirtualAllocation(Connection c)
                              throws Types.BadServerResponse,
                                     Types.XenAPIException,
                                     org.apache.xmlrpc.XmlRpcException

  Get the virtual_allocation field of the given SR.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getPhysicalUtilisation

    public Long getPhysicalUtilisation(Connection c)
                                throws Types.BadServerResponse,
                                       Types.XenAPIException,
                                       org.apache.xmlrpc.XmlRpcException

  Get the physical_utilisation field of the given SR.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getPhysicalSize

    public Long getPhysicalSize(Connection c)
                         throws Types.BadServerResponse,
                                Types.XenAPIException,
                                org.apache.xmlrpc.XmlRpcException

  Get the physical_size field of the given SR.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getType

    public String getType(Connection c)
                   throws Types.BadServerResponse,
                          Types.XenAPIException,
                          org.apache.xmlrpc.XmlRpcException

  Get the type field of the given SR.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getContentType

    public String getContentType(Connection c)
                          throws Types.BadServerResponse,
                                 Types.XenAPIException,
                                 org.apache.xmlrpc.XmlRpcException

  Get the content_type field of the given SR.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getShared

    public Boolean getShared(Connection c)
                      throws Types.BadServerResponse,
                             Types.XenAPIException,
                             org.apache.xmlrpc.XmlRpcException

  Get the shared field of the given SR.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### 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 SR.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getTags

    public Set<String> getTags(Connection c)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException

  Get the tags field of the given SR.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getSmConfig

    public Map<String,String> getSmConfig(Connection c)
                                   throws Types.BadServerResponse,
                                          Types.XenAPIException,
                                          org.apache.xmlrpc.XmlRpcException

  Get the sm_config field of the given SR.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getBlobs

    public Map<String,Blob> getBlobs(Connection c)
                              throws Types.BadServerResponse,
                                     Types.XenAPIException,
                                     org.apache.xmlrpc.XmlRpcException

  Get the blobs field of the given SR.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getLocalCacheEnabled

    public Boolean getLocalCacheEnabled(Connection c)
                                 throws Types.BadServerResponse,
                                        Types.XenAPIException,
                                        org.apache.xmlrpc.XmlRpcException

  Get the local_cache_enabled field of the given SR.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getIntroducedBy

    public DRTask getIntroducedBy(Connection c)
                           throws Types.BadServerResponse,
                                  Types.XenAPIException,
                                  org.apache.xmlrpc.XmlRpcException

  Get the introduced_by field of the given SR.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### setOtherConfig

    public void setOtherConfig(Connection c,
                               Map<String,String> otherConfig)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException

  Set the other_config field of the given SR.

  Parameters:
    `otherConfig` - New value to set
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### 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 SR.

  Parameters:
    `key` - Key to add
    `value` - Value to add
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### 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 SR. If the key is not in that Map, then do nothing.

  Parameters:
    `key` - Key to remove
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### setTags

    public void setTags(Connection c,
                        Set<String> tags)
                 throws Types.BadServerResponse,
                        Types.XenAPIException,
                        org.apache.xmlrpc.XmlRpcException

  Set the tags field of the given SR.

  Parameters:
    `tags` - New value to set
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### addTags

    public void addTags(Connection c,
                        String value)
                 throws Types.BadServerResponse,
                        Types.XenAPIException,
                        org.apache.xmlrpc.XmlRpcException

  Add the given value to the tags field of the given SR. If the value is already in that Set, then do nothing.

  Parameters:
    `value` - New value to add
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### removeTags

    public void removeTags(Connection c,
                           String value)
                    throws Types.BadServerResponse,
                           Types.XenAPIException,
                           org.apache.xmlrpc.XmlRpcException

  Remove the given value from the tags field of the given SR. If the value is not in that Set, then do nothing.

  Parameters:
    `value` - Value to remove
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### setSmConfig

    public void setSmConfig(Connection c,
                            Map<String,String> smConfig)
                     throws Types.BadServerResponse,
                            Types.XenAPIException,
                            org.apache.xmlrpc.XmlRpcException

  Set the sm_config field of the given SR.

  Parameters:
    `smConfig` - New value to set
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### addToSmConfig

    public void addToSmConfig(Connection c,
                              String key,
                              String value)
                       throws Types.BadServerResponse,
                              Types.XenAPIException,
                              org.apache.xmlrpc.XmlRpcException

  Add the given key-value pair to the sm_config field of the given SR.

  Parameters:
    `key` - Key to add
    `value` - Value to add
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### removeFromSmConfig

    public void removeFromSmConfig(Connection c,
                                   String key)
                            throws Types.BadServerResponse,
                                   Types.XenAPIException,
                                   org.apache.xmlrpc.XmlRpcException

  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:
    `key` - Key to remove
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### createAsync

    public static Task createAsync(Connection c,
                                   Host host,
                                   Map<String,String> deviceConfig,
                                   Long physicalSize,
                                   String nameLabel,
                                   String nameDescription,
                                   String type,
                                   String contentType,
                                   Boolean shared,
                                   Map<String,String> smConfig)
                            throws Types.BadServerResponse,
                                   Types.XenAPIException,
                                   org.apache.xmlrpc.XmlRpcException,
                                   Types.SrUnknownDriver

  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:
    `host` - The host to create/make the SR on
    `deviceConfig` - The device config string that will be passed to backend SR driver
    `physicalSize` - The physical size of the new storage repository
    `nameLabel` - The name of the new storage repository
    `nameDescription` - The description of the new storage repository
    `type` - The type of the SR; used to specify the SR backend driver to use
    `contentType` - The type of the new SRs content, if required (e.g. ISOs)
    `shared` - True if the SR (is capable of) being shared by multiple hosts
    `smConfig` - Storage backend specific configuration options
  Returns:
    Task
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`
    `Types.SrUnknownDriver`

### create

    public static SR create(Connection c,
                            Host host,
                            Map<String,String> deviceConfig,
                            Long physicalSize,
                            String nameLabel,
                            String nameDescription,
                            String type,
                            String contentType,
                            Boolean shared,
                            Map<String,String> smConfig)
                     throws Types.BadServerResponse,
                            Types.XenAPIException,
                            org.apache.xmlrpc.XmlRpcException,
                            Types.SrUnknownDriver

  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:
    `host` - The host to create/make the SR on
    `deviceConfig` - The device config string that will be passed to backend SR driver
    `physicalSize` - The physical size of the new storage repository
    `nameLabel` - The name of the new storage repository
    `nameDescription` - The description of the new storage repository
    `type` - The type of the SR; used to specify the SR backend driver to use
    `contentType` - The type of the new SRs content, if required (e.g. ISOs)
    `shared` - True if the SR (is capable of) being shared by multiple hosts
    `smConfig` - Storage backend specific configuration options
  Returns:
    The reference of the newly created Storage Repository.
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`
    `Types.SrUnknownDriver`

### introduceAsync

    public static Task introduceAsync(Connection c,
                                      String uuid,
                                      String nameLabel,
                                      String nameDescription,
                                      String type,
                                      String contentType,
                                      Boolean shared,
                                      Map<String,String> smConfig)
                               throws Types.BadServerResponse,
                                      Types.XenAPIException,
                                      org.apache.xmlrpc.XmlRpcException

  Introduce a new Storage Repository into the managed system

  Parameters:
    `uuid` - The uuid assigned to the introduced SR
    `nameLabel` - The name of the new storage repository
    `nameDescription` - The description of the new storage repository
    `type` - The type of the SR; used to specify the SR backend driver to use
    `contentType` - The type of the new SRs content, if required (e.g. ISOs)
    `shared` - True if the SR (is capable of) being shared by multiple hosts
    `smConfig` - Storage backend specific configuration options
  Returns:
    Task
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### introduce

    public static SR introduce(Connection c,
                               String uuid,
                               String nameLabel,
                               String nameDescription,
                               String type,
                               String contentType,
                               Boolean shared,
                               Map<String,String> smConfig)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException

  Introduce a new Storage Repository into the managed system

  Parameters:
    `uuid` - The uuid assigned to the introduced SR
    `nameLabel` - The name of the new storage repository
    `nameDescription` - The description of the new storage repository
    `type` - The type of the SR; used to specify the SR backend driver to use
    `contentType` - The type of the new SRs content, if required (e.g. ISOs)
    `shared` - True if the SR (is capable of) being shared by multiple hosts
    `smConfig` - Storage backend specific configuration options
  Returns:
    The reference of the newly introduced Storage Repository.
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### makeAsync

    @Deprecated
    public static Task makeAsync(Connection c,
                                            Host host,
                                            Map<String,String> deviceConfig,
                                            Long physicalSize,
                                            String nameLabel,
                                            String nameDescription,
                                            String type,
                                            String contentType,
                                            Map<String,String> smConfig)
                          throws Types.BadServerResponse,
                                 Types.XenAPIException,
                                 org.apache.xmlrpc.XmlRpcException

  Deprecated.

  Create a new Storage Repository on disk. This call is deprecated: use SR.create instead.

  Parameters:
    `host` - The host to create/make the SR on
    `deviceConfig` - The device config string that will be passed to backend SR driver
    `physicalSize` - The physical size of the new storage repository
    `nameLabel` - The name of the new storage repository
    `nameDescription` - The description of the new storage repository
    `type` - The type of the SR; used to specify the SR backend driver to use
    `contentType` - The type of the new SRs content, if required (e.g. ISOs)
    `smConfig` - Storage backend specific configuration options
  Returns:
    Task
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### make

    @Deprecated
    public static String make(Connection c,
                                         Host host,
                                         Map<String,String> deviceConfig,
                                         Long physicalSize,
                                         String nameLabel,
                                         String nameDescription,
                                         String type,
                                         String contentType,
                                         Map<String,String> smConfig)
                       throws Types.BadServerResponse,
                              Types.XenAPIException,
                              org.apache.xmlrpc.XmlRpcException

  Deprecated.

  Create a new Storage Repository on disk. This call is deprecated: use SR.create instead.

  Parameters:
    `host` - The host to create/make the SR on
    `deviceConfig` - The device config string that will be passed to backend SR driver
    `physicalSize` - The physical size of the new storage repository
    `nameLabel` - The name of the new storage repository
    `nameDescription` - The description of the new storage repository
    `type` - The type of the SR; used to specify the SR backend driver to use
    `contentType` - The type of the new SRs content, if required (e.g. ISOs)
    `smConfig` - Storage backend specific configuration options
  Returns:
    The uuid of the newly created Storage Repository.
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### destroyAsync

    public Task destroyAsync(Connection c)
                      throws Types.BadServerResponse,
                             Types.XenAPIException,
                             org.apache.xmlrpc.XmlRpcException,
                             Types.SrHasPbd

  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)

  Returns:
    Task
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`
    `Types.SrHasPbd`

### destroy

    public void destroy(Connection c)
                 throws Types.BadServerResponse,
                        Types.XenAPIException,
                        org.apache.xmlrpc.XmlRpcException,
                        Types.SrHasPbd

  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)

  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`
    `Types.SrHasPbd`

### forgetAsync

    public Task forgetAsync(Connection c)
                     throws Types.BadServerResponse,
                            Types.XenAPIException,
                            org.apache.xmlrpc.XmlRpcException,
                            Types.SrHasPbd

  Removing specified SR-record from database, without attempting to remove SR from disk

  Returns:
    Task
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`
    `Types.SrHasPbd`

### forget

    public void forget(Connection c)
                throws Types.BadServerResponse,
                       Types.XenAPIException,
                       org.apache.xmlrpc.XmlRpcException,
                       Types.SrHasPbd

  Removing specified SR-record from database, without attempting to remove SR from disk

  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`
    `Types.SrHasPbd`

### updateAsync

    public Task updateAsync(Connection c)
                     throws Types.BadServerResponse,
                            Types.XenAPIException,
                            org.apache.xmlrpc.XmlRpcException

  Refresh the fields on the SR object

  Returns:
    Task
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### update

    public void update(Connection c)
                throws Types.BadServerResponse,
                       Types.XenAPIException,
                       org.apache.xmlrpc.XmlRpcException

  Refresh the fields on the SR object

  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getSupportedTypes

    public static Set<String> getSupportedTypes(Connection c)
                                         throws Types.BadServerResponse,
                                                Types.XenAPIException,
                                                org.apache.xmlrpc.XmlRpcException

  Return a set of all the SR types supported by the system

  Returns:
    the supported SR types
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### scanAsync

    public Task scanAsync(Connection c)
                   throws Types.BadServerResponse,
                          Types.XenAPIException,
                          org.apache.xmlrpc.XmlRpcException

  Refreshes the list of VDIs associated with an SR

  Returns:
    Task
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### scan

    public void scan(Connection c)
              throws Types.BadServerResponse,
                     Types.XenAPIException,
                     org.apache.xmlrpc.XmlRpcException

  Refreshes the list of VDIs associated with an SR

  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### probeAsync

    public static Task probeAsync(Connection c,
                                  Host host,
                                  Map<String,String> deviceConfig,
                                  String type,
                                  Map<String,String> smConfig)
                           throws Types.BadServerResponse,
                                  Types.XenAPIException,
                                  org.apache.xmlrpc.XmlRpcException

  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:
    `host` - The host to create/make the SR on
    `deviceConfig` - The device config string that will be passed to backend SR driver
    `type` - The type of the SR; used to specify the SR backend driver to use
    `smConfig` - Storage backend specific configuration options
  Returns:
    Task
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### probe

    public static String probe(Connection c,
                               Host host,
                               Map<String,String> deviceConfig,
                               String type,
                               Map<String,String> smConfig)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException

  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:
    `host` - The host to create/make the SR on
    `deviceConfig` - The device config string that will be passed to backend SR driver
    `type` - The type of the SR; used to specify the SR backend driver to use
    `smConfig` - Storage backend specific configuration options
  Returns:
    An XML fragment containing the scan results. These are specific to the scan being performed, and the backend.
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### setSharedAsync

    public Task setSharedAsync(Connection c,
                               Boolean value)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException

  Sets the shared flag on the SR

  Parameters:
    `value` - True if the SR is shared
  Returns:
    Task
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### setShared

    public void setShared(Connection c,
                          Boolean value)
                   throws Types.BadServerResponse,
                          Types.XenAPIException,
                          org.apache.xmlrpc.XmlRpcException

  Sets the shared flag on the SR

  Parameters:
    `value` - True if the SR is shared
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### setNameLabelAsync

    public Task setNameLabelAsync(Connection c,
                                  String value)
                           throws Types.BadServerResponse,
                                  Types.XenAPIException,
                                  org.apache.xmlrpc.XmlRpcException

  Set the name label of the SR

  Parameters:
    `value` - The name label for the SR
  Returns:
    Task
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### setNameLabel

    public void setNameLabel(Connection c,
                             String value)
                      throws Types.BadServerResponse,
                             Types.XenAPIException,
                             org.apache.xmlrpc.XmlRpcException

  Set the name label of the SR

  Parameters:
    `value` - The name label for the SR
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### setNameDescriptionAsync

    public Task setNameDescriptionAsync(Connection c,
                                        String value)
                                 throws Types.BadServerResponse,
                                        Types.XenAPIException,
                                        org.apache.xmlrpc.XmlRpcException

  Set the name description of the SR

  Parameters:
    `value` - The name description for the SR
  Returns:
    Task
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### setNameDescription

    public void setNameDescription(Connection c,
                                   String value)
                            throws Types.BadServerResponse,
                                   Types.XenAPIException,
                                   org.apache.xmlrpc.XmlRpcException

  Set the name description of the SR

  Parameters:
    `value` - The name description for the SR
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### createNewBlobAsync

    public Task createNewBlobAsync(Connection c,
                                   String name,
                                   String mimeType,
                                   Boolean _public)
                            throws Types.BadServerResponse,
                                   Types.XenAPIException,
                                   org.apache.xmlrpc.XmlRpcException

  Create a placeholder for a named binary blob of data that is associated with this SR

  Parameters:
    `name` - The name associated with the blob
    `mimeType` - The mime type for the data. Empty string translates to application/octet-stream
    `_public` - True if the blob should be publicly available
  Returns:
    Task
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### createNewBlob

    public Blob createNewBlob(Connection c,
                              String name,
                              String mimeType,
                              Boolean _public)
                       throws Types.BadServerResponse,
                              Types.XenAPIException,
                              org.apache.xmlrpc.XmlRpcException

  Create a placeholder for a named binary blob of data that is associated with this SR

  Parameters:
    `name` - The name associated with the blob
    `mimeType` - The mime type for the data. Empty string translates to application/octet-stream
    `_public` - True if the blob should be publicly available
  Returns:
    The reference of the blob, needed for populating its data
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### setPhysicalSize

    public void setPhysicalSize(Connection c,
                                Long value)
                         throws Types.BadServerResponse,
                                Types.XenAPIException,
                                org.apache.xmlrpc.XmlRpcException

  Sets the SR's physical_size field

  Parameters:
    `value` - The new value of the SR's physical_size
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### setVirtualAllocation

    public void setVirtualAllocation(Connection c,
                                     Long value)
                              throws Types.BadServerResponse,
                                     Types.XenAPIException,
                                     org.apache.xmlrpc.XmlRpcException

  Sets the SR's virtual_allocation field

  Parameters:
    `value` - The new value of the SR's virtual_allocation
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### setPhysicalUtilisation

    public void setPhysicalUtilisation(Connection c,
                                       Long value)
                                throws Types.BadServerResponse,
                                       Types.XenAPIException,
                                       org.apache.xmlrpc.XmlRpcException

  Sets the SR's physical_utilisation field

  Parameters:
    `value` - The new value of the SR's physical utilisation
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### assertCanHostHaStatefileAsync

    public Task assertCanHostHaStatefileAsync(Connection c)
                                       throws Types.BadServerResponse,
                                              Types.XenAPIException,
                                              org.apache.xmlrpc.XmlRpcException

  Returns successfully if the given SR can host an HA statefile. Otherwise returns an error to explain why not

  Returns:
    Task
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### assertCanHostHaStatefile

    public void assertCanHostHaStatefile(Connection c)
                                  throws Types.BadServerResponse,
                                         Types.XenAPIException,
                                         org.apache.xmlrpc.XmlRpcException

  Returns successfully if the given SR can host an HA statefile. Otherwise returns an error to explain why not

  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### assertSupportsDatabaseReplicationAsync

    public Task assertSupportsDatabaseReplicationAsync(Connection c)
                                                throws Types.BadServerResponse,
                                                       Types.XenAPIException,
                                                       org.apache.xmlrpc.XmlRpcException

  Returns successfully if the given SR supports database replication. Otherwise returns an error to explain why not.

  Returns:
    Task
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### assertSupportsDatabaseReplication

    public void assertSupportsDatabaseReplication(Connection c)
                                           throws Types.BadServerResponse,
                                                  Types.XenAPIException,
                                                  org.apache.xmlrpc.XmlRpcException

  Returns successfully if the given SR supports database replication. Otherwise returns an error to explain why not.

  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### enableDatabaseReplicationAsync

    public Task enableDatabaseReplicationAsync(Connection c)
                                        throws Types.BadServerResponse,
                                               Types.XenAPIException,
                                               org.apache.xmlrpc.XmlRpcException

  Returns:
    Task
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### enableDatabaseReplication

    public void enableDatabaseReplication(Connection c)
                                   throws Types.BadServerResponse,
                                          Types.XenAPIException,
                                          org.apache.xmlrpc.XmlRpcException

  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### disableDatabaseReplicationAsync

    public Task disableDatabaseReplicationAsync(Connection c)
                                         throws Types.BadServerResponse,
                                                Types.XenAPIException,
                                                org.apache.xmlrpc.XmlRpcException

  Returns:
    Task
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### disableDatabaseReplication

    public void disableDatabaseReplication(Connection c)
                                    throws Types.BadServerResponse,
                                           Types.XenAPIException,
                                           org.apache.xmlrpc.XmlRpcException

  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getAll

    public static Set<SR> getAll(Connection c)
                          throws Types.BadServerResponse,
                                 Types.XenAPIException,
                                 org.apache.xmlrpc.XmlRpcException

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

  Returns:
    references to all objects
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getAllRecords

    public static Map<SR,SR.Record> getAllRecords(Connection c)
                                           throws Types.BadServerResponse,
                                                  Types.XenAPIException,
                                                  org.apache.xmlrpc.XmlRpcException

  Return a map of SR references to SR records for all SRs known to the system.

  Returns:
    records of all objects
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD