Metadata-Version: 2.4
Name: pypnm-docsis-cmts
Version: 0.3.11.0
Summary: DOCSIS CMTS tools built on the PyPNM toolkit
Author-email: Maurice Garcia <mgarcia01752@outlook.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://www.pypnm.io
Project-URL: Repository, https://github.com/PyPNMApps/PyPNM-CMTS
Project-URL: Bug-Tracker, https://github.com/PyPNMApps/PyPNM-CMTS/issues
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Topic :: System :: Networking
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: pypnm-docsis==1.6.2.0
Requires-Dist: tabulate>=0.9.0
Provides-Extra: dev
Requires-Dist: ruff>=0.6.9; extra == "dev"
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.5; extra == "dev"
Requires-Dist: httpx<0.28.0,>=0.27.0; extra == "dev"
Requires-Dist: build>=1.2.0; extra == "dev"
Requires-Dist: twine>=5.0.0; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest>=8.0.0; extra == "test"
Requires-Dist: pytest-asyncio>=0.23.5; extra == "test"
Requires-Dist: httpx<0.28.0,>=0.27.0; extra == "test"
Requires-Dist: build>=1.2.0; extra == "test"
Requires-Dist: twine>=5.0.0; extra == "test"
Provides-Extra: docs
Requires-Dist: mkdocs>=1.5.0; extra == "docs"
Requires-Dist: mkdocs-material>=9.0.0; extra == "docs"
Requires-Dist: mkdocs-mermaid2-plugin>=1.1.1; extra == "docs"
Requires-Dist: pymdown-extensions>=10.0.0; extra == "docs"
Dynamic: license-file

<p align="center">
  <a href="docs/index.md">
    <picture>
      <source srcset="docs/images/pypnm-cmts-hp-dark-43.png"
              media="(prefers-color-scheme: dark)" />
      <img src="docs/images/pypnm-cmts-hp-light-43.png"
           alt="PyPNM-CMTS Logo"
           width="220"
           style="border-radius: 24px;" />
    </picture>
  </a>
</p>

# PyPNM-CMTS - CMTS Operations Toolkit for PyPNM (Under Development)

