The Hammerspace Python API Client is a comprehensive library that provides programmatic access to the Hammerspace data management platform. This client enables automation of various administrative tasks, configuration management, and operational workflows within a Hammerspace environment.
pip install hammerspace-api-clientfrom hammerspace import api_client
# Initialize the API client
client = api_client.ApiClient(
url="https://hammerspace-server",
username="admin",
password="password"
)
# Now you can use the client to interact with various Hammerspace modulesHere's a simple example script that demonstrates how to use the Hammerspace API client to list shares and create a new share:
from hammerspace import api_client
from hammerspace.shares import SharesClient
# Initialize the API client
client = api_client.ApiClient(
url="https://hammerspace-server",
username="admin",
password="password"
)
# Create a shares client
shares = SharesClient(client)
# List all shares
all_shares = shares.get(simple=True)
print("Current shares:")
for share in all_shares:
print(f"- {share['name']}: {share['path']}")
# Create a new share
new_share = shares.create(
name="test-share",
path="/data/test-share",
comment="Test share created via API",
export_options=[
shares.create_export_option(subnet="192.168.1.0/24", access_permissions="RW")
]
)
print(f"Created new share: {new_share}")The Hammerspace API client is organized into multiple modules, each providing specific functionality. Below is a comprehensive list of all modules and their functions:
The shares.py module provides functionality for managing shares in the Hammerspace system. Shares are the primary mechanism for exposing data to users and applications. This module enables creating, retrieving, updating, and deleting shares, as well as configuring share properties like export options, objectives, and snapshot schedules.
Retrieves share information. If an identifier is provided, fetches a specific share; otherwise, lists all shares.
Parameters:
identifier(Optional[str]): Share UUID or name to fetch a specific sharesimple(bool): If True, returns only uuid, name, and path fields**kwargs: Optional query parameters for filtering and pagination
Returns:
- Share information or a list of shares, simplified if requested
Internal method to simplify share response to only include uuid, name, and path fields.
Parameters:
shares_data(Union[List[Dict[str, Any]], Dict[str, Any]]): Full share data from API response
Returns:
- Simplified share data with only uuid, name, and path
create(share_data=None, name=None, path=None, comment=None, export_options=None, share_objectives=None, share_size_limit=None, warn_utilization_percent_threshold=None, smb_browsable=None, create_snapshots=False, snapshot_schedules=None, use_default_snapshot_plans=True, monitor_task=True, task_timeout_seconds=300)
Creates a new share with optional snapshot configuration.
Parameters:
share_data(Optional[Dict[str, Any]]): Complete share configuration dict (if provided, other params ignored)name(Optional[str]): Share name (required if share_data not provided)path(Optional[str]): Share path (required if share_data not provided)comment(Optional[str]): Share descriptionexport_options(Optional[List[Dict[str, Any]]]): List of export option dictsshare_objectives(Optional[List[Dict[str, Any]]]): List of objective dictsshare_size_limit(Optional[int]): Size limit in byteswarn_utilization_percent_threshold(Optional[int]): Warning threshold percentagesmb_browsable(Optional[bool]): Whether share is SMB browsablecreate_snapshots(bool): Whether to create snapshot schedules for this sharesnapshot_schedules(Optional[List[Dict[str, Any]]]): Custom snapshot schedule configurationsuse_default_snapshot_plans(bool): Use system default snapshot retention plansmonitor_task(bool): Whether to monitor the tasktask_timeout_seconds(int): Task timeout
Returns:
- Created share information or task ID
update(identifier, share_data=None, name=None, path=None, comment=None, export_options=None, share_objectives=None, share_size_limit=None, warn_utilization_percent_threshold=None, smb_browsable=None, monitor_task=True, task_timeout_seconds=300)
Updates a specific share by its identifier.
Parameters:
identifier(str): Share UUID or nameshare_data(Optional[Dict[str, Any]]): Complete share configuration dict (if provided, other params ignored)name(Optional[str]): Share namepath(Optional[str]): Share pathcomment(Optional[str]): Share descriptionexport_options(Optional[List[Dict[str, Any]]]): List of export option dictsshare_objectives(Optional[List[Dict[str, Any]]]): List of objective dictsshare_size_limit(Optional[int]): Size limit in byteswarn_utilization_percent_threshold(Optional[int]): Warning threshold percentagesmb_browsable(Optional[bool]): Whether share is SMB browsablemonitor_task(bool): Whether to monitor the tasktask_timeout_seconds(int): Task timeout
Returns:
- Updated share information or task ID
_build_share_data(name=None, path=None, comment=None, export_options=None, share_objectives=None, share_size_limit=None, warn_utilization_percent_threshold=None, smb_browsable=None)
Internal method to build share data dictionary from individual parameters.
Parameters:
name(Optional[str]): Share namepath(Optional[str]): Share pathcomment(Optional[str]): Share descriptionexport_options(Optional[List[Dict[str, Any]]]): List of export configurationsshare_objectives(Optional[List[Dict[str, Any]]]): List of share objectivesshare_size_limit(Optional[int]): Size limit in byteswarn_utilization_percent_threshold(Optional[int]): Warning threshold percentagesmb_browsable(Optional[bool]): SMB browsable flag
Returns:
- Dictionary containing share configuration
Helper method to create export option dictionary.
Parameters:
subnet(str): Network subnet (default "*" for all)access_permissions(str): "RW" or "RO"root_squash(bool): Whether to enable root squashinginsecure(bool): Whether to allow insecure connections
Returns:
- Export option dictionary
Helper method to create share objective dictionary.
Parameters:
objective_name(str): Name of the objective (e.g., "keep-online", "optimize-for-capacity")applicability(str): Applicability condition (default "TRUE")removable(bool): Whether objective can be removed
Returns:
- Share objective dictionary
Deletes a specific share by its identifier, optionally deleting snapshots first.
Parameters:
identifier(str): Share UUID or namedelete_snapshots(bool): Whether to delete all snapshots before deleting sharemonitor_task(bool): Whether to monitor the tasktask_timeout_seconds(int): Task timeout**kwargs: Additional delete parameters (delete_delay, delete_path)
Returns:
- Delete operation result or task ID
_create_share_snapshots(share_identifier, snapshot_schedules=None, use_default_plans=True, monitor_task=True, task_timeout_seconds=300)
Internal method to create snapshot schedules for a share.
Parameters:
share_identifier(str): Share name or UUIDsnapshot_schedules(Optional[List[Dict[str, Any]]]): Custom snapshot schedule configurationsuse_default_plans(bool): Whether to use default system retention plansmonitor_task(bool): Whether to monitor taskstask_timeout_seconds(int): Task timeout
Internal method to get default snapshot schedule configurations based on system retention plans.
Parameters:
share_identifier(str): Share name or UUID
Returns:
- List of default snapshot schedule configurations
Internal method to get available snapshot retention plans from the system.
Returns:
- List of available retention plans
Internal method to delete all snapshots and snapshot schedules for a share.
Parameters:
share_identifier(str): Share name or UUIDmonitor_task(bool): Whether to monitor taskstask_timeout_seconds(int): Task timeout
Helper method to create snapshot schedule configuration.
Parameters:
name(str): Schedule name (e.g., "daily", "weekly")cron_expression(str): Cron expression for scheduleretention_name(str): Name of retention plan to useshare_identifier(str): Share name or UUID
Returns:
- Snapshot schedule configuration dictionary
from hammerspace import api_client
from hammerspace.shares import SharesClient
# Initialize the API client
client = api_client.ApiClient(url="https://hammerspace-server", username="admin", password="password")
shares = SharesClient(client)
# Create a simple share
result = shares.create(
name="simple-share",
path="/data/simple-share",
comment="A simple share example"
)
print(f"Created share: {result}")The ad.py module provides functionality for managing Active Directory integration in the Hammerspace system. This includes retrieving, updating, and managing Active Directory configurations.
Retrieves Active Directory configuration. If an identifier is provided, fetches a specific AD configuration; otherwise, lists all AD configurations.
Parameters:
identifier(Optional[str]): AD configuration UUID or name**kwargs: Optional query parameters for filtering and pagination
Returns:
- AD configuration information or a list of configurations
Discovers Active Directory realm information for a specific domain.
Parameters:
domain(str): Domain name to discover**kwargs: Optional query parameters
Returns:
- AD realm information for the specified domain
Flushes the Active Directory cache to ensure fresh data.
Parameters:
monitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Flush operation result or task ID
Updates an Active Directory configuration.
Parameters:
identifier(str): AD configuration UUID or namead_data(Dict[str, Any]): Updated AD configuration datamonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Updated AD configuration information or task ID
The antivirus.py module provides functionality for managing antivirus services in the Hammerspace system. This includes creating, retrieving, updating, and deleting antivirus service configurations.
Lists all antivirus services configured in the system.
Returns:
- List of antivirus service configurations
Creates a new antivirus service configuration.
Parameters:
antivirus_data(Dict[str, Any]): Antivirus service configuration datamonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Created antivirus service information or task ID
Retrieves a specific antivirus service configuration by its identifier.
Parameters:
identifier(str): Antivirus service UUID or name
Returns:
- Antivirus service configuration information
Updates an antivirus service configuration.
Parameters:
identifier(str): Antivirus service UUID or nameantivirus_data(Dict[str, Any]): Updated antivirus service configurationmonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Updated antivirus service information or task ID
Deletes an antivirus service configuration.
Parameters:
identifier(str): Antivirus service UUID or namemonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Delete operation result or task ID
The backup.py module provides functionality for managing backups in the Hammerspace system. This includes creating, retrieving, updating, and deleting backup schedules, as well as creating immediate backups and restoring from backups.
Retrieves backup configurations.
Parameters:
**kwargs: Optional query parameters for filtering and pagination
Returns:
- List of backup configurations
Creates a new backup schedule.
Parameters:
backup_data(Dict[str, Any]): Backup schedule configuration datamonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Created backup schedule information or task ID
Updates a backup schedule.
Parameters:
identifier(str): Backup schedule UUID or namebackup_data(Dict[str, Any]): Updated backup schedule configurationmonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Updated backup schedule information or task ID
Deletes a backup schedule.
Parameters:
identifier(str): Backup schedule UUID or namemonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Delete operation result or task ID
Creates an immediate backup.
Parameters:
backup_data(Dict[str, Any]): Backup configuration datamonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Backup operation result or task ID
Lists all backups.
Parameters:
**kwargs: Optional query parameters for filtering and pagination
Returns:
- List of backups
Restores the latest backup.
Parameters:
monitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Restore operation result or task ID
Restores a specific backup by name.
Parameters:
name(str): Backup namemonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Restore operation result or task ID
The base_storage_volumes.py module provides functionality for managing base storage volumes in the Hammerspace system. Base storage volumes are the foundation for data storage in the system.
Retrieves base storage volume information. If an identifier is provided, fetches a specific volume; otherwise, lists all volumes.
Parameters:
identifier(Optional[str]): Volume UUID or name to fetch a specific volume**kwargs: Optional query parameters for filtering and pagination
Returns:
- Volume information or a list of volumes
The client.py module provides the core functionality for interacting with the Hammerspace API. It handles authentication, API calls, and task monitoring.
Internal method to perform login action and authenticate with the Hammerspace API.
Returns:
- Authentication result
Makes a REST API call to the Hammerspace server.
Parameters:
path(str): API endpoint pathmethod(str): HTTP method (GET, POST, PUT, DELETE)json_data(Optional[Dict[str, Any]]): JSON data for the request bodyquery_params(Optional[Dict[str, Any]]): Query parametersheaders(Optional[Dict[str, str]]): HTTP headers
Returns:
- API response
Reads and parses JSON response body from an API response.
Parameters:
response(requests.Response): API response
Returns:
- Parsed JSON data
execute_and_monitor_task(path, method, initial_json_data=None, initial_query_params=None, monitor_task=True, task_timeout_seconds=300)
Executes an API call and monitors the resulting task until completion.
Parameters:
path(str): API endpoint pathmethod(str): HTTP method (GET, POST, PUT, DELETE)initial_json_data(Optional[Dict[str, Any]]): JSON data for the request bodyinitial_query_params(Optional[Dict[str, Any]]): Query parametersmonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Task result or task ID
The cntl.py module provides functionality for managing cluster control operations in the Hammerspace system. This includes retrieving cluster information, updating cluster settings, accepting the EULA, and shutting down the cluster.
Retrieves cluster control information. If an identifier is provided, fetches specific information; otherwise, lists all information.
Parameters:
identifier(Optional[str]): Control information identifier**kwargs: Optional query parameters for filtering and pagination
Returns:
- Cluster control information or a list of information
Gets the current state of the cluster.
Parameters:
**kwargs: Optional query parameters
Returns:
- Cluster state information
Updates cluster information.
Parameters:
cluster_data(Dict[str, Any]): Updated cluster configurationmonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Updated cluster information or task ID
Accepts the End User License Agreement (EULA).
Parameters:
monitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- EULA acceptance result or task ID
Shuts down the cluster.
Parameters:
monitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Shutdown operation result or task ID
The data_analytics.py module provides functionality for querying and analyzing data in the Hammerspace system. This includes retrieving analytics information about data usage, performance, and other metrics.
Queries data analytics information.
Parameters:
**kwargs: Query parameters for filtering and specifying the analytics query
Returns:
- Data analytics query results
The data_copy_to_object.py module provides functionality for copying data to object storage in the Hammerspace system. This includes starting data copy tasks and listing available object storage buckets.
Starts a data copy to object task.
Parameters:
task_data(Dict[str, Any]): Task configuration datamonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Task operation result or task ID
Lists object storage buckets.
Parameters:
**kwargs: Optional query parameters for filtering and pagination
Returns:
- List of object storage buckets
The data_portals.py module provides functionality for managing data portals in the Hammerspace system. Data portals provide access to data for external systems and users.
Retrieves data portal information. If an identifier is provided, fetches a specific portal; otherwise, lists all portals.
Parameters:
identifier(Optional[str]): Portal UUID or name to fetch a specific portal**kwargs: Optional query parameters for filtering and pagination
Returns:
- Portal information or a list of portals
Creates a new data portal.
Parameters:
portal_data(Dict[str, Any]): Portal configuration datamonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Created portal information or task ID
Updates a data portal.
Parameters:
identifier(str): Portal UUID or nameportal_data(Dict[str, Any]): Updated portal configurationmonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Updated portal information or task ID
Deletes a data portal.
Parameters:
identifier(str): Portal UUID or namemonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Delete operation result or task ID
The disk_drives.py module provides functionality for managing disk drives in the Hammerspace system. This includes retrieving information about physical disk drives in the system.
Retrieves disk drive information. If an identifier is provided, fetches a specific disk drive; otherwise, lists all disk drives.
Parameters:
identifier(Optional[str]): Disk drive UUID or name to fetch a specific disk drive**kwargs: Optional query parameters for filtering and pagination
Returns:
- Disk drive information or a list of disk drives
The dnss.py module provides functionality for managing DNS server configurations in the Hammerspace system. This includes creating, retrieving, updating, and deleting DNS server configurations.
Retrieves DNS server information. If an identifier is provided, fetches a specific DNS server; otherwise, lists all DNS servers.
Parameters:
identifier(Optional[str]): DNS server UUID or name to fetch a specific DNS server**kwargs: Optional query parameters for filtering and pagination
Returns:
- DNS server information or a list of DNS servers
Creates a new DNS server configuration.
Parameters:
dns_data(Dict[str, Any]): DNS server configuration datamonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Created DNS server information or task ID
Updates a DNS server configuration.
Parameters:
identifier(str): DNS server UUID or namedns_data(Dict[str, Any]): Updated DNS server configurationmonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Updated DNS server information or task ID
Deletes a DNS server configuration.
Parameters:
identifier(str): DNS server UUID or namemonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Delete operation result or task ID
The domain_idmaps.py module provides functionality for managing domain ID mappings in the Hammerspace system. Domain ID mappings are used to map user and group IDs between different domains.
Retrieves domain ID map information. If an identifier is provided, fetches a specific mapping; otherwise, lists all mappings.
Parameters:
identifier(Optional[str]): Mapping UUID or name to fetch a specific mapping**kwargs: Optional query parameters for filtering and pagination
Returns:
- Mapping information or a list of mappings
Creates a new domain ID map.
Parameters:
idmap_data(Dict[str, Any]): Mapping configuration datamonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Created mapping information or task ID
Reloads domain ID maps to ensure they are up to date.
Parameters:
monitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Reload operation result or task ID
Updates a domain ID map.
Parameters:
identifier(str): Mapping UUID or nameidmap_data(Dict[str, Any]): Updated mapping configurationmonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Updated mapping information or task ID
Deletes a domain ID map.
Parameters:
identifier(str): Mapping UUID or namemonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Delete operation result or task ID
The events.py module provides functionality for managing events in the Hammerspace system. Events represent system activities, alerts, and notifications.
Retrieves event information. If an identifier is provided, fetches a specific event; otherwise, lists all events.
Parameters:
identifier(Optional[str]): Event UUID or name to fetch a specific event**kwargs: Optional query parameters for filtering and pagination
Returns:
- Event information or a list of events
Clears all events.
Parameters:
monitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Clear operation result or task ID
Gets a summary of events.
Parameters:
**kwargs: Optional query parameters for filtering and aggregation
Returns:
- Event summary information
Updates an event.
Parameters:
identifier(str): Event UUID or nameevent_data(Dict[str, Any]): Updated event datamonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Updated event information or task ID
The file_snapshots.py module provides functionality for managing file-level snapshots in the Hammerspace system. This includes creating, listing, updating, and deleting snapshots, as well as restoring files from snapshots and cloning files.
Retrieves file snapshot information. If an identifier is provided, fetches a specific snapshot; otherwise, lists all snapshots.
Parameters:
identifier(Optional[str]): Snapshot UUID or name to fetch a specific snapshot**kwargs: Optional query parameters for filtering and pagination
Returns:
- Snapshot information or a list of snapshots
Creates a file snapshot using the provided snapshot data.
Parameters:
snapshot_data(Dict[str, Any]): Snapshot configuration datamonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Created snapshot information or task ID
Creates a snapshot using a filename expression to match files.
Parameters:
expression(str): Filename expression to match filesmonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Created snapshot information or task ID
Deletes snapshots matching the provided expressions.
Parameters:
expressions(List[str]): List of expressions to match snapshotsmonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Operation result or task ID
Lists snapshots matching a filename expression.
Parameters:
expression(str): Filename expression to match snapshots**kwargs: Optional query parameters for filtering and pagination
Returns:
- List of matching snapshots
Restores a file from a snapshot.
Parameters:
restore_data(Dict[str, Any]): Restore configuration datamonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Restore operation result or task ID
Clones a file using the provided configuration.
Parameters:
clone_data(Dict[str, Any]): Clone configuration datamonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Clone operation result or task ID
Retrieves a specific file snapshot by its identifier.
Parameters:
identifier(str): Snapshot UUID or name**kwargs: Optional query parameters
Returns:
- Snapshot information
Updates a file snapshot.
Parameters:
identifier(str): Snapshot UUID or namesnapshot_data(Dict[str, Any]): Updated snapshot configurationmonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Updated snapshot information or task ID
Deletes a file snapshot.
Parameters:
identifier(str): Snapshot UUID or namemonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Operation result or task ID
The files.py module provides functionality for managing files and directories in the Hammerspace system. This includes browsing, downloading, uploading, creating, deleting, moving, and copying files and directories.
Browses files at a specific path.
Parameters:
path(str): Path to browse**kwargs: Optional query parameters for filtering and pagination
Returns:
- List of files and directories at the specified path
Downloads a file from Hammerspace to a local path.
Parameters:
path(str): Path of the file to downloadlocal_path(str): Local path to save the file
Returns:
- Download operation result
Uploads a file from a local path to Hammerspace.
Parameters:
path(str): Path to upload the file tolocal_path(str): Local path of the file to upload
Returns:
- Upload operation result
Creates a new directory.
Parameters:
path(str): Path of the directory to createmonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Directory creation result or task ID
Deletes a file or directory.
Parameters:
path(str): Path of the file or directory to deletemonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Delete operation result or task ID
Moves a file or directory from source to destination.
Parameters:
source(str): Source pathdestination(str): Destination pathmonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Move operation result or task ID
Copies a file or directory from source to destination.
Parameters:
source(str): Source pathdestination(str): Destination pathmonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Copy operation result or task ID
The gateways.py module provides functionality for managing gateways in the Hammerspace system. Gateways are used to connect to external systems and services.
Retrieves gateway information. If an identifier is provided, fetches a specific gateway; otherwise, lists all gateways.
Parameters:
identifier(Optional[str]): Gateway UUID or name to fetch a specific gateway**kwargs: Optional query parameters for filtering and pagination
Returns:
- Gateway information or a list of gateways
Creates a new gateway.
Parameters:
gateway_data(Dict[str, Any]): Gateway configuration datamonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Created gateway information or task ID
Updates a gateway.
Parameters:
identifier(str): Gateway UUID or namegateway_data(Dict[str, Any]): Updated gateway configurationmonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Updated gateway information or task ID
Deletes a gateway.
Parameters:
identifier(str): Gateway UUID or namemonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Delete operation result or task ID
The heartbeat.py module provides functionality for checking the heartbeat of the Hammerspace system. This is useful for monitoring the health and availability of the system.
Retrieves heartbeat information from the Hammerspace system.
Parameters:
**kwargs: Optional query parameters
Returns:
- Heartbeat information
The i18n.py module provides functionality for managing internationalization messages in the Hammerspace system.
Lists all internationalization messages.
Returns:
- Dictionary of internationalization messages
Gets internationalization messages for a specific locale.
Parameters:
locale_name(str): Name of the locale
Returns:
- Dictionary of internationalization messages for the specified locale
The identity_group_mappings.py module provides functionality for managing identity group mappings in the Hammerspace system. These mappings are used to map external identity groups to internal Hammerspace groups.
Retrieves identity group mapping information. If an identifier is provided, fetches a specific mapping; otherwise, lists all mappings.
Parameters:
identifier(Optional[str]): Mapping UUID or name to fetch a specific mapping**kwargs: Optional query parameters for filtering and pagination
Returns:
- Mapping information or a list of mappings
Creates a new identity group mapping.
Parameters:
mapping_data(Dict[str, Any]): Mapping configuration datamonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Created mapping information or task ID
Updates an identity group mapping.
Parameters:
identifier(str): Mapping UUID or namemapping_data(Dict[str, Any]): Updated mapping configurationmonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Updated mapping information or task ID
Deletes an identity group mapping.
Parameters:
identifier(str): Mapping UUID or namemonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Delete operation result or task ID
The identity.py module provides functionality for managing identities in the Hammerspace system.
Retrieves identity information by identifier.
Parameters:
identifier(str): Identity UUID or name
Returns:
- Identity information
The idp.py module provides functionality for managing identity providers in the Hammerspace system. Identity providers are used for authentication and authorization.
Retrieves identity provider information. If an identifier is provided, fetches a specific provider; otherwise, lists all providers.
Parameters:
identifier(Optional[str]): Provider UUID or name to fetch a specific provider**kwargs: Optional query parameters for filtering and pagination
Returns:
- Provider information or a list of providers
Creates a new identity provider configuration.
Parameters:
idp_data(Dict[str, Any]): Provider configuration datamonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Created provider information or task ID
Updates an identity provider.
Parameters:
identifier(str): Provider UUID or nameidp_data(Dict[str, Any]): Updated provider configurationmonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Updated provider information or task ID
Deletes an identity provider.
Parameters:
identifier(str): Provider UUID or namemonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Delete operation result or task ID
The kmses.py module provides functionality for managing Key Management Services (KMS) in the Hammerspace system. KMS is used for encryption key management.
Retrieves KMS information. If an identifier is provided, fetches a specific KMS; otherwise, lists all KMS configurations.
Parameters:
identifier(Optional[str]): KMS UUID or name to fetch a specific KMS**kwargs: Optional query parameters for filtering and pagination
Returns:
- KMS information or a list of KMS configurations
Creates a new KMS.
Parameters:
kms_data(Dict[str, Any]): KMS configuration datamonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Created KMS information or task ID
Updates a KMS.
Parameters:
identifier(str): KMS UUID or namekms_data(Dict[str, Any]): Updated KMS configurationmonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Updated KMS information or task ID
Deletes a KMS.
Parameters:
identifier(str): KMS UUID or namemonitor_task(bool): Whether to monitor the task until completiontask_timeout_seconds(int): Task timeout in seconds
Returns:
- Delete operation result or task ID