Metadata-Version: 2.4
Name: osp-uio-integrations
Version: 0.2.1
Summary: Shared Python integrations for UiO infrastructure services.
Project-URL: Repository, https://github.uio.no/IT-OPS/osp-uio-integrations
Author: OSP Team
License: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.13
Requires-Dist: httpx<1,>=0.28
Provides-Extra: dev
Requires-Dist: build<2,>=1.2; extra == 'dev'
Requires-Dist: hatch<2,>=1.14; extra == 'dev'
Requires-Dist: pytest<9,>=8.3; extra == 'dev'
Requires-Dist: ruff>=0.15; extra == 'dev'
Requires-Dist: twine<7,>=6; extra == 'dev'
Requires-Dist: ty>=0.0.18; extra == 'dev'
Description-Content-Type: text/markdown

# osp-uio-integrations

Shared Python integration package for UiO-specific infrastructure systems such
as 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.

For maintainer-facing internals and invariants, see `src/README.md`.

## 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 first concrete integration is a small sync MREG 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](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

```bash
pip install osp-uio-integrations
```

## Development

```bash
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:

```bash
hatch run dev:tag-push
```
