{"id":9231,"library":"pypowerstore","title":"Dell PowerStore Python Library","description":"pypowerstore is the official Python library for interacting with Dell PowerStore storage arrays. It provides a programmatic interface to manage PowerStore resources like volumes, snapshots, hosts, and more. The current version is 3.4.2.0, with releases generally aligning with new PowerStore OS versions.","status":"active","version":"3.4.2.0","language":"en","source_language":"en","source_url":"https://github.com/dell/python-powerstore","tags":["Dell","PowerStore","storage","API client","infrastructure as code"],"install":[{"cmd":"pip install pypowerstore","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"HTTP client for API communication.","package":"requests"},{"reason":"Underlying HTTP connection management for requests.","package":"urllib3"},{"reason":"Used for package version comparison and management.","package":"packaging"},{"reason":"Required for certain PowerStore integrations, potentially related to VMware environments.","package":"pyvmomi"}],"imports":[{"symbol":"PowerStoreClient","correct":"from pypowerstore.client import PowerStoreClient"}],"quickstart":{"code":"import os\nfrom pypowerstore.client import PowerStoreClient\n\nPOWERSTORE_HOST = os.environ.get('POWERSTORE_HOST', 'your_powerstore_ip')\nPOWERSTORE_USER = os.environ.get('POWERSTORE_USER', 'admin')\nPOWERSTORE_PASSWORD = os.environ.get('POWERSTORE_PASSWORD', 'password')\n\nif not all([POWERSTORE_HOST, POWERSTORE_USER, POWERSTORE_PASSWORD]):\n    print(\"Please set POWERSTORE_HOST, POWERSTORE_USER, and POWERSTORE_PASSWORD environment variables.\")\n    exit(1)\n\n# Initialize the client. For lab/dev environments, verify_ssl=False is common.\n# For production, ensure proper SSL certificate handling by configuring trusted CAs.\nclient = PowerStoreClient(\n    host=POWERSTORE_HOST,\n    username=POWERSTORE_USER,\n    password=POWERSTORE_PASSWORD,\n    verify_ssl=False # Set to True and configure trusted CAs in production environments\n)\n\ntry:\n    # Example: Get all systems\n    systems = client.system.get()\n    if systems:\n        print(f\"Successfully connected to PowerStore: System ID: {systems[0]['id']}, Name: {systems[0]['name']}, Model: {systems[0]['model']}\")\n    else:\n        print(\"No systems found.\")\n\n    # Example: Get all volumes (if any exist)\n    volumes = client.volumes.get()\n    print(f\"Found {len(volumes)} volumes.\")\n    if volumes:\n        print(f\"First volume ID: {volumes[0]['id']}, Name: {volumes[0]['name']}\")\n\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")","lang":"python","description":"This quickstart initializes the PowerStoreClient and demonstrates fetching system information and a list of volumes. Ensure your PowerStore IP, username, and password are provided, preferably via environment variables. For production, manage SSL certificates properly instead of `verify_ssl=False`."},"warnings":[{"fix":"Always check the `pypowerstore` documentation or release notes for the recommended PowerStore OS version. Ensure your installed `pypowerstore` version matches your PowerStore OS version.","message":"Major versions of `pypowerstore` (e.g., 2.x to 3.x) are designed to correspond with specific PowerStore OS versions. Using a library version incompatible with your PowerStore OS can lead to API call failures or unexpected behavior due to schema or endpoint changes.","severity":"breaking","affected_versions":"All major version upgrades (e.g., v2.x to v3.x, v3.x to v4.x)"},{"fix":"For production, set `verify_ssl=True` and configure your Python environment to trust the PowerStore's certificate. This typically involves using `REQUESTS_CA_BUNDLE` environment variable or by adding the CA certificate to your system's trust store.","message":"SSL certificate verification is `True` by default, but many enterprise PowerStore deployments use self-signed certificates or internal CAs not trusted by default. The `verify_ssl=False` parameter is often used in examples for simplicity but is insecure for production.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure the user account used for API access has the necessary roles (e.g., 'Storage Admin', 'Monitor') assigned on the PowerStore array to perform desired operations. Refer to PowerStore documentation for required privileges per API endpoint.","message":"The PowerStore API requires specific user roles and permissions for certain operations. While an 'admin' user is often used in examples, in production, users with least privilege should be configured for security.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Initialize `PowerStoreClient` with `verify_ssl=False` (for development/testing only) or properly configure trusted certificates in your system or environment for production via `REQUESTS_CA_BUNDLE`.","cause":"SSL certificate verification failed, often due to self-signed certificates, untrusted CAs, or hostname mismatch.","error":"requests.exceptions.SSLError: HTTPSConnectionPool(host='...', port=443): Max retries exceeded with url: /api/... (Caused by SSLError(CertificateError(\"hostname '...' doesn't match '...'\")))"},{"fix":"Double-check the `username` and `password`. Verify the user has the required roles/permissions configured on the PowerStore array itself.","cause":"Incorrect username or password provided, or the user lacks sufficient API permissions on the PowerStore array.","error":"An error occurred: (401 Client Error: Unauthorized for url: https://...)"},{"fix":"Verify network reachability to the PowerStore host/IP (ping, firewall rules). Check the PowerStore array's status and API service health. Ensure the correct port (443 by default) is open and accessible.","cause":"Network connectivity issue between the client and the PowerStore array, or the PowerStore API service is unavailable.","error":"requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))"},{"fix":"Confirm that the `pypowerstore` library version is compatible with your PowerStore OS version. Review the PowerStore API documentation for the correct endpoint paths and request formats specific to your PowerStore OS.","cause":"The requested API endpoint or resource does not exist, or the request body/parameters are invalid. This often indicates an API version mismatch between the library and PowerStore OS, or an incorrect API path/method.","error":"An error occurred: (404 Client Error: Not Found for url: https://.../api/rest/v1/...) or (400 Client Error: Bad Request for url: https://.../api/rest/v1/...)"}]}