- Update documentation to require :py:class:`cterasdk.core.types.UserAccount` in :py:class:`cterasdk.core.types.CloudFSFolderFindingHelper`
- Support downloading files from Azure Blob Storage via CTERA Direct I/O.
Capture the logged-on user's permission to access user folders
Add ability to:
- Compute paths based on slices
- Compute paths relative to another path
- Verify whether a path is relative to another path
Add a function to verify and raise an error on user access before executing a remote file system command
Support validating user permissions for the following commands:
handle,handle_many,download,download_many,mkdir,makedirs,listdir,walk,properties,exists,versions,permalink,copy,move,delete,upload,upload_fileSupport "upload only" permission when sharing public links
Migrate SDK configuration from YAML file to Python module
Support bearer token authentication
- Fixed directory creation behavior when the portal returns
NoneorOkresponses - Resolve regression in cookie-based authentication caused by aiohttp library upgrade
- Added support for Edge Filer v7.11 dual-interface network configuration, including MTU and static routes
- Refactored file browser extensions for Edge Filer and Portal
- Improved exception handling for file access errors
- Updated documentation for file browser extensions
- Listing previous versions, files, and directories now returns Python objects
- Added automatic path inference from multiple input types
- Introduced a version-based module initialization template
- Added
backupsto the list of omitted fields to allow printing the Portal object - Fixed handling of HTTP
Conflicterrors
Related issues and pull requests on GitHub: #329
- Upgraded library dependencies to address security vulnerabilities
- Improved management of Edge Filer static routes.
- Added a CLI command for downloading files via CTERA Direct I/O.
cterasdk.io.direct.download --helpWith credentials set as environment variables
export cterasdk.io.direct.access_key_id="L5WT94ULMS3KFNE7IK5O"
export cterasdk.io.direct.secret_access_key="CVZG1U07gRaY4sEdUmIH7tkHN7Vn63RKyvP6Rmrh"
cterasdk.io.direct.download --endpoint https://192.168.94.137 --file-id 14390 --path ./art.png --no-verify-ssl --debugWith credentials supplied as arguments
cterasdk.io.direct.download --endpoint https://192.168.94.137 --file-id 14390 --access ABC --secret XYZ --path ./art.png --no-verify-ssl --debug- Update build process to use pyproject.toml
- Refactored all file system modules to adopt the Command design pattern.
- Added handling for HTTP errors during login, raising :py:class:`cterasdk.exceptions.auth.AuthenticationError`.
- Enabled full support for both synchronous and asynchronous file system operations.
- Replaced the ShareRecipient class with :py:class:`cterasdk.core.types.Collaborator`.
- Enhanced exception handling for file system errors in both Edge and Core modules.
- Fixed SNMPv3 configuration on Edge Filers - added missing XML class name for proper serialization
- Fixed whitespace in SNMP docstring to resolve flake8 W293 warning
Related issues and pull requests on GitHub: #319
- Added a unique
User-Agentheader to all requests made by the CTERA Python SDK - Raised exceptions on upload errors to CTERA Portal
- Raised :py:class:`cterasdk.exceptions.session.SessionExpired` upon session expiration
- Listed the Cloud Drive root by default if no
pathargument was provided to :py:func:`cterasdk.core.files.browser.FileBrowser.listdir` - Added :py:class:`cterasdk.exceptions.notifications.AncestorsError` exception
- Added :py:class:`cterasdk.exceptions.transport.TLSError` exception
- Suppressed session expiration exceptions on logout
- Added support for resolving file conflicts on copy and move operations using :py:class:`cterasdk.core.types.ConflictResolver`
- Corrected Direct I/O object class references in the documentation
"""Catching upload exceptions"""
try:
...
except cterasdk.exceptions.io.OutOfQuota as e:
print('Failure due to quota violation.')
except cterasdk.exceptions.io.RejectedByPolicy as e:
print('Failure due to Cloud Drive policy violation.')
except cterasdk.exceptions.io.NoStorageBucket as e:
print('No backend storage bucket is available.')
except cterasdk.exceptions.io.WindowsACLError as e:
print('Attempt to upload a file to a Windows ACL-enabled cloud drive folder.')
except cterasdk.exceptions.io.UploadException:
print('Base exception for any upload errors.')
"""Catching expired sessions"""
try:
...
except cterasdk.exceptions.session.SessionExpired as e:
print('Session expired. Re-authenticate to establish a new session.')- Starting with this version, the CTERA Python SDK
User-Agentheader is formatted as follows:
CTERA Python SDK/2.20.20; aiohttp/3.9.5; (Windows 10; AMD64; Python 3.11.4);
- Introduced support for resolving conflicts during copy and move operations
"""Override destination on conflict"""
resolver = core_types.ConflictResolver.override()
user.files.copy(('My Files/Gelato.pptx', 'My Files/Slides/Gelato.pptx'), resolver=resolver)
"""Resume job from cursor"""
objects = (
'My Files/Gelato.pptx', 'My Files/Slides/Gelato.pptx',
'Spreadsheets/Q1Summary.xlsx', 'Sheets/Q1Summary.pptx'
)
try:
user.files.copy(objects)
except cterasdk.exceptions.io.FileConflict as e:
resolver = core_types.ConflictResolver.override() # override destination
user.files.copy(objects, resolver=resolver, cursor=e.cursor) # resume copy from cursorRelated issues and pull requests on GitHub: #316, #317 #318
- Refactored the CTERA Direct I/O module to reduce duplicate code and improve exception handling.
- Added support for configuring Cloud Drive folders with Global File Locking.
- Improved authentication error handling by catching HTTP exceptions and raising :py:class:`cterasdk.exceptions.auth.AuthenticationError`.
- Added an attribute to indicate whether deduplication is enabled when retrieving the deduplication status.
- Raise an exception when uploading a file with invalid characters in its name.
- Raise an exception when attempting to upload files to the Cloud Drive root directory.
- Added support for exporting data discovery and migration jobs to CSV format.
- Introduced an asynchronous task management module for operations such as copying, moving, renaming, deleting, or undeleting files.
- Background tasks now return awaitable objects: :py:class:`cterasdk.lib.tasks.AwaitableEdgeTask`, :py:class:`cterasdk.lib.tasks.AwaitablePortalTask`.
- Fixed an AttributeError when a connection error occurs while waiting for an Edge Filer to reboot.
Related issues and pull requests on GitHub: #315
# Background task: 'Apply Provisioning Changes'
result = admin.users.apply_changes(wait=True) # Wait for provisioning changes to complete and return the result
awaitable_task = admin.users.apply_changes() # Return an awaitable task object without waiting
result = awaitable_task.status() # Get the current status of the task
result = awaitable_task.wait() # Wait for task completion
result = awaitable_task.wait(timeout=5) # Wait up to 5 seconds for the task to complete
# Moving files and folders
result = user.files.move(('My Files/doc.docx', 'Documents/Guide.docx')) # Move a file and wait for completion
awaitable_task = user.files.move(('My Files/doc.docx', 'Documents/Guide.docx'), wait=False) # Return an awaitable task object
result = awaitable_task.wait() # Wait for the move operation to complete- Added support for managing email alerts on Edge Filers.
- Fixed an issue where email server credentials were not stored correctly due to a missing class name in the object.
Related issues and pull requests on GitHub: #314
- Added support to validate if deduplication is enabled on the CTERA Edge Filer
Related issues and pull requests on GitHub: #313,
- Added support for enabling or disabling Direct Mode on CTERA Portal Storage Nodes.
- Support copying and moving multiple sources to multiple destinations on CTERA Portal.
- Removed redundant call when retrieving the list of domain mappings.
Related issues and pull requests on GitHub: #310, #311 #312
"""
Copy multiple sources: the 'Sample.docx' file and the 'Spreadsheets' directory to 'My Files/Archive'
"""
user.files.copy('My Files/Documents/Sample.docx', 'My Files/Spreadsheets', destination='My Files/Archive')
"""
Copy multiple sources to different destinations under a different name.
"""
user.files.copy(
("Docs/Report_January.docx", "Archive/Jan_Report_Final.docx"),
("Budget/Budget_2024.xlsx", "Finance/2024_Annual_Budget.xlsx"),
("Presentations/Presentation.pptx", "Sales/Q2_Sales_Pitch.pptx")
)- Support retrieving, adding, and removing Edge Filer hosts file entries.
- Add documentation for the Edge Filer Ransomware Protection APIs.
- Add support for managing the Edge Filer's Antivirus (Bit Defender).
- Fixed a documentation error related to deleting and undeleting Team Portal tenants.
- Fixed an error when printing Edge Filer throttling policy rules set to "Every Day".
Related issues and pull requests on GitHub: #306, #307, #308, #309
- CTERA Portal: Added support for special characters when copying, moving, renaming, sharing, and deleting files.
Related issues and pull requests on GitHub: #305
- Increased the HTTP request timeout when long polling for changes.
- Updated the default socket connection and read timeouts for synchronous Edge Filer access to 30 and 60 seconds, respectively.
Related issues and pull requests on GitHub: #303
- Support for overriding timeout settings on a per-request basis.
- Increased the
sock_readtimeout to 2 minutes when invoking :py:func:`cterasdk.edge.network.Diagnostics.tcp_connect`.
Related issues and pull requests on GitHub: #302
- Added a compatibility notice.
- Included the changelog in the CTERA Python SDK documentation.
Related issues and pull requests on GitHub: #301
- Revamped the exception modules in
cterasdk.exceptions. - Added support for file-walk operations without specifying a path (defaults to the root directory).
- Implemented automatic file rename during upload if the destination path includes a file name that already exists.
Related issues and pull requests on GitHub: #300
- Introduced new exceptions for HTTP errors.
- Added support for listing and walking directories via WebDAV on the Edge Filer using
AsyncEdgeandEdgeclients. - Added a method to check if a file or folder exists.
Related issues and pull requests on GitHub: #299
- Added compatibility for CTERA Direct IO with CTERA Portal v8.3.
Related issues and pull requests on GitHub: #298
- Updated :py:class:`cterasdk.common.object.Object` to inherit from
MutableMapping, enabling dictionary-like access. - Added support for the HTTP PROPFIND method.
Related issues and pull requests on GitHub: #297
- Added support for deleting multiple files on the Edge Filer in a single call.
Related issues and pull requests on GitHub: #296
- Fixed an issue where
AsyncGlobalAdmincould not browse Team Portal tenants.
- Moved instantiation of the TCP connector to the point of
ClientSessioncreation.
Related issues and pull requests on GitHub: #295
- This version introduces a new
AsyncEdgeobject for asynchronous access to the CTERA Edge Filer. - Supported file browser operations include:
listdir,handle,handle_many,download,download_many,upload,upload_file,mkdir,makedirs,copy,move, anddelete.
Logging is no longer enabled by default. As of this version, it is the responsibility of the client application to configure logging explicitly. This change aligns with best practices for libraries and allows greater flexibility in how logs are managed.
Introduced improved configuration settings to support both synchronous and asynchronous access to the CTERA Portal and Edge Filers.
# Disable TLS verification for CTERA Portal clients cterasdk.settings.core.syn.settings.connector.ssl = False # GlobalAdmin, ServicesPortal cterasdk.settings.core.asyn.settings.connector.ssl = False # AsyncGlobalAdmin, AsyncServicesPortal # Disable TLS verification for CTERA Edge Filer clients cterasdk.settings.edge.syn.settings.connector.ssl = False # Edge cterasdk.settings.edge.asyn.settings.connector.ssl = False # AsyncEdge
Related issues and pull requests on GitHub: #294