Search in sources :

Example 16 with Bucket

use of com.emc.storageos.db.client.model.Bucket in project coprhd-controller by CoprHD.

the class ObjectDeviceController method syncBucketACL.

@Override
public void syncBucketACL(URI storage, URI bucketId, String opId) throws InternalException {
    ControllerUtils.setThreadLocalLogData(bucketId, opId);
    _log.info("ObjectDeviceController:updateBucketACL Bucket URI : {} ", bucketId);
    Bucket bucketObj = _dbClient.queryObject(Bucket.class, bucketId);
    StorageSystem storageObj = _dbClient.queryObject(StorageSystem.class, storage);
    ObjectDeviceInputOutput objectArgs = new ObjectDeviceInputOutput();
    objectArgs.setName(bucketObj.getName());
    objectArgs.setNamespace(bucketObj.getNamespace());
    BiosCommandResult result = getDevice(storageObj.getSystemType()).doSyncBucketACL(storageObj, bucketObj, objectArgs, opId);
    if (result.getCommandPending()) {
        return;
    }
    bucketObj.getOpStatus().updateTaskStatus(opId, result.toOperation());
}
Also used : Bucket(com.emc.storageos.db.client.model.Bucket) ObjectDeviceInputOutput(com.emc.storageos.volumecontroller.ObjectDeviceInputOutput) StorageSystem(com.emc.storageos.db.client.model.StorageSystem)

Aggregations

Bucket (com.emc.storageos.db.client.model.Bucket)16 StorageSystem (com.emc.storageos.db.client.model.StorageSystem)11 MapBucket (com.emc.storageos.api.mapper.functions.MapBucket)9 CheckPermission (com.emc.storageos.security.authorization.CheckPermission)6 Path (javax.ws.rs.Path)6 Produces (javax.ws.rs.Produces)6 Operation (com.emc.storageos.db.client.model.Operation)5 ObjectController (com.emc.storageos.volumecontroller.ObjectController)5 ObjectDeviceInputOutput (com.emc.storageos.volumecontroller.ObjectDeviceInputOutput)4 Consumes (javax.ws.rs.Consumes)3 BucketACLUtility (com.emc.storageos.api.service.impl.resource.utils.BucketACLUtility)2 StoragePool (com.emc.storageos.db.client.model.StoragePool)2 StringSet (com.emc.storageos.db.client.model.StringSet)2 VirtualPool (com.emc.storageos.db.client.model.VirtualPool)2 GET (javax.ws.rs.GET)2 PUT (javax.ws.rs.PUT)2 BucketRecommendation (com.emc.storageos.api.service.impl.placement.BucketRecommendation)1 URIQueryResultList (com.emc.storageos.db.client.constraint.URIQueryResultList)1 DataObject (com.emc.storageos.db.client.model.DataObject)1 FileShare (com.emc.storageos.db.client.model.FileShare)1