1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
|
Using OpenStack Shared File Systems
===================================
Before working with the Shared File System service, you'll need to create a
connection to your OpenStack cloud by following the :doc:`connect` user
guide. This will provide you with the ``conn`` variable used in the examples
below.
.. contents:: Table of Contents
:local:
List Availability Zones
-----------------------
A Shared File System service **availability zone** is a failure domain for
your shared file systems. You may create a shared file system (referred
to simply as **shares**) in a given availability zone, and create replicas
of the share in other availability zones.
.. literalinclude:: ../examples/shared_file_system/availability_zones.py
:pyobject: list_availability_zones
Share Instances
---------------
Administrators can list, show information for, explicitly set the state of,
and force-delete share instances.
.. literalinclude:: ../examples/shared_file_system/share_instances.py
:pyobject: share_instances
Get Share Instance
------------------
Shows details for a single share instance.
.. literalinclude:: ../examples/shared_file_system/share_instances.py
:pyobject: get_share_instance
Reset Share Instance Status
---------------------------
Explicitly updates the state of a share instance.
.. literalinclude:: ../examples/shared_file_system/share_instances.py
:pyobject: reset_share_instance_status
Delete Share Instance
---------------------
Force-deletes a share instance.
.. literalinclude:: ../examples/shared_file_system/share_instances.py
:pyobject: delete_share_instance
Resize Share
------------
Shared File System shares can be resized (extended or shrunk) to a given
size. For details on resizing shares, refer to the
`Manila docs <https://docs.openstack.org/manila/latest/user/create-and-manage-shares.html#extend-share>`_.
.. literalinclude:: ../examples/shared_file_system/shares.py
:pyobject: resize_share
.. literalinclude:: ../examples/shared_file_system/shares.py
:pyobject: resize_shares_without_shrink
List Share Group Snapshots
--------------------------
A share group snapshot is a point-in-time, read-only copy of the data that is
contained in a share group. You can list all share group snapshots
.. literalinclude:: ../examples/shared_file_system/share_group_snapshots.py
:pyobject: list_share_group_snapshots
Get Share Group Snapshot
------------------------
Show share group snapshot details
.. literalinclude:: ../examples/shared_file_system/share_group_snapshots.py
:pyobject: get_share_group_snapshot
List Share Group Snapshot Members
---------------------------------
Lists all share group snapshots members.
.. literalinclude:: ../examples/shared_file_system/share_group_snapshots.py
:pyobject: share_group_snapshot_members
Create Share Group Snapshot
---------------------------
Creates a snapshot from a share group.
.. literalinclude:: ../examples/shared_file_system/share_group_snapshots.py
:pyobject: create_share_group_snapshot
Reset Share Group Snapshot
---------------------------
Reset share group snapshot state.
.. literalinclude:: ../examples/shared_file_system/share_group_snapshots.py
:pyobject: reset_share_group_snapshot_status
Update Share Group Snapshot
---------------------------
Updates a share group snapshot.
.. literalinclude:: ../examples/shared_file_system/share_group_snapshots.py
:pyobject: update_share_group_snapshot
Delete Share Group Snapshot
---------------------------
Deletes a share group snapshot.
.. literalinclude:: ../examples/shared_file_system/share_group_snapshots.py
:pyobject: delete_share_group_snapshot
List Share Metadata
--------------------
Lists all metadata for a given share.
.. literalinclude:: ../examples/shared_file_system/share_metadata.py
:pyobject: list_share_metadata
Get Share Metadata Item
-----------------------
Retrieves a specific metadata item from a shares metadata by its key.
.. literalinclude:: ../examples/shared_file_system/share_metadata.py
:pyobject: get_share_metadata_item
Create Share Metadata
----------------------
Creates share metadata.
.. literalinclude:: ../examples/shared_file_system/share_metadata.py
:pyobject: create_share_metadata
Update Share Metadata
----------------------
Updates metadata of a given share.
.. literalinclude:: ../examples/shared_file_system/share_metadata.py
:pyobject: update_share_metadata
Delete Share Metadata
----------------------
Deletes a specific metadata item from a shares metadata by its key. Can
specify multiple keys to be deleted.
.. literalinclude:: ../examples/shared_file_system/share_metadata.py
:pyobject: delete_share_metadata
Manage Share
------------
Manage a share with Manila.
.. literalinclude:: ../examples/shared_file_system/shares.py
:pyobject: manage_share
Unmanage Share
--------------
Unmanage a share from Manila.
.. literalinclude:: ../examples/shared_file_system/shares.py
:pyobject: unmanage_share
|