[![Repo version](https://img.shields.io/github/v/tag/PyPNMApps/PyPNM-CMTS?label=repo%20version&sort=semver)](https://github.com/PyPNMApps/PyPNM-CMTS/tags)
[![PyPI version](https://img.shields.io/pypi/v/pypnm-docsis-cmts)](https://pypi.org/project/pypnm-docsis-cmts/)
[![Python](https://img.shields.io/badge/Python-3.10%2B-3776AB?logo=python&logoColor=white)](https://www.python.org/)
[![CI Ubuntu](https://github.com/PyPNMApps/PyPNM-CMTS/actions/workflows/ci-ubuntu.yml/badge.svg)](https://github.com/PyPNMApps/PyPNM-CMTS/actions/workflows/ci-ubuntu.yml)
[![CI MacOS](https://github.com/PyPNMApps/PyPNM-CMTS/actions/workflows/ci-macos.yml/badge.svg)](https://github.com/PyPNMApps/PyPNM-CMTS/actions/workflows/ci-macos.yml)
[![Ubuntu](https://img.shields.io/badge/Ubuntu-22.04%20%7C%2024.04-orange)](https://ubuntu.com/download)
[![License: Apache-2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](./LICENSE)

PyPNM-CMTS extends the PyPNM toolkit with CMTS-focused automation, validation, and
operational workflows. It installs `pypnm-docsis` as the base library and adds CMTS
capabilities on top.

## Table of contents

- [Choose your path](#choose-your-path)
- [Getting started](#getting-started)
  - [Install from PyPI (library only)](#install-from-pypi-library-only)
  - [1) Clone](#1-clone)
  - [2) Install](#2-install)
  - [3) Activate the virtual environment](#3-activate-the-virtual-environment)
  - [4) Run the CLI](#4-run-the-cli)
- [Documentation](#documentation)
- [License](#license)
- [Maintainer](#maintainer)

## Choose your path

| Path | Description |
| --- | --- |
| [Use PyPNM-CMTS as a library](#install-from-pypi-library-only) | Install `pypnm-docsis-cmts` into an existing Python environment. |
| [Run the full repo](#1-clone) | Clone the repo and use the CLI + tools stack. |

## Getting started

### Install from PyPI (library only)

If you only need the library, install from PyPI:

  ```bash
  pip install pypnm-docsis-cmts
  ```

### 1) Clone

  ```bash
  git clone https://github.com/PyPNMApps/PyPNM-CMTS.git
  cd PyPNM-CMTS
```

### 2) Install

Run the installer:

  ```bash
  ./install.sh
  ```

Optional: use a custom venv directory:

  ```bash
  ./install.sh .env-dev
  ```

Optional: development install with extra tooling:

  ```bash
  ./install.sh --development
  ```

The development install attempts to install gitleaks using the system package manager,
and falls back to a GitHub release download if the package is unavailable.

Optional: update from the latest GA or hot-fix tag:

  ```bash
  ./install.sh --update-ga
  ./install.sh --update-hot-fix
  ```

Optional: update `pypnm-docsis` in the active venv:

  ```bash
  ./install.sh --update-development-pypnm-docsis
  ./install.sh --update-development-pypnm-docsis v1.4.2.0
  ```

Without a tag, the installer upgrades to the latest prerelease. With a tag or
version, it installs that exact `pypnm-docsis` release.

Cleanup and uninstall:

  ```bash
  ./install.sh --clean
  ./install.sh --uninstall
  ```

### 3) Activate the virtual environment

If you used the installer defaults, activate the `.env` environment:

  ```bash
  source .env/bin/activate
  ```

### 4) Run the CLI

  ```bash
  pypnm-cmts --version
  ```

### 5) Run the FastAPI service

  ```bash
  pypnm-cmts serve
  ```

The service binds to `127.0.0.1:8080` by default and reads CMTS adapter
settings from `system.json`. Use `pypnm-cmts config-menu` to set the CMTS
hostname and SNMP communities, or pass `--cmts-hostname`/`--read-community`
overrides at runtime.

To keep the service running after logout, launch it in the background:

  ```bash
  pypnm-cmts serve --run-background
  ```

Optional explicit log and pidfile paths:

  ```bash
  pypnm-cmts serve --run-background \
    --background-log-file /var/log/pypnm-cmts.log \
    --background-pidfile /var/run/pypnm-cmts.pid
  ```

### Tested CMTS platforms

| Vendor | Model | Status |
|--------|-------|--------|
| Casa Systems  | C100G                   | TBD |
| Cisco         | CBR8                    | TBD |
| CommScope     | RMD                     | TBD |
| Harmonic      | CableOS Cloud-Native    | TBD |

## Documentation

- Docs are being assembled; see `docs/` as the starting point.
- [CLI examples](docs/examples/cli.md)

## SNMP notes

- SNMPv2c is supported  
- SNMPv3 is currently stubbed and not yet supported

## CableLabs specifications & MIBs

- [CM-SP-MULPIv3.1](https://www.cablelabs.com/specifications/CM-SP-MULPIv3.1)  
- [CM-SP-CCAP-OSSIv3.1](https://www.cablelabs.com/specifications/CM-SP-CCAP-OSSIv3.1)  
- [CM-SP-MULPIv4.0](https://www.cablelabs.com/specifications/CM-SP-MULPIv4.0)  
- [CM-SP-CCAP-OSSIv4.0](https://www.cablelabs.com/specifications/CM-SP-CCAP-OSSIv4.0)  
- [DOCSIS MIBs](https://mibs.cablelabs.com/MIBs/DOCSIS/)

## License

[`Apache License 2.0`](./LICENSE) and [`NOTICE`](./NOTICE)

## Maintainer

Maurice Garcia

- [Email](mailto:mgarcia01752@outlook.com)
- [LinkedIn](https://www.linkedin.com/in/mauricemgarcia/)
