Skip to main content

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 CanonicalHost and host-scoped CanonicalNetwork observations
  • 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-Agent and X-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.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for osp-uio-integrations 0.3.12
File Size Uploaded
osp_uio_integrations-0.3.12.tar.gz 204.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for osp-uio-integrations 0.3.12
File Interpreter ABI Platform
osp_uio_integrations-0.3.12-py3-none-any.whl Python 3 none any Details

Total release size: 361.1 kB

Release files / osp_uio_integrations-0.3.12.tar.gz

Download URL osp_uio_integrations-0.3.12.tar.gz
Size 204.5 kB
Tags Source
SHA-256 checksum
How to use checksums
42f2dc0e5caac8a7b87c570dcadad7a207026f0cc33d1da02a69678cb0728d34
BLAKE2b-256 checksum
How to use checksums
04b0375f424558c6a7fb3b50801a5e517c044833d7b160fec79b6b098139d6df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / osp_uio_integrations-0.3.12-py3-none-any.whl

Download URL osp_uio_integrations-0.3.12-py3-none-any.whl
Size 156.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7aa01c035703a723901a4bbecae8083f23653acbcb7f099e8c67081bbe3d95e
BLAKE2b-256 checksum
How to use checksums
441c59c4ca07c970a14e90b1f9de6d8ad38ddcd781b363c455403413690d35ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

0.3.13

2 release files

This release

0.3.12 This release

2 release files

0.3.10

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page