cterasdk.edge.shares module#
- class cterasdk.edge.shares.Shares(edge)#
Bases:
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, trusted_nfs_clients=None, uuid=None)#
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
trusted_nfs_clients (list[cterasdk.edge.types.NFSv3AccessControlEntry]) – Trusted NFS v3 clients, defaults to
None
- 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
- add_screened_file_types(name, extensions)#
Add extensions to the share’s current list of blocked file extensions
- Parameters:
name (str) – The share name
extensions (list[str]) – List of file extensions to add
- add_trusted_nfs_clients(name, trusted_nfs_clients)#
Add one or more trusted NFS client entries to an existing share.
- Parameters:
name (str) – The share name
trusted_nfs_clients (list[cterasdk.edge.types.NFSv3AccessControlEntry]) – Trusted NFS v3 clients
- 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
- get_access_type(name)#
Get the network share Windows File Sharing authentication mode
- Parameters:
name (str) – The share name
- get_acl(name)#
Get the current access control entries from an existing share.
- Parameters:
name (str) – The share name
- get_screened_file_types(name)#
Get the share’s current list of blocked file extensions
- Parameters:
name (str) – The share name
- get_trusted_nfs_clients(name)#
Get the current trusted NFS client entries from an existing share.
- Parameters:
name (str) – The share name
- 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, trusted_nfs_clients=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
trusted_nfs_clients (list[cterasdk.edge.types.NFSv3AccessControlEntry]) – Trusted NFS v3 clients, defaults to
None
- 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
- remove_screened_file_types(name, extensions)#
Remove extensions from the share’s current list of blocked file extensions
- Parameters:
name (str) – The share name
extensions (list[str]) – List of file extensions to remove
- remove_trusted_nfs_clients(name, trusted_nfs_clients)#
Remove one or more trusted NFS client entries from an existing share.
- Parameters:
name (str) – The share name
trusted_nfs_clients (list[cterasdk.edge.types.RemoveNFSv3AccessControlEntry]) – Trusted NFS v3 clients
- set_access_type(name, access)#
Set the network share Windows File Sharing authentication mode
- Parameters:
name (str) – The share name
access (cterasdk.edge.enum.Acl) – The Windows File Sharing authentication mode
- 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_screened_file_types(name, extensions)#
Set the share’s current list of blocked file extensions (override the current list)
- Parameters:
name (str) – The share name
extensions (list[str]) – List of file extensions to block
- set_share_winacls(name)#
Set a network share to use Windows ACL Emulation Mode
- Parameters:
name (str) – The share name
- set_trusted_nfs_clients(name, trusted_nfs_clients)#
Set a network share’s trusted NFS client entries.
- Parameters:
name (str) – The share name
trusted_nfs_clients (list[cterasdk.edge.types.NFSv3AccessControlEntry]) – Trusted NFS v3 clients
Warning
this method will override the existing access control entries