osp-uio-integrations
Shared Python integration package for UiO-specific infrastructure systems such as LDAP, MREG, and Nivlheim.
This repository is the concrete API-glue layer for external UiO systems. It is meant to keep authentication, request/response handling, error mapping, and small normalization helpers in one place so providers and transitional orchestrator code do not duplicate that plumbing.
Maintainer-facing boundaries and invariants live in each integration package's module documentation.
Scope
- Reusable Python clients for UiO infrastructure services
- Shared transport/auth/session glue
- API-specific response parsing and error translation
- Small stable normalized helper types where duplication would otherwise grow
Current focus
The LDAP integration owns the reusable UiO directory boundary shared by Python services and CLIs:
- service and end-user bind flows, including UiO's people/system user-DN fallback
- bounded ldap3 connect and receive timeouts
- safe equality and wildcard filter composition plus raw RFC 4515 filters
- user, people, host, organization, netgroup, and filegroup lookup
- automount lookup with the legacy one-hop LDAP indirection behavior
- normalized membership fields where the legacy CLI already established a useful output contract
- stable exceptions and password-safe reproduction commands for diagnostics
The Siteadmin integration owns the current netgroup-to-contact mapping read:
- anonymous, explicit-token, and managed username/password authentication
- bounded token refresh using Siteadmin's
expires_at - strict all-or-nothing validation of the grouped current-mapping response
- deterministic relation normalization that preserves multiple primary contacts
- stable request failures with Siteadmin error and request metadata
- public grouped contact-to-host lookup for provider inventory authorization
Caching, fixtures, snapshots, and ownership decisions remain caller policy.
The opt-in canonical package supplies comparison records for infrastructure facts without erasing their source:
- separate
CanonicalHostand host-scopedCanonicalNetworkobservations - pure MREG, LDAP, and Nivlheim adapters with source-shaped raw snapshots
- explicit observed-field tracking so unknown differs from observed-empty
- exact-host grouping and diffs that do not choose authority or guess aliases
The MREG integration is a small synchronous library with:
- explicit transport and auth handling
- optional interactive login for token bootstrap
- request metadata headers such as
User-AgentandX-Correlation-ID - a host-focused surface covering queries, lifecycle, history, addressing, contacts, CNAMEs, and explicit DNS record modules
- host-policy role/atom helpers, including batched role lookup for many hosts
- VLAN host membership lookup with optional host-policy enrichment that avoids per-host API calls
- room to grow into further MREG areas without flattening everything into one module
For concrete usage examples and a translation table from supported mreg-cli
commands to this library API, see
docs/mreg-cli-command-map.md.
Non-goals
- Provider workflow or execution logic
- Ownership, approval, or placement policy
- Orchestrator/provider wire contracts
- Provider-specific planning decisions
Install
pip install osp-uio-integrations
Development
env -u VIRTUAL_ENV uv sync --extra dev
hatch shell
hatch run dev:check
hatch run dev:build
hatch run dev:verify
Release
See docs/release.md for the manual tag and publish flow.
Create and push the annotated release tag from the checked-in release notes:
hatch run dev:tag-push
Release files for osp-uio-integrations 0.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| osp_uio_integrations-0.3.5.tar.gz | 238.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| osp_uio_integrations-0.3.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 388.0 kB
Release files / osp_uio_integrations-0.3.5.tar.gz
| Download URL | osp_uio_integrations-0.3.5.tar.gz |
|---|---|
| Size | 238.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e9ffc145745fcc6d005be65a355d4f8f5a6bd15c3551c8cfef6b73a17160bd4
|
|
BLAKE2b-256 checksum How to use checksums |
afcc316630d83aa545a35d63659997bb42f5dfe2b8e3cdfd8d89a84edce997f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / osp_uio_integrations-0.3.5-py3-none-any.whl
| Download URL | osp_uio_integrations-0.3.5-py3-none-any.whl |
|---|---|
| Size | 149.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36e6f160c696668946867cc2ab68be2f052b4657183f286f68dac899231a660b
|
|
BLAKE2b-256 checksum How to use checksums |
64868f940313408bd5e4fbec0b640723dc51e8304fc4804cbea2e4af39da9bbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|