Skip to content

Commit e07a695

Browse files
authored
Saimon/add docs file access (#285)
1 parent 1d52332 commit e07a695

10 files changed

+68
-28
lines changed

docs/source/UserGuides/Edge/Quickstart.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Quickstart
44

55
Eager to get started? This page gives a good introduction in how to get started with the CTERA SDK and the Edge Filer APIs.
66

7-
First, make sure that aiohttp is :ref:`installed<cterasdk-installation>` and up-to-date
7+
First, make sure that cterasdk is :ref:`installed<cterasdk-installation>` and up-to-date
88

99
Let’s get started with some simple examples.
1010

docs/source/UserGuides/Portal/Files.rst

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,47 @@ List
88
.. automethod:: cterasdk.core.files.browser.FileBrowser.listdir
99
:noindex:
1010

11+
Use the following API to list the contents of a directory as a Global Administrator.
12+
This API requires that the administrator has *Access End User Folders*.
13+
For more details, see `Customizing Administrator Roles` <https://kb.ctera.com/docs/customizing-administrator-roles-2>`_.
14+
1115
.. code:: python
1216
1317
with GlobalAdmin('tenant.ctera.com') as admin:
1418
admin.login('admin-user', 'admin-pass')
15-
admin.files.listdir('Users/John Smith/My Files')
16-
admin.files.listdir('Users/John Smith/My Files', include_deleted=True) # include deleted files
19+
20+
"""List all sub-directories"""
21+
for f in admin.files.listdir('Users/John Smith/My Files'):
22+
if f.isFolder:
23+
print({
24+
f.name,
25+
f.href,
26+
f.permalink # a URL that links directly to a specific file
27+
})
28+
29+
..
30+
31+
Use the following API to list the contents of a directory as an End User or a Team Portal Administrator.
32+
This API requires that the Team Portal Administrator has *Access End User Folders*.
33+
For more details, see `Viewing Folder Content <https://kb.ctera.com/docs/managing-folders-1#viewing-folder-content>`_.
34+
35+
.. code:: python
1736
1837
with ServicesPortal('tenant.ctera.com') as user:
1938
user.login('username', 'user-password')
20-
user.files.listdir('My Files/Documents')
21-
user.files.listdir('My Files/Documents', include_deleted=True) # include deleted files
39+
for f in user.files.listdir('My Files/Documents'):
40+
if not f.isFolder:
41+
print({
42+
f.name,
43+
f.href,
44+
f.size,
45+
f.lastmodified,
46+
f.permalink # a URL that links directly to a specific file
47+
})
48+
49+
"""List all deleted files"""
50+
deleted_files = [f.href for f in user.files.listdir('My Files/Documents', include_deleted=True) if f.isDeleted]
51+
print(deleted_files)
2252
2353
.. automethod:: cterasdk.core.files.browser.FileBrowser.walk
2454
:noindex:

docs/source/UserGuides/Portal/Quickstart.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Quickstart
44

55
Eager to get started? This page gives a good introduction in how to get started with the CTERA SDK and the Portal APIs.
66

7-
First, make sure that aiohttp is :ref:`installed<cterasdk-installation>` and up-to-date
7+
First, make sure that cterasdk is :ref:`installed<cterasdk-installation>` and up-to-date
88

99
Let’s get started with some simple examples.
1010

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
cterasdk.clients.tracers.logger module
2+
======================================
3+
4+
.. automodule:: cterasdk.clients.tracers.logger
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/source/api/cterasdk.clients.tracers.logging_tracers.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
cterasdk.clients.tracers.postman module
2+
=======================================
3+
4+
.. automodule:: cterasdk.clients.tracers.postman
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/source/api/cterasdk.clients.tracers.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ Submodules
1111

1212
.. toctree::
1313

14-
cterasdk.clients.tracers.logging_tracers
15-
cterasdk.clients.tracers.session_tracers
14+
cterasdk.clients.tracers.logger
15+
cterasdk.clients.tracers.postman
16+
cterasdk.clients.tracers.session
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
cterasdk.clients.tracers.session module
2+
=======================================
3+
4+
.. automodule:: cterasdk.clients.tracers.session
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/source/api/cterasdk.clients.tracers.session_tracers.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/source/index.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,20 @@ The CTERA SDK for Python provides developers with powerful tools to automate the
66
of the CTERA Global File System, streamline data management tasks,
77
and seamlessly integrate CTERA's global namespace with their applications.
88

9-
Current version is |release|.
10-
119
.. _GitHub: https://github.com/ctera/ctera-python-sdk
1210

1311

1412
Key Features
1513
============
1614

17-
- Supports configuration management for CTERA Drive, Edge Filer and Portal, including remote access
18-
- Supports managing CTERA Migrate
19-
- Supports file access for CTERA Edge Filer and Portal
20-
15+
1. Configuration Management:
16+
1. `Portal Management <UserGuides/Portal/Administration.html>`_
17+
2. `Edge Filer Management <UserGuides/Edge/Configuration.html>`_, including remote access.
18+
2. Managing `Data Discovery and Migration Jobs <UserGuides/Edge/Migration.html>`_
19+
3. File Data Management APIs for `CTERA Edge Filer <UserGuides/Edge/Index.html>`_ and `CTERA Portal <UserGuides/Portal/Index.html>`_.
20+
4. Data Services Framework:
21+
1. `Subscribing to File System Notifications <UserGuides/DataServices/NotificationService.html>`_
22+
2. `CTERA Direct IO <UserGuides/DataServices/DirectIO.html>`_, enabling parallel high-performnace retrieval directly from object storage.
2123

2224
.. _cterasdk-installation:
2325

0 commit comments

Comments
 (0)