use of com.emc.storageos.db.client.model.UnManagedDiscoveredObjects.UnManagedCifsShareACL in project coprhd-controller by CoprHD.
the class NetAppClusterModeCommIntf method discoverUnManagedCifsShares.
/**
* discover the unmanaged cifs shares and add shares to ViPR db
*
* @param profile
*/
private void discoverUnManagedCifsShares(AccessProfile profile) {
URI storageSystemId = profile.getSystemId();
StorageSystem storageSystem = _dbClient.queryObject(StorageSystem.class, storageSystemId);
if (null == storageSystem) {
return;
}
storageSystem.setDiscoveryStatus(DiscoveredDataObject.DataCollectionJobStatus.IN_PROGRESS.toString());
String detailedStatusMessage = "Discovery of NetAppC Unmanaged Cifs started";
NetAppClusterApi netAppCApi = new NetAppClusterApi.Builder(storageSystem.getIpAddress(), storageSystem.getPortNumber(), storageSystem.getUsername(), storageSystem.getPassword()).https(true).build();
Collection<String> attrs = new ArrayList<String>();
for (String property : ntpPropertiesList) {
attrs.add(SupportedNtpFileSystemInformation.getFileSystemInformation(property));
}
try {
// Used to Save the Acl to DB
List<UnManagedCifsShareACL> unManagedCifsShareACLList = new ArrayList<UnManagedCifsShareACL>();
List<UnManagedCifsShareACL> oldunManagedCifsShareACLList = new ArrayList<UnManagedCifsShareACL>();
HashSet<UnManagedSMBFileShare> unManagedSMBFileShareHashSet = null;
List<Map<String, String>> fileSystemInfo = netAppCApi.listVolumeInfo(null, attrs);
List<StorageVirtualMachineInfo> svms = netAppCApi.listSVM();
for (StorageVirtualMachineInfo svmInfo : svms) {
netAppCApi = new NetAppClusterApi.Builder(storageSystem.getIpAddress(), storageSystem.getPortNumber(), storageSystem.getUsername(), storageSystem.getPassword()).https(true).svm(svmInfo.getName()).build();
// Get All cifs shares and ACLs
List<Map<String, String>> listShares = netAppCApi.listShares(null);
if (listShares != null && !listShares.isEmpty()) {
_logger.info("total no of shares in netappC system (s) {}", listShares.size());
}
// prepare the unmanagedSmbshare
HashMap<String, HashSet<UnManagedSMBFileShare>> unMangedSMBFileShareMapSet = getAllCifsShares(listShares);
for (String key : unMangedSMBFileShareMapSet.keySet()) {
unManagedSMBFileShareHashSet = unMangedSMBFileShareMapSet.get(key);
String fileSystem = key;
String nativeId = fileSystem;
// get a fileSystem name from the path
int index = fileSystem.indexOf('/', 1);
if (-1 != index) {
fileSystem = fileSystem.substring(0, index);
_logger.info("Unmanaged FileSystem Name {}", fileSystem);
}
// build native id
String fsUnManagedFsNativeGuid = NativeGUIDGenerator.generateNativeGuidForPreExistingFileSystem(storageSystem.getSystemType(), storageSystem.getSerialNumber().toUpperCase(), fileSystem);
UnManagedFileSystem unManagedFs = checkUnManagedFileSystemExistsInDB(fsUnManagedFsNativeGuid);
boolean fsAlreadyExists = unManagedFs == null ? false : true;
if (fsAlreadyExists) {
_logger.debug("retrieve info for file system: " + fileSystem);
String svm = getOwningSVM(fileSystem, fileSystemInfo);
String addr = getSVMAddress(svm, svms);
UnManagedSMBShareMap tempUnManagedSMBShareMap = new UnManagedSMBShareMap();
// get the SMB shares
createSMBShareMap(unManagedSMBFileShareHashSet, tempUnManagedSMBShareMap, addr, nativeId);
// add shares to fs object and set hasShare to true
if (tempUnManagedSMBShareMap.size() > 0 && !tempUnManagedSMBShareMap.isEmpty()) {
unManagedFs.setUnManagedSmbShareMap(tempUnManagedSMBShareMap);
unManagedFs.setHasShares(true);
unManagedFs.putFileSystemCharacterstics(UnManagedFileSystem.SupportedFileSystemCharacterstics.IS_FILESYSTEM_EXPORTED.toString(), TRUE);
_logger.debug("SMB Share map for NetAppC UMFS {} = {}", unManagedFs.getLabel(), unManagedFs.getUnManagedSmbShareMap());
}
// get the acls details for given fileshare of given fs
UnManagedCifsShareACL existingACL = null;
List<UnManagedCifsShareACL> tempUnManagedCifsShareAclList = getACLs(unManagedSMBFileShareHashSet, netAppCApi, storageSystem, unManagedFs.getId());
if (tempUnManagedCifsShareAclList != null && !tempUnManagedCifsShareAclList.isEmpty()) {
for (UnManagedCifsShareACL unManagedCifsShareACL : tempUnManagedCifsShareAclList) {
// Check whether the CIFS share ACL was present in ViPR DB.
existingACL = checkUnManagedFsCifsACLExistsInDB(_dbClient, unManagedCifsShareACL.getNativeGuid());
if (existingACL == null) {
// add new acl
unManagedCifsShareACLList.add(unManagedCifsShareACL);
} else {
// delete the existing acl by setting object to inactive to true
existingACL.setInactive(true);
oldunManagedCifsShareACLList.add(existingACL);
// then add new acl and save
unManagedCifsShareACLList.add(unManagedCifsShareACL);
}
}
}
// store or update the FS object into DB
if (unManagedSMBFileShareHashSet != null && !unManagedSMBFileShareHashSet.isEmpty()) {
_dbClient.persistObject(unManagedFs);
_logger.info("File System {} has Shares and their Count is {}", unManagedFs.getId(), tempUnManagedSMBShareMap.size());
}
// Adding this additional logic to avoid OOM
if (unManagedCifsShareACLList.size() >= MAX_UMFS_RECORD_SIZE) {
_logger.info("Saving Number of New UnManagedCifsShareACL(s) {}", unManagedCifsShareACLList.size());
_partitionManager.insertInBatches(unManagedCifsShareACLList, Constants.DEFAULT_PARTITION_SIZE, _dbClient, UNMANAGED_SHARE_ACL);
unManagedCifsShareACLList.clear();
}
if (!oldunManagedCifsShareACLList.isEmpty() && oldunManagedCifsShareACLList.size() >= MAX_UMFS_RECORD_SIZE) {
_logger.info("Update Number of Old UnManagedCifsShareACL(s) {}", oldunManagedCifsShareACLList.size());
_partitionManager.updateInBatches(oldunManagedCifsShareACLList, Constants.DEFAULT_PARTITION_SIZE, _dbClient, UNMANAGED_SHARE_ACL);
oldunManagedCifsShareACLList.clear();
}
} else {
_logger.info("FileSystem " + unManagedFs + "is not present in ViPR DB. Hence ignoring " + fileSystem + " share");
}
}
}
if (unManagedCifsShareACLList != null && !unManagedCifsShareACLList.isEmpty()) {
_logger.info("Saving Number of New UnManagedCifsShareACL(s) {}", unManagedCifsShareACLList.size());
_partitionManager.insertInBatches(unManagedCifsShareACLList, Constants.DEFAULT_PARTITION_SIZE, _dbClient, UNMANAGED_SHARE_ACL);
unManagedCifsShareACLList.clear();
}
if (oldunManagedCifsShareACLList != null && !oldunManagedCifsShareACLList.isEmpty()) {
_logger.info("Saving Number of Old UnManagedCifsShareACL(s) {}", oldunManagedCifsShareACLList.size());
_partitionManager.updateInBatches(oldunManagedCifsShareACLList, Constants.DEFAULT_PARTITION_SIZE, _dbClient, UNMANAGED_SHARE_ACL);
oldunManagedCifsShareACLList.clear();
}
storageSystem.setDiscoveryStatus(DiscoveredDataObject.DataCollectionJobStatus.COMPLETE.toString());
// discovery succeeds
detailedStatusMessage = String.format("Discovery completed successfully for NetAppC: %s", storageSystemId.toString());
} catch (NetAppCException ve) {
if (null != storageSystem) {
cleanupDiscovery(storageSystem);
storageSystem.setDiscoveryStatus(DiscoveredDataObject.DataCollectionJobStatus.ERROR.toString());
}
_logger.error("discoverStorage failed. Storage system: " + storageSystemId);
} catch (Exception e) {
if (null != storageSystem) {
cleanupDiscovery(storageSystem);
storageSystem.setDiscoveryStatus(DiscoveredDataObject.DataCollectionJobStatus.ERROR.toString());
}
_logger.error("discoverStorage failed. Storage system: " + storageSystemId, e);
} finally {
if (storageSystem != null) {
try {
// set detailed message
storageSystem.setLastDiscoveryStatusMessage(detailedStatusMessage);
_dbClient.persistObject(storageSystem);
} catch (Exception ex) {
_logger.error("Error while persisting object to DB", ex);
}
}
}
}
use of com.emc.storageos.db.client.model.UnManagedDiscoveredObjects.UnManagedCifsShareACL in project coprhd-controller by CoprHD.
the class NetAppFileCommunicationInterface method getACLs.
/**
* get ACLs for smb shares of fs object
*
* @param unManagedSMBFileShareHashSet
* @param netAppApi
* @param fsId
* @return
*/
private List<UnManagedCifsShareACL> getACLs(HashSet<UnManagedSMBFileShare> unManagedSMBFileShareHashSet, NetAppApi netAppApi, URI fsId) {
// get list of acls for given set of shares
UnManagedCifsShareACL unManagedCifsShareACL = null;
List<UnManagedCifsShareACL> unManagedCifsShareACLList = new ArrayList<UnManagedCifsShareACL>();
// get acls for each share
List<CifsAcl> cifsAclList = null;
if (unManagedSMBFileShareHashSet != null && !unManagedSMBFileShareHashSet.isEmpty()) {
for (UnManagedSMBFileShare unManagedSMBFileShare : unManagedSMBFileShareHashSet) {
// find acl for given share
String unManagedSMBFileShareName = unManagedSMBFileShare.getName();
_logger.info("New smb share name: {} and fs : {}", unManagedSMBFileShareName, fsId);
cifsAclList = netAppApi.listCIFSShareAcl(unManagedSMBFileShareName);
if (cifsAclList != null && !cifsAclList.isEmpty()) {
for (CifsAcl cifsAcl : cifsAclList) {
_logger.info("Cifs share ACL: {} ", cifsAcl.toString());
unManagedCifsShareACL = new UnManagedCifsShareACL();
unManagedCifsShareACL.setShareName(unManagedSMBFileShareName);
String user = cifsAcl.getUserName();
if (user != null) {
unManagedCifsShareACL.setUser(user);
} else {
unManagedCifsShareACL.setGroup(cifsAcl.getGroupName());
}
// permission
unManagedCifsShareACL.setPermission(cifsAcl.getAccess().name());
unManagedCifsShareACL.setId(URIUtil.createId(UnManagedCifsShareACL.class));
// filesystem id
unManagedCifsShareACL.setFileSystemId(fsId);
// add the acl to acl-list
unManagedCifsShareACLList.add(unManagedCifsShareACL);
}
}
}
}
return unManagedCifsShareACLList;
}
use of com.emc.storageos.db.client.model.UnManagedDiscoveredObjects.UnManagedCifsShareACL in project coprhd-controller by CoprHD.
the class VNXFileCommunicationInterface method applyCifsSecurityRules.
private List<UnManagedCifsShareACL> applyCifsSecurityRules(UnManagedFileSystem vnxufs, String expPath, Map<String, String> fsExportInfo, StoragePort storagePort) {
List<UnManagedCifsShareACL> cifsACLs = new ArrayList<UnManagedCifsShareACL>();
UnManagedCifsShareACL unManagedCifsShareACL = new UnManagedCifsShareACL();
String shareName = fsExportInfo.get(VNXFileConstants.SHARE_NAME);
unManagedCifsShareACL.setShareName(shareName);
// user
unManagedCifsShareACL.setUser(FileControllerConstants.CIFS_SHARE_USER_EVERYONE);
// permission
unManagedCifsShareACL.setPermission(FileControllerConstants.CIFS_SHARE_PERMISSION_CHANGE);
unManagedCifsShareACL.setId(URIUtil.createId(UnManagedCifsShareACL.class));
// filesystem id
unManagedCifsShareACL.setFileSystemId(vnxufs.getId());
cifsACLs.add(unManagedCifsShareACL);
return cifsACLs;
}
use of com.emc.storageos.db.client.model.UnManagedDiscoveredObjects.UnManagedCifsShareACL in project coprhd-controller by CoprHD.
the class VNXFileCommunicationInterface method discoverUnManagedCifsShares.
private void discoverUnManagedCifsShares(AccessProfile profile) {
// Get Storage System
URI storageSystemId = profile.getSystemId();
StorageSystem storageSystem = _dbClient.queryObject(StorageSystem.class, storageSystemId);
if (null == storageSystem) {
return;
}
String detailedStatusMessage = "Discovery of VNX Unmanaged Shares started";
_logger.info(detailedStatusMessage);
// Used to Save the CIFS ACLs to DB
List<UnManagedCifsShareACL> newUnManagedCifsACLs = new ArrayList<UnManagedCifsShareACL>();
List<UnManagedCifsShareACL> oldUnManagedCifsACLs = new ArrayList<UnManagedCifsShareACL>();
try {
// Discover port groups (data mover ids) and group names (data mover names)
Set<StorageHADomain> activeDataMovers = discoverActiveDataMovers(storageSystem);
// Reused from discoverAll
// Discover ports (data mover interfaces) with the data movers in the active set.
Map<String, List<StoragePort>> ports = discoverPorts(storageSystem, activeDataMovers);
_logger.info("No of newly discovered port {}", ports.get(NEW).size());
_logger.info("No of existing discovered port {}", ports.get(EXISTING).size());
if (!ports.get(NEW).isEmpty()) {
_dbClient.createObject(ports.get(NEW));
}
List<StoragePort> allPortsList = ports.get(NEW);
allPortsList.addAll(ports.get(EXISTING));
Map<String, List<StoragePort>> allPorts = new ConcurrentHashMap<String, List<StoragePort>>();
for (StoragePort sPort : allPortsList) {
_logger.debug("DM Storage Port {} StorageHADomain {}", sPort.getPortNetworkId(), sPort.getStorageHADomain());
List<StoragePort> spList = allPorts.get(sPort.getStorageHADomain().toString());
if (spList == null) {
spList = new ArrayList<>();
}
spList.add(sPort);
allPorts.put(sPort.getStorageHADomain().toString(), spList);
}
Map<String, List<StorageHADomain>> allVdms = discoverVdmPortGroups(storageSystem, activeDataMovers);
if (!allVdms.get(NEW).isEmpty()) {
_dbClient.createObject(allVdms.get(NEW));
}
Set<StorageHADomain> allActiveVDMs = new HashSet();
allActiveVDMs.addAll(allVdms.get(NEW));
allActiveVDMs.addAll(allVdms.get(EXISTING));
activeDataMovers.addAll(allVdms.get(NEW));
activeDataMovers.addAll(allVdms.get(EXISTING));
Map<String, List<StoragePort>> allVdmPorts = discoverVdmPorts(storageSystem, allActiveVDMs);
if (!allVdmPorts.get(NEW).isEmpty()) {
_dbClient.createObject(allVdmPorts.get(NEW));
}
List<StoragePort> allVDMPortsList = allVdmPorts.get(NEW);
allVDMPortsList.addAll(allVdmPorts.get(EXISTING));
for (StoragePort sPort : allVDMPortsList) {
List<StoragePort> spList = allPorts.get(sPort.getStorageHADomain().toString());
_logger.debug("VDM Storage Port {} StorageHADomain {}", sPort.getPortNetworkId(), sPort.getStorageHADomain());
if (spList == null) {
spList = new ArrayList<>();
}
spList.add(sPort);
allPorts.put(sPort.getStorageHADomain().toString(), spList);
}
List<UnManagedFileSystem> unManagedExportBatch = new ArrayList<UnManagedFileSystem>();
for (StorageHADomain mover : activeDataMovers) {
// Get storage port and name for the DM
if (allPorts.get(mover.getId().toString()) == null || allPorts.get(mover.getId().toString()).isEmpty()) {
// Did not find a single storage port for this DM, ignore it
_logger.debug("No Ports found for {} {}", mover.getName(), mover.getAdapterName());
continue;
} else {
_logger.debug("Number of Ports found for {} : {} ", mover.getName() + ":" + mover.getAdapterName(), allPorts.get(mover.getId().toString()).size());
}
Collections.shuffle(allPorts.get(mover.getId().toString()));
StoragePort storagePort = allPorts.get(mover.getId().toString()).get(0);
if (storagePort == null) {
// Did not find a single storage port for this DM, ignore it
_logger.debug("StoragePort is null");
continue;
}
// storagePort.setStorageHADomain(mover.getId());
// get vnas uri
URI moverURI = getNASUri(mover, storageSystem);
// Retrieve FS-mountpath map for the Data Mover.
_logger.info("Retrieving FS-mountpath map for Data Mover {}.", mover.getAdapterName());
VNXFileSshApi sshDmApi = new VNXFileSshApi();
sshDmApi.setConnParams(storageSystem.getIpAddress(), storageSystem.getUsername(), storageSystem.getPassword());
Map<String, String> fileSystemMountpathMap = sshDmApi.getFsMountpathMap(mover.getAdapterName());
Map<String, Map<String, String>> moverExportDetails = sshDmApi.getCIFSExportsForPath(mover.getAdapterName());
Map<String, String> nameIdMap = getFsNameFsNativeIdMap(storageSystem);
// Loop through the map and, if the file exists in DB, retrieve the
// export, process export, and associate export with the FS
Set<String> fsNames = fileSystemMountpathMap.keySet();
for (String fsName : fsNames) {
// Retrieve FS from DB. If FS found, retrieve export and process
String fsMountPath = fileSystemMountpathMap.get(fsName);
// Get FS ID for nativeGUID
// VNXFileSystem vnxFileSystems = discoverNamedFileSystem(storageSystem, fsName);
String fsId = nameIdMap.get(fsName);
_logger.debug("Resolved FileSystem name {} to native Id {}", fsName, fsId);
UnManagedFileSystem vnxufs = null;
if (fsId != null) {
String fsNativeGuid = NativeGUIDGenerator.generateNativeGuidForPreExistingFileSystem(storageSystem.getSystemType(), storageSystem.getSerialNumber().toUpperCase(), fsId);
vnxufs = checkUnManagedFileSystemExistsInDB(fsNativeGuid);
}
if (vnxufs != null) {
int noOfShares = 0;
// Get export info
for (String expPath : moverExportDetails.keySet()) {
if (!expPath.contains(fsMountPath)) {
// Ignore this path as it is not among the exports
continue;
} else {
// We should process only FS and its sub-directory exports only.
String subDir = expPath.substring(fsMountPath.length());
if (!subDir.isEmpty() && !subDir.startsWith("/")) {
continue;
}
_logger.info("Path : {} ", expPath);
}
Map<String, String> fsExportInfo = moverExportDetails.get(expPath);
if ((fsExportInfo != null) && (fsExportInfo.size() > 0)) {
noOfShares += 1;
_logger.info("Associating FS share map for VNX UMFS {}", vnxufs.getLabel());
associateCifsExportWithFS(vnxufs, expPath, fsExportInfo, storagePort);
vnxufs.setHasShares(true);
vnxufs.putFileSystemCharacterstics(UnManagedFileSystem.SupportedFileSystemCharacterstics.IS_FILESYSTEM_EXPORTED.toString(), TRUE);
_logger.debug("Export map for VNX UMFS {} = {}", vnxufs.getLabel(), vnxufs.getUnManagedSmbShareMap());
List<UnManagedCifsShareACL> cifsACLs = applyCifsSecurityRules(vnxufs, expPath, fsExportInfo, storagePort);
_logger.info("Number of acls discovered for file system {} is {}", vnxufs.getId() + ":" + vnxufs.getLabel(), cifsACLs.size());
for (UnManagedCifsShareACL cifsAcl : cifsACLs) {
_logger.info("Unmanaged File share acl: {}", cifsAcl);
String fsShareNativeId = cifsAcl.getFileSystemShareACLIndex();
_logger.info("UMFS Share ACL index: {}", fsShareNativeId);
String fsUnManagedFileShareNativeGuid = NativeGUIDGenerator.generateNativeGuidForPreExistingFileShare(storageSystem, fsShareNativeId);
_logger.info("Native GUID {}", fsUnManagedFileShareNativeGuid);
cifsAcl.setNativeGuid(fsUnManagedFileShareNativeGuid);
// Check whether the CIFS share ACL was present in ViPR DB.
UnManagedCifsShareACL existingACL = checkUnManagedFsCifsACLExistsInDB(_dbClient, cifsAcl.getNativeGuid());
if (existingACL == null) {
newUnManagedCifsACLs.add(cifsAcl);
} else {
newUnManagedCifsACLs.add(cifsAcl);
existingACL.setInactive(true);
oldUnManagedCifsACLs.add(existingACL);
}
}
// set vNAS on umfs
StringSet moverSet = new StringSet();
moverSet.add(moverURI.toString());
vnxufs.putFileSystemInfo(UnManagedFileSystem.SupportedFileSystemInformation.NAS.toString(), moverSet);
unManagedExportBatch.add(vnxufs);
}
}
if (noOfShares == 0) {
_logger.info("FileSystem {} does not have shares ", vnxufs.getLabel());
}
}
if (unManagedExportBatch.size() >= VNXFileConstants.VNX_FILE_BATCH_SIZE) {
// Add UnManagedFileSystem batch
// Update UnManagedFilesystem
_dbClient.persistObject(unManagedExportBatch);
unManagedExportBatch.clear();
}
if (newUnManagedCifsACLs.size() >= VNXFileConstants.VNX_FILE_BATCH_SIZE) {
// create new UnManagedCifsShareACL
_logger.info("Saving Number of New UnManagedCifsShareACL(s) {}", newUnManagedCifsACLs.size());
_dbClient.createObject(newUnManagedCifsACLs);
newUnManagedCifsACLs.clear();
}
if (oldUnManagedCifsACLs.size() >= VNXFileConstants.VNX_FILE_BATCH_SIZE) {
// Update existing UnManagedCifsShareACL
_logger.info("Saving Number of Old UnManagedCifsShareACL(s) {}", oldUnManagedCifsACLs.size());
_dbClient.persistObject(oldUnManagedCifsACLs);
oldUnManagedCifsACLs.clear();
}
}
}
if (!unManagedExportBatch.isEmpty()) {
// Update UnManagedFilesystem
_dbClient.persistObject(unManagedExportBatch);
unManagedExportBatch.clear();
}
if (!newUnManagedCifsACLs.isEmpty()) {
// create new UnManagedCifsShareACL
_logger.info("Saving Number of New UnManagedCifsShareACL(s) {}", newUnManagedCifsACLs.size());
_dbClient.createObject(newUnManagedCifsACLs);
newUnManagedCifsACLs.clear();
}
if (!oldUnManagedCifsACLs.isEmpty()) {
// Update existing UnManagedCifsShareACL
_logger.info("Saving Number of Old UnManagedCifsShareACL(s) {}", oldUnManagedCifsACLs.size());
_dbClient.persistObject(oldUnManagedCifsACLs);
oldUnManagedCifsACLs.clear();
}
// discovery succeeds
storageSystem.setDiscoveryStatus(DiscoveredDataObject.DataCollectionJobStatus.COMPLETE.toString());
detailedStatusMessage = String.format("Discovery completed successfully for VNXFile shares: %s", storageSystemId.toString());
} catch (Exception ex) {
if (storageSystem != null) {
cleanupDiscovery(storageSystem);
}
storageSystem.setDiscoveryStatus(DiscoveredDataObject.DataCollectionJobStatus.ERROR.toString());
detailedStatusMessage = String.format("Discovery failed for VNXFile cifs shares %s because %s", storageSystemId.toString(), ex.getLocalizedMessage());
_logger.error(detailedStatusMessage, ex);
} finally {
if (storageSystem != null) {
try {
// set detailed message
storageSystem.setLastDiscoveryStatusMessage(detailedStatusMessage);
_dbClient.persistObject(storageSystem);
} catch (Exception ex) {
_logger.error("Error while persisting object to DB", ex);
}
}
}
}
use of com.emc.storageos.db.client.model.UnManagedDiscoveredObjects.UnManagedCifsShareACL in project coprhd-controller by CoprHD.
the class VNXeUnManagedObjectDiscoverer method applyCifsSecurityRules.
private List<UnManagedCifsShareACL> applyCifsSecurityRules(UnManagedFileSystem vnxeufs, String expPath, VNXeCifsShare exp, StoragePort storagePort) {
List<UnManagedCifsShareACL> cifsACLs = new ArrayList<UnManagedCifsShareACL>();
UnManagedCifsShareACL unManagedCifsShareACL = new UnManagedCifsShareACL();
String shareName = exp.getName();
unManagedCifsShareACL.setShareName(shareName);
// user
unManagedCifsShareACL.setUser(FileControllerConstants.CIFS_SHARE_USER_EVERYONE);
// permission
unManagedCifsShareACL.setPermission(FileControllerConstants.CIFS_SHARE_PERMISSION_CHANGE);
unManagedCifsShareACL.setId(URIUtil.createId(UnManagedCifsShareACL.class));
// filesystem id
unManagedCifsShareACL.setFileSystemId(vnxeufs.getId());
cifsACLs.add(unManagedCifsShareACL);
return cifsACLs;
}
Aggregations