{"id":20110700,"url":"https://github.com/dell/python-powerflex","last_synced_at":"2025-08-22T18:15:35.421Z","repository":{"id":37092762,"uuid":"293857002","full_name":"dell/python-powerflex","owner":"dell","description":"Python library for PowerFlex","archived":false,"fork":false,"pushed_at":"2025-08-22T05:26:56.000Z","size":324,"stargazers_count":21,"open_issues_count":2,"forks_count":20,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-08-22T07:25:55.039Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dell.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-09-08T15:49:12.000Z","updated_at":"2025-08-22T02:31:08.000Z","dependencies_parsed_at":"2024-03-26T10:28:32.594Z","dependency_job_id":"fb1fdd31-f80c-436b-adf4-45cc6a1e01e5","html_url":"https://github.com/dell/python-powerflex","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/dell/python-powerflex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dell%2Fpython-powerflex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dell%2Fpython-powerflex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dell%2Fpython-powerflex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dell%2Fpython-powerflex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dell","download_url":"https://codeload.github.com/dell/python-powerflex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dell%2Fpython-powerflex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271680451,"owners_count":24802074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T18:13:24.479Z","updated_at":"2025-08-22T18:15:35.410Z","avatar_url":"https://github.com/dell.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyPowerFlex\n\nPython SDK for Dell PowerFlex.\n\nSupports PowerFlex (VxFlex OS) version 3.0 and later.\n\n## Installation and usage\n\n### Installation\n\n```shell script\npython setup.py install\n```\n\n### Usage\n\n#### Configuration options\n\n| Option | Description |\n| :---: | :---: |    \n| gateway_address | (str) PowerFlex API address. | \n| gateway_port | (int) PowerFlex API port. **Default**: 443. | \n| username | (str) PowerFlex API username. |\n| password | (str) PowerFlex API password. |\n| verify_certificate | (bool) Verify server's certificate. **Default**: False. |\n| certificate_path | (str) Path to server's certificate. **Default**: None. |\n| timeout | (int) Timeout for PowerFlex API request **Default**: 120.\n| log_level | (int) Logging level (e. g. logging.DEBUG). **Default**: logging.ERROR. |\n\n#### Available resources\n\n* Device\n* ProtectionDomain\n* Sds\n* Sdt\n* SnapshotPolicy\n* ReplicationConsistencyGroup\n* ReplicationPair\n* System\n* StoragePool\n* AccelerationPool\n* Sdc\n* NvmeHost\n* FaultSet\n* Volume\n* ManagedDevice\n* Deployment\n* ServiceTemplate\n* FirmwareRepository\n\n#### Initialize PowerFlex client\n\n```python\nfrom PyPowerFlex import PowerFlexClient\n\nclient = PowerFlexClient(gateway_address='1.2.3.4', \n                         gateway_port=443, \n                         username='admin', \n                         password='admin')\nclient.initialize()\n```\n\n#### Filtering and fields querying\n\nSDK supports flat filtering and fields querying.\n\n```python\nfrom PyPowerFlex.objects.device import MediaType\n\nclient.device.get(filter_fields={'mediaType': MediaType.ssd, \n                                 'name': ['/dev/sdd', '/dev/sde']}, \n                  fields=['id', 'name', 'mediaType'])\n\n[{'id': '3eddd9dd00010003', 'mediaType': 'SSD', 'name': '/dev/sde'},\n {'id': '3edcd9d800000002', 'mediaType': 'SSD', 'name': '/dev/sdd'},\n {'id': '3edcd9d900000003', 'mediaType': 'SSD', 'name': '/dev/sde'},\n {'id': '3edd00e900010002', 'mediaType': 'SSD', 'name': '/dev/sdd'},\n {'id': '3eded9e000020002', 'mediaType': 'SSD', 'name': '/dev/sdd'},\n {'id': '3eded9e100020003', 'mediaType': 'SSD', 'name': '/dev/sde'}]\n```\n\n#### Examples\n\n```python\n# Create device\nfrom PyPowerFlex.objects.device import MediaType\nclient.device.create('/dev/sdd', \n                     sds_id='63471cdd00000001', \n                     media_type=MediaType.ssd, \n                     storage_pool_id='889dd7b900000000',\n                     name='/dev/sdd')\n\n# Rename device\nclient.device.get(filter_fields={'name': '/dev/sdd', 'id': '3eddd9dc00010002'}, \n                  fields=['name', 'id'])      \n[{'name': '/dev/sdd', 'id': '3eddd9dc00010002'}]\n\nclient.device.rename('3eddd9dc00010002', '/dev/sdd-renamed') \nclient.device.get(filter_fields={'id': '3eddd9dc00010002'}, \n                  fields=['name', 'id'])  \n[{'name': '/dev/sdd-renamed', 'id': '3eddd9dc00010002'}]\n\n# Remove device\nclient.device.delete('3eddd9dc00010002')\n{}\n\n# Get Protection Domain related SDSs\nclient.protection_domain.get_sdss('b922fb3700000000', fields=['ipList', 'name'])\n[{'ipList': [{'ip': '192.100.xxx.xxx', 'role': 'all'},\n             {'ip': '172.160.xxx.xxx', 'role': 'sdcOnly'}]},\n {'ipList': [{'ip': '192.101.xxx.xxx', 'role': 'all'},\n             {'ip': '172.161.xxx.xxx', 'role': 'sdcOnly'}]},\n {'ipList': [{'ip': '192.102.xxx.xxx', 'role': 'all'},\n             {'ip': '172.162.xxx.xxx', 'role': 'sdcOnly'}]}]\n\n# Delete protection domain\nclient.protection_domain.delete('9300c1f900000000')\n{}\n\n# Add SDS IP-address\nfrom PyPowerFlex.objects.sds import SdsIp\nfrom PyPowerFlex.objects.sds import SdsIpRoles\n\nclient.sds.add_ip('63471cdc00000000', SdsIp('172.17.xxx.xxx', SdsIpRoles.sdc_only))\nclient.sds.get(filter_fields={'id': '63471cdc00000000'}, fields=['id', 'ipList'])\n[{'id': '63471cdc00000000',\n  'ipList': [{'ip': '192.168.xxx.xxx', 'role': 'all'},\n             {'ip': '172.16.xxx.xxx', 'role': 'sdcOnly'},\n             {'ip': '172.17.xxx.xxx', 'role': 'sdcOnly'}]}]\n\n# Set SDS IP-address role\nclient.sds.set_ip_role('63471cdc00000000', '172.17.xxx.xxx', SdsIpRoles.sds_only, force=True)\n[{'id': '63471cdc00000000',\n  'ipList': [{'ip': '192.168.xxx.xxx', 'role': 'all'},\n             {'ip': '172.16.xxx.xxx', 'role': 'sdcOnly'},\n             {'ip': '172.17.xxx.xxx', 'role': 'sdsOnly'}]}]\n\n# Remove SDS IP-address\nclient.sds.remove_ip('63471cdc00000000', '172.16.xxx.xxx')\n[{'id': '63471cdc00000000',\n  'ipList': [{'ip': '192.168.xxx.xxx', 'role': 'all'},\n             {'ip': '172.17.xxx.xxx', 'role': 'sdcOnly'}]}]\n\n# Create snapshot policy\nclient.snapshot_policy.create(15, [3, 4, 5, 6])\n\n# Rename snapshot policy\nclient.snapshot_policy.rename('f047913500000000', 'SnapshotPolicy_sp2')\n\n# Snapshot volumes\nfrom PyPowerFlex.objects.system import SnapshotDef\n\nsystem_id = client.system.get(fields=['id'])[0]['id']\nclient.system.snapshot_volumes(system_id,\n                               [SnapshotDef('afa52f0c00000003', 'snap1'),\n                                SnapshotDef('afa52f0c00000003', 'snap2')])\n{'snapshotGroupId': '5aaf81e800000002', 'volumeIdList': ['afa5561900000007', 'afa5561a00000008']}\n\n# Remove ConsistencyGroup snapshot\nclient.system.remove_cg_snapshots(system_id, '5aaf81e800000002')\n{'numberOfVolumes': 2}\n\n# Rename storage pool\nclient.storage_pool.rename('dbd4dbcd00000000', 'StoragePool_sp2')\nclient.storage_pool.get(filter_fields={'id': 'dbd4dbcd00000000'},\n                        fields=['name', 'id'])\n[{'name': 'StoragePool_sp2', 'id': 'dbd4dbcd00000000'}]\n\n# Set media tye for storage pool\nfrom PyPowerFlex.objects.storage_pool import MediaType\nclient.storage_pool.set_media_type(storage_pool_id='dbd4dbcd00000000',\n                                   media_type=MediaType.ssd,\n                                   override_device_configuration=None)\n\n# Create acceleration pool\nfrom PyPowerFlex.objects.acceleration_pool import MediaType\nclient.acceleration_pool.create(media_type=MediaType.ssd,\n                                protection_domain_id='1caf743100000000',\n                                name='ACP_SSD',\n                                is_rfcache=True)\nclient.acceleration_pool.get(filter_fields={'id': '9c8c5c7800000001'}, \n                             fields=['name', 'id'])\n[{'name': 'ACP_SSD', 'id': '9c8c5c7800000001'}]\n\n# Delete acceleration pool\nclient.acceleration_pool.delete('9c8c5c7800000001')\n{}\n\n# Rename SDC\nclient.sdc.rename('a7e798d100000000', 'SDC_2')\nclient.sdc.get(filter_fields={'id': 'a7e798d100000000'},\n               fields=['name', 'id'])\n[{'name': 'SDC_2', 'id': 'a7e798d100000000'}]\n\n# Set performance profile for SDC\nclient.sdc.set_performance_profile('a7e798d100000000', 'HighPerformance')\n\n# Add a fault set to a protection domain\nclient.fault_set.create(protection_domain_id='dc65bd9900000000',\n                        name='sio-fs1')\nclient.fault_set.get(filter_fields={'id': 'fba27fae00000001'},\n                     fields=['name', 'id'])\n[{'name': 'sio-fs1', 'id': 'fba27fae00000001'}]\n\n# Clear fault set\nclient.fault_set.clear('fba27fae00000001')\n{}\n\n# Create volume\nfrom PyPowerFlex.objects.volume import VolumeType\nfrom PyPowerFlex.objects.volume import CompressionMethod\nfrom PyPowerFlex.objects.volume import VolumeClass\nclient.volume.create(storage_pool_id='76f2b2fd00000000',\n                     size_in_gb=40,\n                     name='new_thin_vol',\n                     volume_type=VolumeType.thin,\n                     use_rmcache=True,\n                     compression_method=CompressionMethod.normal)\n\n# Volume can be created with custom volume class\nclient.volume.create(storage_pool_id='76f2b2fd00000001',\n                     size_in_gb=40,\n                     name='new_custom_class_volume',\n                     volume_type=VolumeType.thin,\n                     use_rmcache=True,\n                     compression_method=CompressionMethod.normal,\n                     volume_class=VolumeClass.datastore)\n\n# Extend volume size\nclient.volume.extend(volume_id='4a3a153e00000000',\n                     size_in_gb=48)\nclient.volume.get(filter_fields={'id': '4a3a153e00000000'},\n                  fields=['name', 'id'])\n[{'name': 'sio-new_thin_vol', 'id': '4a3a153e00000000'}]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdell%2Fpython-powerflex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdell%2Fpython-powerflex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdell%2Fpython-powerflex/lists"}