plugin/builder: add more documentation
Describe the plugin itself and how it can be used as a stand-alone executable.
This commit is contained in:
parent
20831a99bb
commit
1715558c8f
1 changed files with 21 additions and 1 deletions
|
|
@ -1,4 +1,20 @@
|
|||
#!/usr/bin/python3
|
||||
"""Koji osbuild integration - builder plugin
|
||||
|
||||
This koji builder plugin provides a handler for 'osbuildImage' tasks,
|
||||
which will create compose requests via osbuild composer's koji API.
|
||||
|
||||
Included is a basic pure-python client for composers koji API based
|
||||
on the corresponding OpenAPI. Although manually crafted it follows
|
||||
its terminology closely.
|
||||
This client is used in the `OSBuildImage`, which provides the actual
|
||||
koji integration to talk to composer.
|
||||
|
||||
This file can also be used as an executable where it acts as a stand
|
||||
alone client for composer's API.
|
||||
"""
|
||||
|
||||
|
||||
import configparser
|
||||
import enum
|
||||
import json
|
||||
|
|
@ -14,6 +30,10 @@ import koji
|
|||
from koji.tasks import BaseTaskHandler
|
||||
|
||||
|
||||
# The following classes are a implementation of osbuild composer's
|
||||
# koji API. It is based on the corresponding OpenAPI specification
|
||||
# version '1' and should model it closely.
|
||||
|
||||
class Repository:
|
||||
def __init__(self, baseurl: str, gpgkey: str = None):
|
||||
self.baseurl = baseurl
|
||||
|
|
@ -288,7 +308,7 @@ class OSBuildImage(BaseTaskHandler):
|
|||
}
|
||||
|
||||
|
||||
# #####
|
||||
# Stand alone osbuild composer API client executable
|
||||
import argparse
|
||||
|
||||
RESET = "\033[0m"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue