Shared File System Turbo (SFS Turbo)

SFS Turbo Share

Scalable File Service (SFS) provides high-performance file storage that is scalable on demand. It can be shared with multiple Elastic Cloud Servers (ECS).

Create Share

This interface is used to create a share (scalable file system). Share.

import openstack
from otcextensions import sdk


openstack.enable_logging(True)
conn = openstack.connect(cloud='otc')
sdk.register_otc_extensions(conn)

attrs = {
    "name": "test_share_1",
    "share_proto": "NFS",
    "share_type": "STANDARD",
    "size": 100,
    "availability_zone": 'eu-de-01',
    "vpc_id": "vpc_uuid",
    "subnet_id": "subnet_uuid",
    "security_group_id": "security_group_uuid"
}

share = conn.sfsturbo.create_share(**attrs)
conn.sfsturbo.wait_for_share(share)

Delete Share

This interface is used to delete a share (scalable file system). Share.

import openstack
from otcextensions import sdk


openstack.enable_logging(True)
conn = openstack.connect(cloud='otc')
sdk.register_otc_extensions(conn)

share = conn.sfsturbo.delete_share(share="share-uuid")

Find Share

This interface is used to find a share (scalable file system) by name ot id. Share.

import openstack
from otcextensions import sdk


openstack.enable_logging(True)
conn = openstack.connect(cloud='otc')
sdk.register_otc_extensions(conn)

share = conn.sfsturbo.find_share(name_or_id="share-name-or-id")
print(share)

Get Share

This interface is used to get a share (scalable file system) by name or class object. Share.

import openstack
from otcextensions import sdk


openstack.enable_logging(True)
conn = openstack.connect(cloud='otc')
sdk.register_otc_extensions(conn)

share = conn.sfsturbo.get_share(share="share-uuid")
print(share)

Change security group for share

This interface is used to change a security group for share (scalable file system). Share.

import openstack
from otcextensions import sdk


openstack.enable_logging(True)
conn = openstack.connect(cloud='otc')
sdk.register_otc_extensions(conn)

share = conn.sfsturbo.change_security_group(
    share="share-uuid",
    security_group_id='secgroup-uuid')
conn.sfsturbo.wait_for_change_security_group(share)

Extend capacity for share

This interface is used to extend capacity for share (scalable file system). Share.

import openstack
from otcextensions import sdk


openstack.enable_logging(True)
conn = openstack.connect(cloud='otc')
sdk.register_otc_extensions(conn)

share = conn.sfsturbo.extend_capacity(
    share="share-uuid",
    new_size=500)
conn.sfsturbo.wait_for_extend_capacity(share)

Shares

This interface is used to list shares (scalable file system). Share.

import openstack
from otcextensions import sdk


openstack.enable_logging(True)
conn = openstack.connect(cloud='otc')
sdk.register_otc_extensions(conn)

shares = conn.sfsturbo.shares()
print(shares)