Skip to content

Latest commit

 

History

History
486 lines (328 loc) · 15.4 KB

File metadata and controls

486 lines (328 loc) · 15.4 KB

Changelog

2.20.30

Bug Fixes

2.20.28

Improvements

  • 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_file

  • Support "upload only" permission when sharing public links

  • Migrate SDK configuration from YAML file to Python module

  • Support bearer token authentication

Bug Fixes

  • Fixed directory creation behavior when the portal returns None or Ok responses
  • Resolve regression in cookie-based authentication caused by aiohttp library upgrade

2.20.26

Improvements

  • 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

Bug Fixes

  • Added backups to the list of omitted fields to allow printing the Portal object
  • Fixed handling of HTTP Conflict errors

Related issues and pull requests on GitHub: #329

2.20.25

Security

  • Upgraded library dependencies to address security vulnerabilities

2.20.24

Improvements

  • Improved management of Edge Filer static routes.
  • Added a CLI command for downloading files via CTERA Direct I/O.
cterasdk.io.direct.download --help

With 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 --debug

With 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

2.20.23

Improvements

  • Update build process to use pyproject.toml

2.20.22

Improvements

2.20.21

Bug Fixes

  • 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

2.20.20

Improvements

Bug Fixes

  • 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-Agent header 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 cursor

Related issues and pull requests on GitHub: #316, #317 #318

2.20.19

Improvements

  • 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`.

Bug Fixes

  • 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

2.20.18

Improvements

  • Added support for managing email alerts on Edge Filers.

Bug Fixes

  • 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

2.20.17

Improvements

  • Added support to validate if deduplication is enabled on the CTERA Edge Filer

Related issues and pull requests on GitHub: #313,

2.20.16

Improvements

  • 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.

Bug Fixes

  • 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")
)

2.20.15

Improvements

  • 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).

Bug Fixes

  • 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

2.20.14

Bug Fixes

  • CTERA Portal: Added support for special characters when copying, moving, renaming, sharing, and deleting files.

Related issues and pull requests on GitHub: #305

2.20.13

Bug Fixes

  • 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

2.20.12

Improvements

Related issues and pull requests on GitHub: #302

2.20.11

Improvements

  • Added a compatibility notice.
  • Included the changelog in the CTERA Python SDK documentation.

Related issues and pull requests on GitHub: #301

2.20.10

Improvements

  • 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

2.20.9

Improvements

  • Introduced new exceptions for HTTP errors.
  • Added support for listing and walking directories via WebDAV on the Edge Filer using AsyncEdge and Edge clients.
  • Added a method to check if a file or folder exists.

Related issues and pull requests on GitHub: #299

2.20.8

What's New

  • Added compatibility for CTERA Direct IO with CTERA Portal v8.3.

Related issues and pull requests on GitHub: #298

2.20.7

Improvements

Related issues and pull requests on GitHub: #297

2.20.6

Bug Fixes

  • Added support for deleting multiple files on the Edge Filer in a single call.

Related issues and pull requests on GitHub: #296

2.20.5

Bug Fixes

  • Fixed an issue where AsyncGlobalAdmin could not browse Team Portal tenants.

2.20.4

Bug Fixes

  • Moved instantiation of the TCP connector to the point of ClientSession creation.

Related issues and pull requests on GitHub: #295

2.20.3

What's New

  • This version introduces a new AsyncEdge object 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, and delete.

Improvements

  • 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