Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,14 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pip install coveralls && coveralls --service=github
continue-on-error: true # Coveralls.io is currently overloaded

- name: Render docs if master was updated and the deploy_webhook_url is set
# See https://render.com/docs/deploy-hooks on how to deploy using a webhook:
env:
docs_deploy_branch: refs/heads/master
deploy_webhook_url: ${{ secrets.RENDER_DEPLOY_HOOK_URL }}
if: |
env.deploy_webhook_url && github.ref == env.docs_deploy_branch &&
matrix.python-version == env.PYTHON_VERSION_USED_FOR_COVERAGE
run: |
curl "$deploy_webhook_url"
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# Common XenServer/XCP-ng Python classes
# XenServer Python libs for Dom0

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
[![](https://img.shields.io/badge/python-2.7_%7C_3.6_%7C_3.7_%7C_3.8_%7C_3.9_%7C_3.10_%7C_3.11+-blue.svg)](https://www.python.org/downloads/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://pre-commit.com)
[![](https://img.shields.io/badge/python-3.6_%7C_3.11_%7C_3.12_%7C_3.13-blue.svg)](https://www.python.org/downloads/)
[![](https://coveralls.io/repos/github/xenserver/python-libs/badge.svg?branch=master)](https://coveralls.io/github/xenserver/python-libs?branch=master)
[![codecov](https://codecov.io/gh/xenserver/python-libs/branch/master/graph/badge.svg?token=6WKVLDXJFN)](https://codecov.io/gh/xenserver/python-libs)
[![](https://img.shields.io/badge/License-BSD--2--Cause%20%26%20MIT-brightgreen)](https://github.com/xenserver/python-libs/blob/master/LICENSE)

The `xcp` directory contains the Common XenServer and XCP-ng Python packages.
They are intented for use in XenServer and XCP-ng Dom0 only and deal with logging,
Hardware/PCI, networking, and other Dom0 tasks.

The package name is `python-libs` which is also the `rpm` package name in XenServer.
XCP-ng packages it as [xcp-python-libs](https://github.com/xcp-ng-rpms/xcp-python-libs)
([koji](https://koji.xcp-ng.org/packageinfo?packageID=400)).
[![](https://img.shields.io/badge/License-BSD--2--Clause%20%26%20MIT-brightgreen)](https://github.com/xenserver/python-libs/blob/master/LICENSE)
[![](https://img.shields.io/badge/Sphinx-docs-blue.svg)](https://python-libs.onrender.com/)

The `xcp` directory contains the XenServer Python modules used in Dom0 internally.
They are used in XenServer Dom0 and derivatives to provide them with services around
logging, Hardware-related configuration, network interfaces, and other Dom0 tasks.
The callers of these modules are only other XenServer components residing in Dom0.
A detailed list is in the [Users](#users) section.
The rpm package name in XenServer 8.4 is `python3-xcp-libs`.
XCP-ng packages it currently as
[xcp-python-libs](https://github.com/xcp-ng-rpms/xcp-python-libs)
([koji](https://koji.xcp-ng.org/packageinfo?packageID=400)) instead.

## Test-driven Development (TDD) Model

Expand Down
3 changes: 2 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
six
sphinx
sphinx-autodoc-typehints
furo
myst_parser
myst_parser
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"myst_parser",
]

myst_heading_anchors = 2
templates_path = ["_templates"]
exclude_patterns = []

Expand Down
24 changes: 18 additions & 6 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
.. python-libs documentation master file, created by
sphinx-quickstart on Tue Aug 26 19:05:28 2025.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
.. python-libs documentation master file

python-libs documentation
=========================
XenServer Python libs for Dom0
==============================

.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit
:target: https://pre-commit.com/

.. image:: https://coveralls.io/repos/github/xenserver/python-libs/badge.svg?branch=master
:target: https://coveralls.io/github/xenserver/python-libs?branch=master

.. image:: https://codecov.io/gh/xenserver/python-libs/branch/master/graph/badge.svg?token=6WKVLDXJFN
:target: https://codecov.io/gh/xenserver/python-libs/branch/master

.. image:: https://img.shields.io/badge/License-BSD--2--Clause%20%26%20MIT-brightgreen
:target: https://opensource.org/licenses/BSD-2-Clause

.. image:: https://img.shields.io/badge/Sphinx-docs-blue.svg
:target: https://python-libs.onrender.com/

.. toctree::
:maxdepth: 2
Expand Down
9 changes: 3 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
name = "python-libs"
dynamic = ["version"]
description = "Common Xenserver Python classes"
requires-python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*"
# 3.6 is used by XS8.4, 3.11 by XS9, versions in-between are not required
requires-python = ">=3.6, !=3.7.*, !=3.8.*, !=3.9.*, !=3.10.*"
license = {file = "LICENSE"}
keywords = ["xenserver", "xen-project", "libraries"]
authors = [
Expand All @@ -20,14 +21,10 @@ readme = "README.md"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: System :: Hardware",
"Topic :: System :: Installation/Setup",
Expand Down
21 changes: 21 additions & 0 deletions render.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
services:
- type: web
name: python-libs
runtime: static
repo: https://github.com/xenserver/python-libs
branch: master
buildCommand: |
pip install -r docs/requirements.txt
make -C docs html
staticPublishPath: docs/build/html
buildFilter:
paths:
- docs
- xcp
- CONTRIBUTING.md
- DOCUMENTING.md
- README-Unicode.md
- README.md
previews:
generation: automatic
version: "1"
Loading