{"id":21822,"library":"python-manilaclient","title":"OpenStack Manila Client (python-manilaclient)","description":"Python client library for the OpenStack Shared File Systems API (Manila). Current version 6.0.0, requires Python >=3.10. Release follows OpenStack cycle.","status":"active","version":"6.0.0","language":"python","source_language":"en","source_url":"https://opendev.org/openstack/python-manilaclient","tags":["openstack","manila","shared file systems","storage","client"],"install":[{"cmd":"pip install python-manilaclient","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"The correct import is from manilaclient (package name).","wrong":"","symbol":"client","correct":"from manilaclient import client"},{"note":"Avoid wildcard imports; import specific exceptions like manilaclient.exceptions.ClientException.","wrong":"from manilaclient.exceptions import *","symbol":"exceptions","correct":"from manilaclient import exceptions"},{"note":"For CLI usage, use the manila command, but programmatic shell access is via this module.","wrong":"","symbol":"shell","correct":"from manilaclient import shell"}],"quickstart":{"code":"import os\nfrom manilaclient import client\n\n# Use version 2 (default) or 1\nversion = '2'\nos_username = os.environ.get('OS_USERNAME', '')\nos_password = os.environ.get('OS_PASSWORD', '')\nos_tenant_name = os.environ.get('OS_TENANT_NAME', '')\nos_auth_url = os.environ.get('OS_AUTH_URL', '')\n\n# Authenticate and create client\nmanila_client = client.Client(version, os_username, os_password, os_tenant_name, os_auth_url)\n\n# List shares\nshares = manila_client.shares.list()\nprint(shares)","lang":"python","description":"Authenticate and list shares."},"warnings":[{"fix":"Use '2' as the version argument. Ensure your OpenStack deployment supports Manila v2.","message":"Support for v1 API removed in version 5.0.0. Use v2 API only.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Upgrade Python environment to 3.10 or later.","message":"Minimum required Python version is now 3.10 (as of 6.0.0).","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Set OS_PROJECT_NAME or OS_TENANT_NAME in environment.","message":"The client expects OS_TENANT_NAME (or OS_PROJECT_NAME) for scoping; missing env vars cause authentication errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Pass a keystoneauth1 session using the 'session' parameter instead.","message":"Use of auth_token parameter is deprecated; prefer session-based authentication.","severity":"deprecated","affected_versions":"<6.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Set the OS_ENDPOINT_TYPE environment variable to 'publicURL' or 'internalURL'.","cause":"Multiple service endpoints in Keystone catalog (e.g., public and admin).","error":"manilaclient.exceptions.AmbiguousEndpoints: Endpoints for manila found multiple times"},{"fix":"Check OpenStack RC file and ensure environment variables are set correctly.","cause":"Invalid credentials or missing/incorrect OS_AUTH_URL, OS_USERNAME, OS_PASSWORD.","error":"manilaclient.exceptions.Unauthorized: Unauthorized (HTTP 401)"},{"fix":"Use 'from manilaclient import client' and then instantiate 'client.Client(...)'.","cause":"Using older install or wrong import path (e.g., 'from manilaclient.client import Client').","error":"ImportError: cannot import name 'Client' from 'manilaclient'"},{"fix":"Verify resource IDs. If using v2, ensure Manila API v2 is enabled.","cause":"Specifying a share ID or snapshot ID that does not exist, or using v2 API on a v1-only endpoint.","error":"manilaclient.exceptions.HttpException: The resource could not be found. (HTTP 404)"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}