Search in sources :

Example 11 with Delete

use of com.emc.storageos.hds.model.Delete in project coprhd-controller by CoprHD.

the class HDSBatchApiExportManager method constructRemoveLUNsQuery.

/**
 * Constructs a batch query for the given Path objects to remove LUN's from
 * storage system.
 *
 * @param systemId
 *            - represents storage system objectID.
 * @param pathList
 *            - List of Path objects.
 * @return - XML String to remove the Paths from storage system
 */
private String constructRemoveLUNsQuery(String systemId, List<Path> pathList, String model) {
    Map<String, Object> attributeMap = new HashMap<String, Object>();
    StorageArray array = new StorageArray(systemId);
    Delete deleteOp = new Delete(HDSConstants.LUN_TARGET);
    attributeMap.put(HDSConstants.STORAGEARRAY, array);
    attributeMap.put(HDSConstants.DELETE, deleteOp);
    attributeMap.put(HDSConstants.MODEL, model);
    attributeMap.put(HDSConstants.PATH_LIST, pathList);
    return InputXMLGenerationClient.getInputXMLString(HDSConstants.DELETE_PATH_FROM_HSD_OP, attributeMap, HDSConstants.HITACHI_INPUT_XML_CONTEXT_FILE, HDSConstants.HITACHI_SMOOKS_CONFIG_FILE);
}
Also used : Delete(com.emc.storageos.hds.model.Delete) HashMap(java.util.HashMap) StorageArray(com.emc.storageos.hds.model.StorageArray)

Example 12 with Delete

use of com.emc.storageos.hds.model.Delete in project coprhd-controller by CoprHD.

the class HDSBatchApiExportManager method constructDeleteHSDsQuery.

/**
 * Constructs a batch query to delete given HSD's from the storage system.
 *
 * @param systemId
 *            - represents the storage system ObjectID.
 * @param hsdList
 *            - List of HostStorageDomain objects.
 * @return - XML string to delete the HostStorageDomain's
 */
private String constructDeleteHSDsQuery(String systemId, List<HostStorageDomain> hsdList, String model) {
    Map<String, Object> attributeMap = new HashMap<String, Object>();
    StorageArray array = new StorageArray(systemId);
    Delete deleteOp = new Delete(HDSConstants.HOST_STORAGE_DOMAIN);
    attributeMap.put(HDSConstants.STORAGEARRAY, array);
    attributeMap.put(HDSConstants.DELETE, deleteOp);
    attributeMap.put(HDSConstants.MODEL, model);
    attributeMap.put(HDSConstants.HOSTGROUP_LIST, hsdList);
    return InputXMLGenerationClient.getInputXMLString(HDSConstants.BATCH_DELETE_HSDS_FROM_SYSTEM, attributeMap, HDSConstants.HITACHI_INPUT_XML_CONTEXT_FILE, HDSConstants.HITACHI_SMOOKS_CONFIG_FILE);
}
Also used : Delete(com.emc.storageos.hds.model.Delete) HashMap(java.util.HashMap) StorageArray(com.emc.storageos.hds.model.StorageArray)

Aggregations

Delete (com.emc.storageos.hds.model.Delete)12 HashMap (java.util.HashMap)12 StorageArray (com.emc.storageos.hds.model.StorageArray)10 ClientResponse (com.sun.jersey.api.client.ClientResponse)7 IOException (java.io.IOException)7 InputStream (java.io.InputStream)7 URI (java.net.URI)7 JavaResult (org.milyn.payload.JavaResult)7 ArrayList (java.util.ArrayList)6 EchoCommand (com.emc.storageos.hds.model.EchoCommand)4 Error (com.emc.storageos.hds.model.Error)4 HostStorageDomain (com.emc.storageos.hds.model.HostStorageDomain)4 LogicalUnit (com.emc.storageos.hds.model.LogicalUnit)3 Path (com.emc.storageos.hds.model.Path)2 ReplicationInfo (com.emc.storageos.hds.model.ReplicationInfo)2 HDSConstants (com.emc.storageos.hds.HDSConstants)1 HDSException (com.emc.storageos.hds.HDSException)1 Add (com.emc.storageos.hds.model.Add)1 HDSHost (com.emc.storageos.hds.model.HDSHost)1 ISCSIName (com.emc.storageos.hds.model.ISCSIName)1