glpi-python-client 0.6.5__tar.gz → 0.6.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/CHANGELOG.md +19 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/PKG-INFO +1 -1
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/docs/api_reference.rst +23 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/docs/user_guide.rst +2 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/__init__.py +9 -1
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/__init__.py +2 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/administration/__init__.py +3 -2
- glpi_python_client-0.6.6/glpi_python_client/_async/clients/api/administration/_group.py +218 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/client.py +2 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/commons/_constants.py +2 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/__init__.py +2 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/administration/__init__.py +3 -2
- glpi_python_client-0.6.6/glpi_python_client/_sync/clients/api/administration/_group.py +218 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/client.py +2 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/commons/_constants.py +2 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/__init__.py +8 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/administration/__init__.py +13 -2
- glpi_python_client-0.6.6/glpi_python_client/models/api_schema/administration/_group.py +150 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/pyproject.toml +1 -1
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/skills/README.md +1 -1
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/skills/glpi-asset-workflow/SKILL.md +1 -1
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/skills/glpi-client-setup/SKILL.md +1 -1
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/skills/glpi-contract-workflow/SKILL.md +1 -1
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/skills/glpi-document-workflow/SKILL.md +1 -1
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/skills/glpi-knowledge-base/SKILL.md +1 -1
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/skills/glpi-plugin-fields/SKILL.md +1 -1
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/skills/glpi-reporting-and-context/SKILL.md +1 -1
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/skills/glpi-team-members/SKILL.md +1 -1
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/skills/glpi-ticket-timeline/SKILL.md +1 -1
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/skills/glpi-ticket-workflow/SKILL.md +1 -1
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/skills/glpi-user-location-provisioning/SKILL.md +3 -3
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/.gitignore +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/.pre-commit-config.yaml +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/.readthedocs.yaml +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/CONTRIBUTING.md +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/LICENSE +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/README.md +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/docs/_static/.gitkeep +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/docs/conf.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/docs/development.md +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/docs/development_rtd.rst +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/docs/index.rst +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/docs/installation.rst +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/docs/publishing.md +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/docs/publishing_rtd.rst +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/docs/sponsoring.rst +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/_concurrency.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/_testing.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/auth/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/auth/_v1_session.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/auth/auth.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/_base_client.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/administration/_entity.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/administration/_user.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/assets/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/assets/_computer.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/assistance/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/assistance/_team.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/assistance/_ticket.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/assistance/timeline/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/assistance/timeline/_document.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/assistance/timeline/_followup.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/assistance/timeline/_solution.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/assistance/timeline/_task.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/dropdowns/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/dropdowns/_contract_type.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/dropdowns/_location.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/knowledgebase/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/knowledgebase/_article.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/knowledgebase/_category.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/knowledgebase/_comment.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/knowledgebase/_revision.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/management/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/management/_contract.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/management/_document.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/plugins/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/api/plugins/_fields.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/commons/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/commons/_config.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/commons/_filters.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/commons/_http.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/commons/_payloads.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/commons/_transport.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/custom/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/custom/_statistics.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/custom/_ticket_context.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_errors.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/_concurrency.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/_testing.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/auth/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/auth/_v1_session.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/auth/auth.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/_base_client.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/administration/_entity.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/administration/_user.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/assets/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/assets/_computer.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/assistance/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/assistance/_team.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/assistance/_ticket.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/assistance/timeline/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/assistance/timeline/_document.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/assistance/timeline/_followup.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/assistance/timeline/_solution.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/assistance/timeline/_task.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/dropdowns/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/dropdowns/_contract_type.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/dropdowns/_location.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/knowledgebase/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/knowledgebase/_article.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/knowledgebase/_category.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/knowledgebase/_comment.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/knowledgebase/_revision.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/management/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/management/_contract.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/management/_document.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/plugins/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/api/plugins/_fields.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/commons/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/commons/_config.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/commons/_filters.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/commons/_http.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/commons/_payloads.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/commons/_transport.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/custom/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/custom/_statistics.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_sync/clients/custom/_ticket_context.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/content/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/content/conversion.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/_base.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/_common.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/_content.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/administration/_entity.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/administration/_user.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/assets/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/assets/_computer.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/assets/_contract_item.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/assistance/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/assistance/_team.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/assistance/_ticket.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/assistance/timeline/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/assistance/timeline/_document.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/assistance/timeline/_followup.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/assistance/timeline/_solution.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/assistance/timeline/_task.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/dropdowns/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/dropdowns/_contract_type.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/dropdowns/_location.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/enums.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/knowledgebase/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/knowledgebase/_article.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/knowledgebase/_category.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/knowledgebase/_comment.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/knowledgebase/_revision.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/management/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/management/_contract.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/management/_contract_cost.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/management/_document.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/management/_document_item.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/plugins/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/api_schema/plugins/_fields.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/custom_schema/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/models/custom_schema/_ticket_context.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/py.typed +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/rsql.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/testing/__init__.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/testing/fixtures.py +0 -0
- {glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/testing/utils.py +0 -0
|
@@ -4,6 +4,25 @@ All notable changes to this project are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
6
|
|
|
7
|
+
## 0.6.6 — 2026-10-28
|
|
8
|
+
|
|
9
|
+
A minor addition: the GLPI v2 `/Administration/Group` routes, so a caller can
|
|
10
|
+
find and create groups. Existing methods are unchanged.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`search_groups`, `iter_search_groups`, `get_group`, `create_group`,
|
|
15
|
+
`update_group` and `delete_group`** on both clients, from a new `GroupMixin`
|
|
16
|
+
and the `GROUP_ENDPOINT` constant.
|
|
17
|
+
- **`skip_entity: bool = False`** on `search_groups` and `iter_search_groups`,
|
|
18
|
+
as on `search_users`: `True` omits the `GLPI-Entity`, `GLPI-Profile` and
|
|
19
|
+
`GLPI-Entity-Recursive` headers so the search spans every entity the caller
|
|
20
|
+
can see. The other group methods always send them.
|
|
21
|
+
- **`GetGroup`, `PostGroup`, `PatchGroup` and `DeleteGroup`**, modelled on
|
|
22
|
+
`components.schemas.Group` (parent, entity, the `maybe_*` / `may_contain_*`
|
|
23
|
+
flags, LDAP fields and timestamps), exported from the package root and from
|
|
24
|
+
`glpi_python_client.models`.
|
|
25
|
+
|
|
7
26
|
## 0.6.5 — 2026-10-14
|
|
8
27
|
|
|
9
28
|
A patch release that lets a caller find the Document behind an image GLPI left
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: glpi-python-client
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.6
|
|
4
4
|
Summary: A typed Python client for GLPI ITSM APIs.
|
|
5
5
|
Project-URL: Homepage, https://github.com/baraline/glpi_python_client
|
|
6
6
|
Project-URL: Documentation, https://glpi-python-client.readthedocs.io/en/latest/
|
|
@@ -486,6 +486,29 @@ Entities
|
|
|
486
486
|
:undoc-members:
|
|
487
487
|
:show-inheritance:
|
|
488
488
|
|
|
489
|
+
Groups
|
|
490
|
+
------
|
|
491
|
+
|
|
492
|
+
.. autoclass:: GetGroup
|
|
493
|
+
:members:
|
|
494
|
+
:undoc-members:
|
|
495
|
+
:show-inheritance:
|
|
496
|
+
|
|
497
|
+
.. autoclass:: PostGroup
|
|
498
|
+
:members:
|
|
499
|
+
:undoc-members:
|
|
500
|
+
:show-inheritance:
|
|
501
|
+
|
|
502
|
+
.. autoclass:: PatchGroup
|
|
503
|
+
:members:
|
|
504
|
+
:undoc-members:
|
|
505
|
+
:show-inheritance:
|
|
506
|
+
|
|
507
|
+
.. autoclass:: DeleteGroup
|
|
508
|
+
:members:
|
|
509
|
+
:undoc-members:
|
|
510
|
+
:show-inheritance:
|
|
511
|
+
|
|
489
512
|
Plugin: Fields (custom fields)
|
|
490
513
|
------------------------------
|
|
491
514
|
|
|
@@ -378,6 +378,7 @@ The full set is re-exported from the package root, including
|
|
|
378
378
|
``GetUser`` / ``PostUser`` / ``PatchUser`` / ``DeleteUser``,
|
|
379
379
|
``GetLocation`` / ``PostLocation`` / ``PatchLocation`` / ``DeleteLocation``,
|
|
380
380
|
``GetEntity`` / ``PostEntity`` / ``PatchEntity`` / ``DeleteEntity``,
|
|
381
|
+
``GetGroup`` / ``PostGroup`` / ``PatchGroup`` / ``DeleteGroup``,
|
|
381
382
|
``GetFollowup``, ``GetTicketTask``, ``GetSolution``, ``GetTimelineDocument``,
|
|
382
383
|
``GetTeamMember``, and ``GetDocument`` together with their post / patch /
|
|
383
384
|
delete variants. The read-only ``GetDocumentItem`` and ``FollowupDocuments``
|
|
@@ -1152,6 +1153,7 @@ batches until the API returns fewer rows than the requested
|
|
|
1152
1153
|
* :meth:`GlpiClient.iter_search_tickets`
|
|
1153
1154
|
* :meth:`GlpiClient.iter_search_users`
|
|
1154
1155
|
* :meth:`GlpiClient.iter_search_entities`
|
|
1156
|
+
* :meth:`GlpiClient.iter_search_groups`
|
|
1155
1157
|
|
|
1156
1158
|
.. code-block:: python
|
|
1157
1159
|
|
|
@@ -40,6 +40,7 @@ from glpi_python_client.models import (
|
|
|
40
40
|
DeleteDocument,
|
|
41
41
|
DeleteEntity,
|
|
42
42
|
DeleteFollowup,
|
|
43
|
+
DeleteGroup,
|
|
43
44
|
DeleteKBArticle,
|
|
44
45
|
DeleteKBArticleComment,
|
|
45
46
|
DeleteKBCategory,
|
|
@@ -60,6 +61,7 @@ from glpi_python_client.models import (
|
|
|
60
61
|
GetDocumentItem,
|
|
61
62
|
GetEntity,
|
|
62
63
|
GetFollowup,
|
|
64
|
+
GetGroup,
|
|
63
65
|
GetKBArticle,
|
|
64
66
|
GetKBArticleComment,
|
|
65
67
|
GetKBArticleRevision,
|
|
@@ -96,6 +98,7 @@ from glpi_python_client.models import (
|
|
|
96
98
|
PatchDocument,
|
|
97
99
|
PatchEntity,
|
|
98
100
|
PatchFollowup,
|
|
101
|
+
PatchGroup,
|
|
99
102
|
PatchKBArticle,
|
|
100
103
|
PatchKBArticleComment,
|
|
101
104
|
PatchKBCategory,
|
|
@@ -114,6 +117,7 @@ from glpi_python_client.models import (
|
|
|
114
117
|
PostDocument,
|
|
115
118
|
PostEntity,
|
|
116
119
|
PostFollowup,
|
|
120
|
+
PostGroup,
|
|
117
121
|
PostKBArticle,
|
|
118
122
|
PostKBArticleComment,
|
|
119
123
|
PostKBCategory,
|
|
@@ -133,7 +137,7 @@ from glpi_python_client.rsql import (
|
|
|
133
137
|
date_window,
|
|
134
138
|
)
|
|
135
139
|
|
|
136
|
-
__version__ = "0.6.
|
|
140
|
+
__version__ = "0.6.6"
|
|
137
141
|
|
|
138
142
|
__all__ = [
|
|
139
143
|
"AsyncGlpiClient",
|
|
@@ -145,6 +149,7 @@ __all__ = [
|
|
|
145
149
|
"DeleteDocument",
|
|
146
150
|
"DeleteEntity",
|
|
147
151
|
"DeleteFollowup",
|
|
152
|
+
"DeleteGroup",
|
|
148
153
|
"DeleteKBArticle",
|
|
149
154
|
"DeleteKBArticleComment",
|
|
150
155
|
"DeleteKBCategory",
|
|
@@ -165,6 +170,7 @@ __all__ = [
|
|
|
165
170
|
"GetDocumentItem",
|
|
166
171
|
"GetEntity",
|
|
167
172
|
"GetFollowup",
|
|
173
|
+
"GetGroup",
|
|
168
174
|
"GetKBArticle",
|
|
169
175
|
"GetKBArticleComment",
|
|
170
176
|
"GetKBArticleRevision",
|
|
@@ -212,6 +218,7 @@ __all__ = [
|
|
|
212
218
|
"PatchDocument",
|
|
213
219
|
"PatchEntity",
|
|
214
220
|
"PatchFollowup",
|
|
221
|
+
"PatchGroup",
|
|
215
222
|
"PatchKBArticle",
|
|
216
223
|
"PatchKBArticleComment",
|
|
217
224
|
"PatchKBCategory",
|
|
@@ -230,6 +237,7 @@ __all__ = [
|
|
|
230
237
|
"PostDocument",
|
|
231
238
|
"PostEntity",
|
|
232
239
|
"PostFollowup",
|
|
240
|
+
"PostGroup",
|
|
233
241
|
"PostKBArticle",
|
|
234
242
|
"PostKBArticleComment",
|
|
235
243
|
"PostKBCategory",
|
|
@@ -11,6 +11,7 @@ from __future__ import annotations
|
|
|
11
11
|
|
|
12
12
|
from glpi_python_client._async.clients.api.administration import (
|
|
13
13
|
EntityMixin,
|
|
14
|
+
GroupMixin,
|
|
14
15
|
UserMixin,
|
|
15
16
|
)
|
|
16
17
|
from glpi_python_client._async.clients.api.assets import ComputerMixin
|
|
@@ -49,6 +50,7 @@ __all__ = [
|
|
|
49
50
|
"DocumentMixin",
|
|
50
51
|
"EntityMixin",
|
|
51
52
|
"FollowupMixin",
|
|
53
|
+
"GroupMixin",
|
|
52
54
|
"KBArticleCommentMixin",
|
|
53
55
|
"KBArticleMixin",
|
|
54
56
|
"KBArticleRevisionMixin",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""GLPI ``/Administration`` mixins for the GLPI client.
|
|
2
2
|
|
|
3
|
-
The submodules expose the user and
|
|
3
|
+
The submodules expose the user, entity and group mixins used by this tree's
|
|
4
4
|
client -- :class:`glpi_python_client.AsyncGlpiClient` on the async
|
|
5
5
|
surface, :class:`glpi_python_client.GlpiClient` on the generated one.
|
|
6
6
|
"""
|
|
@@ -8,6 +8,7 @@ surface, :class:`glpi_python_client.GlpiClient` on the generated one.
|
|
|
8
8
|
from __future__ import annotations
|
|
9
9
|
|
|
10
10
|
from glpi_python_client._async.clients.api.administration._entity import EntityMixin
|
|
11
|
+
from glpi_python_client._async.clients.api.administration._group import GroupMixin
|
|
11
12
|
from glpi_python_client._async.clients.api.administration._user import UserMixin
|
|
12
13
|
|
|
13
|
-
__all__ = ["EntityMixin", "UserMixin"]
|
|
14
|
+
__all__ = ["EntityMixin", "GroupMixin", "UserMixin"]
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"""GLPI ``/Administration/Group`` mixin.
|
|
2
|
+
|
|
3
|
+
The mixin exposes search, fetch, create, update, and delete helpers for the
|
|
4
|
+
GLPI group resource. Every call sends the client's ``GLPI-Entity`` header
|
|
5
|
+
(and the profile and recursion headers that travel with it) except where a
|
|
6
|
+
search is told to skip it with ``skip_entity=True``.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
from collections.abc import AsyncIterator
|
|
12
|
+
|
|
13
|
+
from glpi_python_client._async.clients.commons._constants import GROUP_ENDPOINT, GlpiId
|
|
14
|
+
from glpi_python_client._async.clients.commons._transport import TransportMixin
|
|
15
|
+
from glpi_python_client.models.api_schema.administration._group import (
|
|
16
|
+
DeleteGroup,
|
|
17
|
+
GetGroup,
|
|
18
|
+
PatchGroup,
|
|
19
|
+
PostGroup,
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class GroupMixin(TransportMixin):
|
|
24
|
+
"""CRUD helpers for ``/Administration/Group``."""
|
|
25
|
+
|
|
26
|
+
async def search_groups(
|
|
27
|
+
self,
|
|
28
|
+
rsql_filter: str = "",
|
|
29
|
+
*,
|
|
30
|
+
limit: int = 50,
|
|
31
|
+
start: int = 0,
|
|
32
|
+
skip_entity: bool = False,
|
|
33
|
+
) -> list[GetGroup]:
|
|
34
|
+
"""Search GLPI groups with an optional RSQL filter.
|
|
35
|
+
|
|
36
|
+
Parameters
|
|
37
|
+
----------
|
|
38
|
+
rsql_filter : str, optional
|
|
39
|
+
Raw RSQL filter forwarded as the ``filter`` query parameter,
|
|
40
|
+
for example ``"name==Support"``. Empty by default.
|
|
41
|
+
limit : int, optional
|
|
42
|
+
Maximum number of records returned by the GLPI server.
|
|
43
|
+
start : int, optional
|
|
44
|
+
Zero-based offset of the first record returned.
|
|
45
|
+
skip_entity : bool, optional
|
|
46
|
+
When ``True`` the ``GLPI-Entity`` header is omitted so the
|
|
47
|
+
search spans every entity the caller has access to.
|
|
48
|
+
|
|
49
|
+
Returns
|
|
50
|
+
-------
|
|
51
|
+
list[GetGroup]
|
|
52
|
+
Groups matching the filter.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
params: dict[str, object] = {"limit": limit, "start": start}
|
|
56
|
+
if rsql_filter:
|
|
57
|
+
params["filter"] = rsql_filter
|
|
58
|
+
return await self._resource_list(
|
|
59
|
+
GROUP_ENDPOINT, GetGroup, params=params, skip_entity=skip_entity
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
async def iter_search_groups(
|
|
63
|
+
self,
|
|
64
|
+
rsql_filter: str = "",
|
|
65
|
+
*,
|
|
66
|
+
batch_size: int = 50,
|
|
67
|
+
skip_entity: bool = False,
|
|
68
|
+
) -> AsyncIterator[list[GetGroup]]:
|
|
69
|
+
"""Yield successive pages of GLPI groups until exhausted.
|
|
70
|
+
|
|
71
|
+
Pagination advances the ``start`` offset after each batch and stops
|
|
72
|
+
when the server returns fewer items than ``batch_size``.
|
|
73
|
+
|
|
74
|
+
Parameters
|
|
75
|
+
----------
|
|
76
|
+
rsql_filter : str, optional
|
|
77
|
+
Raw RSQL filter forwarded as the ``filter`` query parameter.
|
|
78
|
+
batch_size : int, optional
|
|
79
|
+
Number of records requested per page (default 50).
|
|
80
|
+
skip_entity : bool, optional
|
|
81
|
+
When ``True`` the ``GLPI-Entity`` header is omitted so the
|
|
82
|
+
search spans every entity the caller has access to.
|
|
83
|
+
|
|
84
|
+
Yields
|
|
85
|
+
------
|
|
86
|
+
list[GetGroup]
|
|
87
|
+
One page of groups per iteration. The last yielded batch may
|
|
88
|
+
be shorter than ``batch_size``.
|
|
89
|
+
"""
|
|
90
|
+
|
|
91
|
+
start = 0
|
|
92
|
+
while True:
|
|
93
|
+
batch = await self.search_groups(
|
|
94
|
+
rsql_filter,
|
|
95
|
+
limit=batch_size,
|
|
96
|
+
start=start,
|
|
97
|
+
skip_entity=skip_entity,
|
|
98
|
+
)
|
|
99
|
+
if batch:
|
|
100
|
+
yield batch
|
|
101
|
+
if len(batch) < batch_size:
|
|
102
|
+
break
|
|
103
|
+
start += batch_size
|
|
104
|
+
|
|
105
|
+
async def get_group(self, group_id: GlpiId) -> GetGroup:
|
|
106
|
+
"""Fetch one GLPI group by identifier.
|
|
107
|
+
|
|
108
|
+
Parameters
|
|
109
|
+
----------
|
|
110
|
+
group_id : GlpiId
|
|
111
|
+
Numeric identifier of the group to retrieve.
|
|
112
|
+
|
|
113
|
+
Returns
|
|
114
|
+
-------
|
|
115
|
+
GetGroup
|
|
116
|
+
Validated group payload.
|
|
117
|
+
|
|
118
|
+
Raises
|
|
119
|
+
------
|
|
120
|
+
GlpiStatusError
|
|
121
|
+
If the GLPI server returns a non-success HTTP status.
|
|
122
|
+
"""
|
|
123
|
+
|
|
124
|
+
return await self._resource_get(
|
|
125
|
+
f"{GROUP_ENDPOINT}/{group_id}",
|
|
126
|
+
GetGroup,
|
|
127
|
+
failure_message=f"Failed to get group {group_id}",
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
async def create_group(self, group: PostGroup) -> int:
|
|
131
|
+
"""Create one GLPI group.
|
|
132
|
+
|
|
133
|
+
Parameters
|
|
134
|
+
----------
|
|
135
|
+
group : PostGroup
|
|
136
|
+
Request body describing the group to create.
|
|
137
|
+
|
|
138
|
+
Returns
|
|
139
|
+
-------
|
|
140
|
+
int
|
|
141
|
+
Identifier assigned by the GLPI server.
|
|
142
|
+
|
|
143
|
+
Raises
|
|
144
|
+
------
|
|
145
|
+
GlpiStatusError
|
|
146
|
+
If the GLPI server returns a non-success HTTP status.
|
|
147
|
+
GlpiProtocolError
|
|
148
|
+
If the create response is missing the ``id`` field.
|
|
149
|
+
"""
|
|
150
|
+
|
|
151
|
+
return await self._resource_create(
|
|
152
|
+
GROUP_ENDPOINT,
|
|
153
|
+
group,
|
|
154
|
+
failure_message="Failed to create group",
|
|
155
|
+
missing_message="GLPI group create response did not include an ID",
|
|
156
|
+
log_message_factory=lambda new_id: f"GLPI API created group {new_id}",
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
async def update_group(self, group_id: GlpiId, group: PatchGroup) -> None:
|
|
160
|
+
"""Update one GLPI group with a partial body.
|
|
161
|
+
|
|
162
|
+
Parameters
|
|
163
|
+
----------
|
|
164
|
+
group_id : GlpiId
|
|
165
|
+
Numeric identifier of the group to update.
|
|
166
|
+
group : PatchGroup
|
|
167
|
+
Partial request body.
|
|
168
|
+
|
|
169
|
+
Returns
|
|
170
|
+
-------
|
|
171
|
+
None
|
|
172
|
+
|
|
173
|
+
Raises
|
|
174
|
+
------
|
|
175
|
+
GlpiStatusError
|
|
176
|
+
If the GLPI server returns a non-success HTTP status.
|
|
177
|
+
"""
|
|
178
|
+
|
|
179
|
+
await self._resource_update(
|
|
180
|
+
f"{GROUP_ENDPOINT}/{group_id}",
|
|
181
|
+
group,
|
|
182
|
+
failure_message=f"Failed to update group {group_id}",
|
|
183
|
+
log_message=f"GLPI API updated group {group_id}",
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
async def delete_group(
|
|
187
|
+
self, group_id: GlpiId, *, force: bool | None = None
|
|
188
|
+
) -> None:
|
|
189
|
+
"""Delete one GLPI group by identifier.
|
|
190
|
+
|
|
191
|
+
Parameters
|
|
192
|
+
----------
|
|
193
|
+
group_id : GlpiId
|
|
194
|
+
Numeric identifier of the group to delete.
|
|
195
|
+
force : bool | None, optional
|
|
196
|
+
When ``True`` the group is permanently deleted instead of
|
|
197
|
+
being moved to the trash.
|
|
198
|
+
|
|
199
|
+
Returns
|
|
200
|
+
-------
|
|
201
|
+
None
|
|
202
|
+
|
|
203
|
+
Raises
|
|
204
|
+
------
|
|
205
|
+
GlpiStatusError
|
|
206
|
+
If the GLPI server returns a non-success HTTP status.
|
|
207
|
+
"""
|
|
208
|
+
|
|
209
|
+
await self._resource_delete(
|
|
210
|
+
f"{GROUP_ENDPOINT}/{group_id}",
|
|
211
|
+
failure_message=f"Failed to delete group {group_id}",
|
|
212
|
+
log_message=f"GLPI API deleted group {group_id}",
|
|
213
|
+
force=force,
|
|
214
|
+
delete_model_cls=DeleteGroup,
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
__all__ = ["GroupMixin"]
|
{glpi_python_client-0.6.5 → glpi_python_client-0.6.6}/glpi_python_client/_async/clients/client.py
RENAMED
|
@@ -25,6 +25,7 @@ from glpi_python_client._async.clients.api import (
|
|
|
25
25
|
DocumentMixin,
|
|
26
26
|
EntityMixin,
|
|
27
27
|
FollowupMixin,
|
|
28
|
+
GroupMixin,
|
|
28
29
|
KBArticleCommentMixin,
|
|
29
30
|
KBArticleMixin,
|
|
30
31
|
KBArticleRevisionMixin,
|
|
@@ -59,6 +60,7 @@ class AsyncGlpiClient(
|
|
|
59
60
|
ComputerMixin,
|
|
60
61
|
UserMixin,
|
|
61
62
|
EntityMixin,
|
|
63
|
+
GroupMixin,
|
|
62
64
|
LocationMixin,
|
|
63
65
|
ContractTypeMixin,
|
|
64
66
|
KBCategoryMixin,
|
|
@@ -19,6 +19,7 @@ COMPUTER_ENDPOINT = "Assets/Computer"
|
|
|
19
19
|
# administration/
|
|
20
20
|
USER_ENDPOINT = "Administration/User"
|
|
21
21
|
ENTITY_ENDPOINT = "Administration/Entity"
|
|
22
|
+
GROUP_ENDPOINT = "Administration/Group"
|
|
22
23
|
|
|
23
24
|
# dropdowns/
|
|
24
25
|
CONTRACT_TYPE_ENDPOINT = "Dropdowns/ContractType"
|
|
@@ -52,6 +53,7 @@ __all__ = [
|
|
|
52
53
|
"DOCUMENT_ENDPOINT",
|
|
53
54
|
"ENTITY_ENDPOINT",
|
|
54
55
|
"FOLLOWUP_SUFFIX",
|
|
56
|
+
"GROUP_ENDPOINT",
|
|
55
57
|
"KB_ARTICLE_ENDPOINT",
|
|
56
58
|
"KB_CATEGORY_ENDPOINT",
|
|
57
59
|
"KB_COMMENT_SUFFIX",
|
|
@@ -11,6 +11,7 @@ from __future__ import annotations
|
|
|
11
11
|
|
|
12
12
|
from glpi_python_client._sync.clients.api.administration import (
|
|
13
13
|
EntityMixin,
|
|
14
|
+
GroupMixin,
|
|
14
15
|
UserMixin,
|
|
15
16
|
)
|
|
16
17
|
from glpi_python_client._sync.clients.api.assets import ComputerMixin
|
|
@@ -49,6 +50,7 @@ __all__ = [
|
|
|
49
50
|
"DocumentMixin",
|
|
50
51
|
"EntityMixin",
|
|
51
52
|
"FollowupMixin",
|
|
53
|
+
"GroupMixin",
|
|
52
54
|
"KBArticleCommentMixin",
|
|
53
55
|
"KBArticleMixin",
|
|
54
56
|
"KBArticleRevisionMixin",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""GLPI ``/Administration`` mixins for the GLPI client.
|
|
2
2
|
|
|
3
|
-
The submodules expose the user and
|
|
3
|
+
The submodules expose the user, entity and group mixins used by this tree's
|
|
4
4
|
client -- :class:`glpi_python_client.AsyncGlpiClient` on the async
|
|
5
5
|
surface, :class:`glpi_python_client.GlpiClient` on the generated one.
|
|
6
6
|
"""
|
|
@@ -8,6 +8,7 @@ surface, :class:`glpi_python_client.GlpiClient` on the generated one.
|
|
|
8
8
|
from __future__ import annotations
|
|
9
9
|
|
|
10
10
|
from glpi_python_client._sync.clients.api.administration._entity import EntityMixin
|
|
11
|
+
from glpi_python_client._sync.clients.api.administration._group import GroupMixin
|
|
11
12
|
from glpi_python_client._sync.clients.api.administration._user import UserMixin
|
|
12
13
|
|
|
13
|
-
__all__ = ["EntityMixin", "UserMixin"]
|
|
14
|
+
__all__ = ["EntityMixin", "GroupMixin", "UserMixin"]
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"""GLPI ``/Administration/Group`` mixin.
|
|
2
|
+
|
|
3
|
+
The mixin exposes search, fetch, create, update, and delete helpers for the
|
|
4
|
+
GLPI group resource. Every call sends the client's ``GLPI-Entity`` header
|
|
5
|
+
(and the profile and recursion headers that travel with it) except where a
|
|
6
|
+
search is told to skip it with ``skip_entity=True``.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
from collections.abc import Iterator
|
|
12
|
+
|
|
13
|
+
from glpi_python_client._sync.clients.commons._constants import GROUP_ENDPOINT, GlpiId
|
|
14
|
+
from glpi_python_client._sync.clients.commons._transport import TransportMixin
|
|
15
|
+
from glpi_python_client.models.api_schema.administration._group import (
|
|
16
|
+
DeleteGroup,
|
|
17
|
+
GetGroup,
|
|
18
|
+
PatchGroup,
|
|
19
|
+
PostGroup,
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class GroupMixin(TransportMixin):
|
|
24
|
+
"""CRUD helpers for ``/Administration/Group``."""
|
|
25
|
+
|
|
26
|
+
def search_groups(
|
|
27
|
+
self,
|
|
28
|
+
rsql_filter: str = "",
|
|
29
|
+
*,
|
|
30
|
+
limit: int = 50,
|
|
31
|
+
start: int = 0,
|
|
32
|
+
skip_entity: bool = False,
|
|
33
|
+
) -> list[GetGroup]:
|
|
34
|
+
"""Search GLPI groups with an optional RSQL filter.
|
|
35
|
+
|
|
36
|
+
Parameters
|
|
37
|
+
----------
|
|
38
|
+
rsql_filter : str, optional
|
|
39
|
+
Raw RSQL filter forwarded as the ``filter`` query parameter,
|
|
40
|
+
for example ``"name==Support"``. Empty by default.
|
|
41
|
+
limit : int, optional
|
|
42
|
+
Maximum number of records returned by the GLPI server.
|
|
43
|
+
start : int, optional
|
|
44
|
+
Zero-based offset of the first record returned.
|
|
45
|
+
skip_entity : bool, optional
|
|
46
|
+
When ``True`` the ``GLPI-Entity`` header is omitted so the
|
|
47
|
+
search spans every entity the caller has access to.
|
|
48
|
+
|
|
49
|
+
Returns
|
|
50
|
+
-------
|
|
51
|
+
list[GetGroup]
|
|
52
|
+
Groups matching the filter.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
params: dict[str, object] = {"limit": limit, "start": start}
|
|
56
|
+
if rsql_filter:
|
|
57
|
+
params["filter"] = rsql_filter
|
|
58
|
+
return self._resource_list(
|
|
59
|
+
GROUP_ENDPOINT, GetGroup, params=params, skip_entity=skip_entity
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
def iter_search_groups(
|
|
63
|
+
self,
|
|
64
|
+
rsql_filter: str = "",
|
|
65
|
+
*,
|
|
66
|
+
batch_size: int = 50,
|
|
67
|
+
skip_entity: bool = False,
|
|
68
|
+
) -> Iterator[list[GetGroup]]:
|
|
69
|
+
"""Yield successive pages of GLPI groups until exhausted.
|
|
70
|
+
|
|
71
|
+
Pagination advances the ``start`` offset after each batch and stops
|
|
72
|
+
when the server returns fewer items than ``batch_size``.
|
|
73
|
+
|
|
74
|
+
Parameters
|
|
75
|
+
----------
|
|
76
|
+
rsql_filter : str, optional
|
|
77
|
+
Raw RSQL filter forwarded as the ``filter`` query parameter.
|
|
78
|
+
batch_size : int, optional
|
|
79
|
+
Number of records requested per page (default 50).
|
|
80
|
+
skip_entity : bool, optional
|
|
81
|
+
When ``True`` the ``GLPI-Entity`` header is omitted so the
|
|
82
|
+
search spans every entity the caller has access to.
|
|
83
|
+
|
|
84
|
+
Yields
|
|
85
|
+
------
|
|
86
|
+
list[GetGroup]
|
|
87
|
+
One page of groups per iteration. The last yielded batch may
|
|
88
|
+
be shorter than ``batch_size``.
|
|
89
|
+
"""
|
|
90
|
+
|
|
91
|
+
start = 0
|
|
92
|
+
while True:
|
|
93
|
+
batch = self.search_groups(
|
|
94
|
+
rsql_filter,
|
|
95
|
+
limit=batch_size,
|
|
96
|
+
start=start,
|
|
97
|
+
skip_entity=skip_entity,
|
|
98
|
+
)
|
|
99
|
+
if batch:
|
|
100
|
+
yield batch
|
|
101
|
+
if len(batch) < batch_size:
|
|
102
|
+
break
|
|
103
|
+
start += batch_size
|
|
104
|
+
|
|
105
|
+
def get_group(self, group_id: GlpiId) -> GetGroup:
|
|
106
|
+
"""Fetch one GLPI group by identifier.
|
|
107
|
+
|
|
108
|
+
Parameters
|
|
109
|
+
----------
|
|
110
|
+
group_id : GlpiId
|
|
111
|
+
Numeric identifier of the group to retrieve.
|
|
112
|
+
|
|
113
|
+
Returns
|
|
114
|
+
-------
|
|
115
|
+
GetGroup
|
|
116
|
+
Validated group payload.
|
|
117
|
+
|
|
118
|
+
Raises
|
|
119
|
+
------
|
|
120
|
+
GlpiStatusError
|
|
121
|
+
If the GLPI server returns a non-success HTTP status.
|
|
122
|
+
"""
|
|
123
|
+
|
|
124
|
+
return self._resource_get(
|
|
125
|
+
f"{GROUP_ENDPOINT}/{group_id}",
|
|
126
|
+
GetGroup,
|
|
127
|
+
failure_message=f"Failed to get group {group_id}",
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
def create_group(self, group: PostGroup) -> int:
|
|
131
|
+
"""Create one GLPI group.
|
|
132
|
+
|
|
133
|
+
Parameters
|
|
134
|
+
----------
|
|
135
|
+
group : PostGroup
|
|
136
|
+
Request body describing the group to create.
|
|
137
|
+
|
|
138
|
+
Returns
|
|
139
|
+
-------
|
|
140
|
+
int
|
|
141
|
+
Identifier assigned by the GLPI server.
|
|
142
|
+
|
|
143
|
+
Raises
|
|
144
|
+
------
|
|
145
|
+
GlpiStatusError
|
|
146
|
+
If the GLPI server returns a non-success HTTP status.
|
|
147
|
+
GlpiProtocolError
|
|
148
|
+
If the create response is missing the ``id`` field.
|
|
149
|
+
"""
|
|
150
|
+
|
|
151
|
+
return self._resource_create(
|
|
152
|
+
GROUP_ENDPOINT,
|
|
153
|
+
group,
|
|
154
|
+
failure_message="Failed to create group",
|
|
155
|
+
missing_message="GLPI group create response did not include an ID",
|
|
156
|
+
log_message_factory=lambda new_id: f"GLPI API created group {new_id}",
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
def update_group(self, group_id: GlpiId, group: PatchGroup) -> None:
|
|
160
|
+
"""Update one GLPI group with a partial body.
|
|
161
|
+
|
|
162
|
+
Parameters
|
|
163
|
+
----------
|
|
164
|
+
group_id : GlpiId
|
|
165
|
+
Numeric identifier of the group to update.
|
|
166
|
+
group : PatchGroup
|
|
167
|
+
Partial request body.
|
|
168
|
+
|
|
169
|
+
Returns
|
|
170
|
+
-------
|
|
171
|
+
None
|
|
172
|
+
|
|
173
|
+
Raises
|
|
174
|
+
------
|
|
175
|
+
GlpiStatusError
|
|
176
|
+
If the GLPI server returns a non-success HTTP status.
|
|
177
|
+
"""
|
|
178
|
+
|
|
179
|
+
self._resource_update(
|
|
180
|
+
f"{GROUP_ENDPOINT}/{group_id}",
|
|
181
|
+
group,
|
|
182
|
+
failure_message=f"Failed to update group {group_id}",
|
|
183
|
+
log_message=f"GLPI API updated group {group_id}",
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
def delete_group(
|
|
187
|
+
self, group_id: GlpiId, *, force: bool | None = None
|
|
188
|
+
) -> None:
|
|
189
|
+
"""Delete one GLPI group by identifier.
|
|
190
|
+
|
|
191
|
+
Parameters
|
|
192
|
+
----------
|
|
193
|
+
group_id : GlpiId
|
|
194
|
+
Numeric identifier of the group to delete.
|
|
195
|
+
force : bool | None, optional
|
|
196
|
+
When ``True`` the group is permanently deleted instead of
|
|
197
|
+
being moved to the trash.
|
|
198
|
+
|
|
199
|
+
Returns
|
|
200
|
+
-------
|
|
201
|
+
None
|
|
202
|
+
|
|
203
|
+
Raises
|
|
204
|
+
------
|
|
205
|
+
GlpiStatusError
|
|
206
|
+
If the GLPI server returns a non-success HTTP status.
|
|
207
|
+
"""
|
|
208
|
+
|
|
209
|
+
self._resource_delete(
|
|
210
|
+
f"{GROUP_ENDPOINT}/{group_id}",
|
|
211
|
+
failure_message=f"Failed to delete group {group_id}",
|
|
212
|
+
log_message=f"GLPI API deleted group {group_id}",
|
|
213
|
+
force=force,
|
|
214
|
+
delete_model_cls=DeleteGroup,
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
__all__ = ["GroupMixin"]
|