use of com.emc.storageos.model.object.BucketRestRep in project coprhd-controller by CoprHD.
the class ObjectStorageUtils method setObjectShareACL.
public static void setObjectShareACL(URI bucketId, ObjectStorageACL acl) {
Task<BucketRestRep> task = execute(new SetObjectStorageACL(bucketId, acl));
addAffectedResource(task);
logInfo("object.bucket.acl", bucketId, task.getOpId());
}
use of com.emc.storageos.model.object.BucketRestRep in project coprhd-controller by CoprHD.
the class ObjectBuckets method delete.
private static void delete(List<URI> ids, String deleteType) {
if (ids != null) {
ViPRCoreClient client = BourneUtil.getViprClient();
List<Task<BucketRestRep>> tasks = Lists.newArrayList();
for (URI id : ids) {
boolean forceDelete = false;
Task<BucketRestRep> task = client.objectBuckets().deactivate(id, new BucketDeleteParam(forceDelete, deleteType));
tasks.add(task);
}
if (!tasks.isEmpty()) {
flash.put("info", MessagesUtils.get("resources.buckets.deactivate", tasks.size()));
}
}
buckets(null);
}
use of com.emc.storageos.model.object.BucketRestRep in project coprhd-controller by CoprHD.
the class ObjectBuckets method deleteBucket.
@FlashException(referrer = { "bucket" })
public static void deleteBucket(String bucketId, String deleteType) {
if (StringUtils.isNotBlank(bucketId)) {
ViPRCoreClient client = BourneUtil.getViprClient();
boolean forceDelete = false;
Task<BucketRestRep> task = client.objectBuckets().deactivate(uri(bucketId), new BucketDeleteParam(forceDelete, deleteType));
flash.put("info", MessagesUtils.get("resources.bucket.deactivate"));
}
bucket(bucketId);
}
use of com.emc.storageos.model.object.BucketRestRep in project coprhd-controller by CoprHD.
the class ObjectBuckets method listBucketACL.
public static void listBucketACL(String id) {
renderArgs.put("dataTable", new BucketACLDataTable());
renderArgs.put("bucketId", uri(id));
ViPRCoreClient client = BourneUtil.getViprClient();
BucketRestRep bucket = client.objectBuckets().get(uri(id));
renderArgs.put("bucketName", bucket.getName());
BucketACLForm bucketACL = new BucketACLForm();
render(bucketACL);
}
use of com.emc.storageos.model.object.BucketRestRep in project coprhd-controller by CoprHD.
the class ObjectProvider method createBucketOptions.
protected static List<AssetOption> createBucketOptions(ViPRCoreClient client, URI project, URI hostId, Collection<? extends DataObjectRestRep> bucketObjects) {
Map<URI, BucketRestRep> bucketNames = getProjectBucketNames(client, project);
List<AssetOption> options = Lists.newArrayList();
for (DataObjectRestRep bucketObject : bucketObjects) {
options.add(createBucketOption(client, hostId, bucketObject, bucketNames));
}
AssetOptionsUtils.sortOptionsByLabel(options);
return options;
}
Aggregations