The CTERA SDK allows organizations to deploy and continuously manage file services using infrastructure as code (IaC), making it easy to automate global file system management with easy-to-use, clearly documented Python and Ansible interfaces.
Using the CTERA SDK you can:
- Rapidly deploy and manage hundreds of edge filers.
- Make application development faster by consuming APIs and pre-built microservices.
- Improve infrastructure monitoring through performance metrics.
- Automate the creation of network shares and user ACLs.
- Provision users and automate tools for user, folder, and storage quota management, as well as network shares creation.
To access the SDK, including full documentation, go to https://pypi.org/project/cterasdk/.
Examples
The SDK includes examples. The following are a few samples:
Portal Examples
Logging In as Global Administrator
from cterasdk import *
from getpass import getpass
global_admin = GlobalAdmin('sdk.ctera.com')
global_admin.login('administrator', getpass())
Add a Portal User Account
global_admin.users.add(
name='jsmith',
email='jsmith@acme.com',
first_name='John',
last_name='Smith',
password=getpass()
)
Create a Folder Group
global_admin.cloudfs.mkfg(
name='FG-001',
owner= portal_types.UserAccount('jsmith')
)
Create a Cloud Drive Folder
global_admin.cloudfs.mkdir(
name='DRIVE-001',
group='FG-001',
owner= portal_types.UserAccount('jsmith')
)
Edge Filer Examples
Create the First Edge Filer Administrator Account
from cterasdk import *
from getpass import getpass
filer = Gateway('vGateway-01db')
filer.users.add_first_user('administrator', getpass())
Connect to Active Directory
filer.directoryservice.connect('ctera.me', 'administrator', getpass())
Connect to CTERA Portal (the Global File System)
device.services.connect('sdk.ctera.com', 'jsmith', getpass(), license='EV16')
Enable Caching Gateway
filer.cache.enable()
filer.sync.unsuspend()
Pin a Sub-folder (Make Available Offline)
filer.cache.pin('users/John Smith/DRIVE-001/Documents')