### Install PyPowerFlex SDK Source: https://github.com/dell/python-powerflex/blob/main/README.md Installs the PyPowerFlex Python SDK using the setup.py script. This is the initial step to begin using the SDK for Dell PowerFlex management. ```shell python setup.py install ``` -------------------------------- ### Create Thin Volume Source: https://github.com/dell/python-powerflex/blob/main/README.md Creates a new thin-provisioned volume. This requires the storage pool ID, size in GB, and a name. Optional parameters include `use_rmcache` and `compression_method`. The example also shows creating a volume with a custom volume class. ```Python from PyPowerFlex.objects.volume import VolumeType from PyPowerFlex.objects.volume import CompressionMethod from PyPowerFlex.objects.volume import VolumeClass client.volume.create(storage_pool_id='76f2b2fd00000000', size_in_gb=40, name='new_thin_vol', volume_type=VolumeType.thin, use_rmcache=True, compression_method=CompressionMethod.normal) # Volume can be created with custom volume class client.volume.create(storage_pool_id='76f2b2fd00000001', size_in_gb=40, name='new_custom_class_volume', volume_type=VolumeType.thin, use_rmcache=True, compression_method=CompressionMethod.normal, volume_class=VolumeClass.datastore) ``` -------------------------------- ### Get SDSs for a Protection Domain Source: https://github.com/dell/python-powerflex/blob/main/README.md Retrieves a list of Storage Data Servers (SDSs) associated with a specific Protection Domain, including their IP addresses and names. ```python client.protection_domain.get_sdss('b922fb3700000000', fields=['ipList', 'name']) ``` -------------------------------- ### PyPowerFlex Replication Pair Management Source: https://github.com/dell/python-powerflex/blob/main/ChangeLog.md Version 1.7.0 enhances block provisioning operations by adding detailed management for replication pairs. This includes getting pair details, adding new pairs, pausing, resuming, and removing existing replication pairs. ```Python # Example usage for replication pair management (conceptual) # from PyPowerFlex.api.replication import ReplicationManager # replication_manager = ReplicationManager(connection_details) # replication_manager.add_replication_pair(pair_details) # replication_manager.pause_replication_pair(pair_id) # replication_manager.get_replication_pair_details(pair_id) ``` -------------------------------- ### Create a Device in PowerFlex Source: https://github.com/dell/python-powerflex/blob/main/README.md Creates a new device within the Dell PowerFlex system. Requires specifying the device path, SDS ID, media type, and storage pool ID. ```python from PyPowerFlex.objects.device import MediaType client.device.create('/dev/sdd', sds_id='63471cdd00000001', media_type=MediaType.ssd, storage_pool_id='889dd7b900000000', name='/dev/sdd') ``` -------------------------------- ### Initialize PowerFlex Client Source: https://github.com/dell/python-powerflex/blob/main/README.md Initializes the PowerFlexClient with connection details such as gateway address, port, username, and password. This client object is used to interact with the Dell PowerFlex API. ```python from PyPowerFlex import PowerFlexClient client = PowerFlexClient(gateway_address='1.2.3.4', gateway_port=443, username='admin', password='admin') client.initialize() ``` -------------------------------- ### Create Snapshot Policy Source: https://github.com/dell/python-powerflex/blob/main/README.md Creates a new snapshot policy in PowerFlex. Requires a Protection Domain ID and a list of volume IDs to associate with the policy. ```python client.snapshot_policy.create(15, [3, 4, 5, 6]) ``` -------------------------------- ### Create Acceleration Pool Source: https://github.com/dell/python-powerflex/blob/main/README.md Creates a new acceleration pool. This requires specifying the media type, protection domain ID, and a name for the pool. An optional `is_rfcache` parameter can be set to true for RFcache acceleration. The function returns the name and ID of the created acceleration pool. ```Python from PyPowerFlex.objects.acceleration_pool import MediaType client.acceleration_pool.create(media_type=MediaType.ssd, protection_domain_id='1caf743100000000', name='ACP_SSD', is_rfcache=True) client.acceleration_pool.get(filter_fields={'id': '9c8c5c7800000001'}, fields=['name', 'id']) [{'name': 'ACP_SSD', 'id': '9c8c5c7800000001'}] ``` -------------------------------- ### Query Devices with Filtering and Fields Source: https://github.com/dell/python-powerflex/blob/main/README.md Retrieves device information from PowerFlex, applying filters based on media type and name, and specifying which fields to return. This demonstrates SDK's capability for targeted data retrieval. ```python from PyPowerFlex.objects.device import MediaType client.device.get(filter_fields={'mediaType': MediaType.ssd, 'name': ['/dev/sdd', '/dev/sde']}, fields=['id', 'name', 'mediaType']) ``` -------------------------------- ### PyPowerFlex SDS, Device, and Acceleration Pool Management Source: https://github.com/dell/python-powerflex/blob/main/ChangeLog.md Version 1.2.0 enhances block provisioning by adding management capabilities for SDS (Storage Data Services), devices, and acceleration pools. It also allows retrieving high-level facts about these entities. ```Python # Example usage for SDS, device, and acceleration pool management (conceptual) # from PyPowerFlex.api.sds import SdsManager # from PyPowerFlex.api.devices import DeviceManager # from PyPowerFlex.api.acceleration_pools import AccelerationPoolManager # sds_manager = SdsManager(connection_details) # sds_manager.get_sds_details(sds_id) # device_manager = DeviceManager(connection_details) # device_manager.get_device_facts(device_id) # ap_manager = AccelerationPoolManager(connection_details) # ap_manager.get_acceleration_pool_details(ap_id) ``` -------------------------------- ### PyPowerFlex Managed Devices and Service Templates Source: https://github.com/dell/python-powerflex/blob/main/ChangeLog.md Version 1.9.0 added support for retrieving managed devices, service templates, and deployments from PowerFlex Manager, enabling better inventory and deployment management. ```Python # Example usage for managed devices and service templates (conceptual) # from PyPowerFlex.api.managed_devices import ManagedDeviceManager # from PyPowerFlex.api.service_templates import ServiceTemplateManager # md_manager = ManagedDeviceManager(connection_details) # devices = md_manager.get_all_managed_devices() # st_manager = ServiceTemplateManager(connection_details) # templates = st_manager.get_all_service_templates() ``` -------------------------------- ### Snapshot Volumes Source: https://github.com/dell/python-powerflex/blob/main/README.md Creates snapshots for specified volumes within a system. It requires the system ID and a list of SnapshotDef objects, each containing a volume ID and a snapshot name. The operation returns a snapshot group ID and a list of volume IDs included in the snapshot. ```Python from PyPowerFlex.objects.system import SnapshotDef system_id = client.system.get(fields=['id'])[0]['id'] client.system.snapshot_volumes(system_id, [SnapshotDef('afa52f0c00000003', 'snap1'), SnapshotDef('afa52f0c00000003', 'snap2')]) {'snapshotGroupId': '5aaf81e800000002', 'volumeIdList': ['afa5561900000007', 'afa5561a00000008']} ``` -------------------------------- ### PyPowerFlex Protection Domain Management Source: https://github.com/dell/python-powerflex/blob/main/ChangeLog.md Version 1.3.0 adds block provisioning operations for managing protection domains. This includes creating and managing protection domains and retrieving high-level facts about them. ```Python # Example usage for protection domain management (conceptual) # from PyPowerFlex.api.protection_domains import ProtectionDomainManager # pd_manager = ProtectionDomainManager(connection_details) # pd_manager.create_protection_domain(pd_details) # pd_manager.get_protection_domain_facts(pd_id) ``` -------------------------------- ### PyPowerFlex Volume and Snapshot Management Source: https://github.com/dell/python-powerflex/blob/main/ChangeLog.md Version 1.1.0 provides foundational block provisioning operations for managing volumes and snapshots. This includes creating, modifying, and deleting volumes, as well as managing snapshots, snapshot policies, and storage pools. ```Python # Example usage for volume and snapshot management (conceptual) # from PyPowerFlex.api.volumes import VolumeManager # from PyPowerFlex.api.snapshots import SnapshotManager # from PyPowerFlex.api.storage_pools import StoragePoolManager # volume_manager = VolumeManager(connection_details) # volume_manager.create_volume(volume_params) # snapshot_manager = SnapshotManager(connection_details) # snapshot_manager.create_snapshot(volume_id, snapshot_params) # sp_manager = StoragePoolManager(connection_details) # sp_manager.get_storage_pool_details(sp_id) ``` -------------------------------- ### PyPowerFlex Replication Consistency Group Operations Source: https://github.com/dell/python-powerflex/blob/main/ChangeLog.md Version 1.8.0 includes block provisioning operations for replication consistency groups, such as failover, restore, reverse, switchover, and sync operations. It also adds statistics data for snapshot policies and gateway configuration details for systems. ```Python # Example usage for replication consistency group operations (conceptual) # from PyPowerFlex.api.replication import ReplicationManager # replication_manager = ReplicationManager(connection_details) # replication_manager.failover_consistency_group(cg_id) # replication_manager.sync_consistency_group(cg_id) # replication_manager.get_snapshot_policy_statistics(policy_id) ``` -------------------------------- ### PyPowerFlex Replication Consistency Group Management Source: https://github.com/dell/python-powerflex/blob/main/ChangeLog.md Version 1.6.0 expands block provisioning capabilities with extensive management of replication consistency groups. This includes creating, modifying, pausing, resuming, freezing, unfreezing, activating, inactivating, and deleting consistency groups, as well as managing snapshots within them. ```Python # Example usage for replication consistency group management (conceptual) # from PyPowerFlex.api.replication import ReplicationManager # replication_manager = ReplicationManager(connection_details) # replication_manager.create_replication_consistency_group(cg_details) # replication_manager.create_snapshot_for_consistency_group(cg_id, snapshot_details) # replication_manager.delete_replication_consistency_group(cg_id) ``` -------------------------------- ### Manage NVMe over TCP Entities with PyPowerFlex Source: https://github.com/dell/python-powerflex/blob/main/ChangeLog.md This snippet covers the addition of support for managing NVMe over TCP entities, including Storage Data Services (SDS) and NVMe Hosts, in version 1.14.0. It enables users to interact with these specific components of the PowerFlex system. ```Python # Example usage for managing NVMe over TCP entities (conceptual) # from PyPowerFlex.api.nvme_over_tcp import NvmeOverTcpManager # nvme_manager = NvmeOverTcpManager(connection_details) # nvme_manager.add_nvme_host(host_details) # nvme_manager.get_sdt_details() ``` -------------------------------- ### PyPowerFlex Storage Pool and Volume Statistics Source: https://github.com/dell/python-powerflex/blob/main/ChangeLog.md Version 1.5.0 added statistics data collection for storage pool and volume objects, alongside support for PowerFlex OS 4.0.x releases. This allows for better monitoring and analysis of storage resource utilization. ```Python # Example usage for storage pool and volume statistics (conceptual) # from PyPowerFlex.api.storage_pools import StoragePoolManager # from PyPowerFlex.api.volumes import VolumeManager # sp_manager = StoragePoolManager(connection_details) # sp_stats = sp_manager.get_storage_pool_statistics(pool_id) # volume_manager = VolumeManager(connection_details) # volume_stats = volume_manager.get_volume_statistics(volume_id) ``` -------------------------------- ### PyPowerFlex Configuration Operations Source: https://github.com/dell/python-powerflex/blob/main/ChangeLog.md Version 1.4.0 introduces configuration operations for managing the PowerFlex cluster. This includes adding or removing standby MDMs, changing cluster ownership and mode, modifying MDM performance profiles, renaming MDMs, and updating MDM virtual interfaces. ```Python # Example usage for configuration operations (conceptual) # from PyPowerFlex.api.configuration import ConfigurationManager # config_manager = ConfigurationManager(connection_details) # config_manager.add_standby_mdm(mdm_details) # config_manager.change_cluster_mode(new_mode) # config_manager.get_mdm_cluster_details() ``` -------------------------------- ### PyPowerFlex Firmware and Resource Group Management Source: https://github.com/dell/python-powerflex/blob/main/ChangeLog.md Version 1.10.0 added comprehensive support for managing firmware within PowerFlex Manager. This includes retrieving firmware repositories, validating, deploying, editing, and also managing resource groups by adding and deleting them. ```Python # Example usage for firmware and resource group management (conceptual) # from PyPowerFlex.api.firmware import FirmwareManager # from PyPowerFlex.api.resource_groups import ResourceGroupManager # firmware_manager = FirmwareManager(connection_details) # firmware_manager.add_firmware_repository(repo_details) # firmware_manager.deploy_firmware(node_id, firmware_id) # rg_manager = ResourceGroupManager(connection_details) # rg_manager.add_node_to_resource_group(rg_id, node_id) # rg_manager.delete_resource_group(rg_id) ``` -------------------------------- ### Add Fault Set to Protection Domain Source: https://github.com/dell/python-powerflex/blob/main/README.md Creates a new fault set within a protection domain. This requires the protection domain ID and a name for the fault set. The function then retrieves the fault set by its ID to confirm its creation, returning its name and ID. ```Python client.fault_set.create(protection_domain_id='dc65bd9900000000', name='sio-fs1') client.fault_set.get(filter_fields={'id': 'fba27fae00000001'}, fields=['name', 'id']) [{'name': 'sio-fs1', 'id': 'fba27fae00000001'}] ``` -------------------------------- ### Set Storage Pool Media Type Source: https://github.com/dell/python-powerflex/blob/main/README.md Sets the media type for a storage pool. This operation requires the storage pool ID and the desired media type (e.g., MediaType.ssd). An optional parameter `override_device_configuration` can be used to override device settings. ```Python from PyPowerFlex.objects.storage_pool import MediaType client.storage_pool.set_media_type(storage_pool_id='dbd4dbcd00000000', media_type=MediaType.ssd, override_device_configuration=None) ``` -------------------------------- ### Set SDC Performance Profile Source: https://github.com/dell/python-powerflex/blob/main/README.md Sets the performance profile for a Storage Data Client (SDC). This operation requires the SDC's ID and the desired performance profile name (e.g., 'HighPerformance'). ```Python client.sdc.set_performance_profile('a7e798d100000000', 'HighPerformance') ``` -------------------------------- ### Add IP Address to SDS Source: https://github.com/dell/python-powerflex/blob/main/README.md Adds a new IP address to a Storage Data Server (SDS) in PowerFlex, specifying the IP address and its role (e.g., SDC_ONLY). ```python from PyPowerFlex.objects.sds import SdsIp from PyPowerFlex.objects.sds import SdsIpRoles client.sds.add_ip('63471cdc00000000', SdsIp('172.17.xxx.xxx', SdsIpRoles.sdc_only)) ``` -------------------------------- ### PyPowerFlex Statistics Querying Source: https://github.com/dell/python-powerflex/blob/main/ChangeLog.md Version 1.11.0 enables querying selected statistics from all relevant objects and entities within PowerFlex Manager. This provides enhanced visibility into the performance and status of various PowerFlex components. ```Python # Example usage for querying statistics (conceptual) # from PyPowerFlex.api.statistics import StatisticsManager # stats_manager = StatisticsManager(connection_details) # volume_stats = stats_manager.get_volume_statistics(volume_id) # pool_stats = stats_manager.get_storage_pool_statistics(pool_id) ``` -------------------------------- ### Custom Volume Type Support in PyPowerFlex Source: https://github.com/dell/python-powerflex/blob/main/ChangeLog.md Version 1.14.1 introduced support for custom volume types in volume operations. This allows for more granular control over volume creation and management, catering to specific performance or data placement needs. ```Python # Example usage for custom volume types (conceptual) # from PyPowerFlex.api.volumes import VolumeManager # volume_manager = VolumeManager(connection_details) # volume_params = { # "name": "my_custom_volume", # "size_gb": 100, # "volume_type": "custom_performance_tier" # } # volume_manager.create_volume(**volume_params) ``` -------------------------------- ### PyPowerFlex PowerFlex Onyx Support Source: https://github.com/dell/python-powerflex/blob/main/ChangeLog.md Version 1.12.0 enhanced the storage pool module by adding support for more functionalities and specifically introduced compatibility with PowerFlex Onyx (4.6.x) releases. ```Python # Example usage for PowerFlex Onyx support (conceptual) # The library automatically handles compatibility when connected to Onyx. # No specific code change is usually required unless interacting with Onyx-specific features. # Example: Accessing storage pool details which might differ slightly. # from PyPowerFlex.api.storage_pools import StoragePoolManager # sp_manager = StoragePoolManager(connection_details) # sp_details = sp_manager.get_storage_pool_details(pool_id) ``` -------------------------------- ### Rename a Device in PowerFlex Source: https://github.com/dell/python-powerflex/blob/main/README.md Renames an existing device in PowerFlex by its ID. It first retrieves the device to confirm its current name and then applies the new name. ```python # Rename device client.device.get(filter_fields={'name': '/dev/sdd', 'id': '3eddd9dc00010002'}, fields=['name', 'id']) client.device.rename('3eddd9dc00010002', '/dev/sdd-renamed') client.device.get(filter_fields={'id': '3eddd9dc00010002'}, fields=['name', 'id']) ``` -------------------------------- ### Rename Snapshot Policy Source: https://github.com/dell/python-powerflex/blob/main/README.md Renames an existing snapshot policy in PowerFlex using its ID and the new desired name. ```python client.snapshot_policy.rename('f047913500000000', 'SnapshotPolicy_sp2') ``` -------------------------------- ### Rename Storage Data Client (SDC) Source: https://github.com/dell/python-powerflex/blob/main/README.md Renames a Storage Data Client (SDC). This operation requires the SDC's ID and the new name. It then retrieves the SDC by its ID to confirm the name change, returning the updated name and ID. ```Python client.sdc.rename('a7e798d100000000', 'SDC_2') client.sdc.get(filter_fields={'id': 'a7e798d100000000'}, fields=['name', 'id']) [{'name': 'SDC_2', 'id': 'a7e798d100000000'}] ``` -------------------------------- ### PyPowerFlex Storage Pool SDS Functionality Fix Source: https://github.com/dell/python-powerflex/blob/main/ChangeLog.md Version 1.13.0 fixed the storage pool's get_sdss function to ensure it returns the correct data, improving the accuracy of storage pool information retrieval. ```Python # Example usage for get_sdss function (conceptual) # The fix is within the library's implementation. # Users calling the function should now receive correct data. # from PyPowerFlex.api.storage_pools import StoragePoolManager # sp_manager = StoragePoolManager(connection_details) # sds_list = sp_manager.get_sdss(pool_id) ``` -------------------------------- ### Set SDS IP Address Role Source: https://github.com/dell/python-powerflex/blob/main/README.md Modifies the role of an existing IP address associated with an SDS in PowerFlex. The 'force' parameter can be used to override potential issues. ```python client.sds.set_ip_role('63471cdc00000000', '172.17.xxx.xxx', SdsIpRoles.sds_only, force=True) ``` -------------------------------- ### Delete a Protection Domain Source: https://github.com/dell/python-powerflex/blob/main/README.md Deletes a Protection Domain from the Dell PowerFlex system using its ID. This operation affects the data protection configuration. ```python client.protection_domain.delete('9300c1f900000000') ``` -------------------------------- ### Delete a Device from PowerFlex Source: https://github.com/dell/python-powerflex/blob/main/README.md Deletes a device from the Dell PowerFlex system using its unique ID. This action is irreversible. ```python client.device.delete('3eddd9dc00010002') ``` -------------------------------- ### Extend Volume Size Source: https://github.com/dell/python-powerflex/blob/main/README.md Extends the size of an existing volume. This operation requires the volume ID and the new size in GB. The function then retrieves the volume by its ID to confirm the size update, returning its name and ID. ```Python client.volume.extend(volume_id='4a3a153e00000000', size_in_gb=48) client.volume.get(filter_fields={'id': '4a3a153e00000000'}, fields=['name', 'id']) [{'name': 'sio-new_thin_vol', 'id': '4a3a153e00000000'}] ``` -------------------------------- ### Clear Fault Set Source: https://github.com/dell/python-powerflex/blob/main/README.md Clears a fault set using its ID. This operation returns an empty dictionary upon successful execution. ```Python client.fault_set.clear('fba27fae00000001') {} ``` -------------------------------- ### Rename Storage Pool Source: https://github.com/dell/python-powerflex/blob/main/README.md Renames an existing storage pool. It takes the storage pool ID and the new name as parameters. The function then retrieves the storage pool by its ID to confirm the name change, returning the updated name and ID. ```Python client.storage_pool.rename('dbd4dbcd00000000', 'StoragePool_sp2') client.storage_pool.get(filter_fields={'id': 'dbd4dbcd00000000'}, fields=['name', 'id']) [{'name': 'StoragePool_sp2', 'id': 'dbd4dbcd00000000'}] ``` -------------------------------- ### Delete Acceleration Pool Source: https://github.com/dell/python-powerflex/blob/main/README.md Deletes an acceleration pool using its ID. The operation returns an empty dictionary upon successful deletion. ```Python client.acceleration_pool.delete('9c8c5c7800000001') {} ``` -------------------------------- ### Remove Consistency Group Snapshot Source: https://github.com/dell/python-powerflex/blob/main/README.md Removes a snapshot from a consistency group. This operation requires the system ID and the snapshot group ID. It returns the number of volumes that were part of the removed snapshot. ```Python client.system.remove_cg_snapshots(system_id, '5aaf81e800000002') {'numberOfVolumes': 2} ``` -------------------------------- ### Remove IP Address from SDS Source: https://github.com/dell/python-powerflex/blob/main/README.md Removes an IP address from a Storage Data Server (SDS) in PowerFlex. This is useful for cleaning up or reconfiguring network settings. ```python client.sds.remove_ip('63471cdc00000000', '172.16.xxx.xxx') ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.