cterasdk.edge.shares module¶
-
class
cterasdk.edge.shares.
Shares
(gateway)¶ Bases:
cterasdk.edge.base_command.BaseCommand
-
add
(name, directory, acl=None, access='winAclMode', csc='manual', dir_permissions=777, comment=None, export_to_afp=False, export_to_ftp=False, export_to_nfs=False, export_to_pc_agent=False, export_to_rsync=False, indexed=False)¶ Add a network share.
Parameters: - name (str) – The share name
- directory (str) – Full directory path
- acl (list[cterasdk.edge.types.ShareAccessControlEntry]) – List of access control entries
- access (cterasdk.edge.enum.Acl) – The Windows File Sharing authentication mode, defaults to
winAclMode
- csc (cterasdk.edge.enum.ClientSideCaching) – The client side caching (offline files) configuration, defaults to
manual
- dir_permissions (int) – Directory Permission, defaults to 777
- comment (str) – Comment
- export_to_afp (bool) – Whether to enable AFP access, defaults to
False
- export_to_ftp (bool) – Whether to enable FTP access, defaults to
False
- export_to_nfs (bool) – Whether to enable NFS access, defaults to
False
- export_to_pc_agent (bool) – Whether to allow as a destination share for CTERA Backup Agents, defaults to
False
- export_to_rsync (bool) – Whether to enable access over rsync, defaults to
False
- indexed (bool) – Whether to enable indexing for search, defaults to
False
-
add_acl
(name, acl)¶ Add one or more access control entries to an existing share.
Parameters: - name (str) – The share name
- acl (list[cterasdk.edge.types.ShareAccessControlEntry]) – List of access control entries to add
-
block_files
(name, extensions)¶ Configure a share to block one or more file extensions
Parameters: - name (str) – The share name
- extensions (list[str]) – List of file extensions to block
-
delete
(name)¶ Delete a share.
Parameters: name (str) – The share name
-
get
(name=None)¶ Get Share. If a share name was not passed as an argument, a list of all shares will be retrieved :param str,optional name: Name of the share
-
modify
(name, directory=None, acl=None, access=None, csc=None, dir_permissions=None, comment=None, export_to_afp=None, export_to_ftp=None, export_to_nfs=None, export_to_pc_agent=None, export_to_rsync=None, indexed=None)¶ Modify an existing network share. All parameters but name are optional and default to None
Parameters: - name (str) – The share name
- directory (str,optional) – Full directory path
- acl (list[cterasdk.edge.types.ShareAccessControlEntry],optional) – List of access control entries
- access (cterasdk.edge.enum.Acl,optional) – The Windows File Sharing authentication mode
- csc (cterasdk.edge.enum.ClientSideCaching,optional) – The client side caching (offline files) configuration
- dir_permissions (int,optional) – Directory Permission
- comment (str,optional) – Comment
- export_to_afp (bool,optional) – Whether to enable AFP access
- export_to_ftp (bool,optional) – Whether to enable FTP access
- export_to_nfs (bool,optional) – Whether to enable NFS access
- export_to_pc_agent (bool,optional) – Whether to allow as a destination share for CTERA Backup Agents
- export_to_rsync (bool,optional) – Whether to enable access over rsync
- indexed (bool,optional) – Whether to enable indexing for search
-
remove_acl
(name, acl)¶ Remove one or more access control entries from an existing share.
Parameters: - name (str) – The share name
- acl (list[cterasdk.edge.types.RemoveShareAccessControlEntry]) – List of access control entries to remove
-
set_acl
(name, acl)¶ Set a network share’s access control entries.
Parameters: - name (str) – The share name
- acl (list[cterasdk.edge.types.ShareAccessControlEntry]) – List of access control entries
Warning
this method will override the existing access control entries
-
set_share_winacls
(name)¶ Set a network share to use Windows ACL Emulation Mode
Parameters: name (str) – The share name
-