chi.share
The chi.share
module exposes a functional interface for interacting
with shares of the testbed.
- chi.share.create_share(size, name=None, description=None, metadata=None, is_public=False)[source]
Create a share.
- chi.share.delete_share(share)[source]
Delete a share.
- Parameters:
share – either share object or text with its ID.
- chi.share.extend_share(share, new_size)[source]
Extend the size of the specific share.
- Parameters:
share – either share object or text with its ID.
new_size – desired size to extend share to.
- chi.share.get_access_rules(share)[source]
Get access list to a share.
- Parameters:
share – either share object or text with its ID.
- Returns:
A list of access rules.
- chi.share.get_share(ref)[source]
Get a share by its ID or name.
- Parameters:
ref (str) – The ID or name of the share.
- Returns:
The share matching the ID or name.
- Raises:
NotFound – If the share could not be found.
- chi.share.get_share_id(name)[source]
Look up a share’s ID from its name.
- Parameters:
name (str) – The name of the share.
- Returns:
The ID of the found share.
- Raises:
ValueError – If the share could not be found, or if multiple shares matched the name.