Skip to content

Commit

Permalink
docs(docs/*): add basic project documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
matosys committed Jul 24, 2023
1 parent b821321 commit a08a1f1
Show file tree
Hide file tree
Showing 11 changed files with 444 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
Empty file added docs/source/_static/.gitkeep
Empty file.
39 changes: 39 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import os
import sys

sys.path.insert(0, os.path.abspath('../../src'))

from balderhub.rfb import __version__

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'BalderHub RFB'
copyright = '2023, Max Stahlschmidt & others'
author = 'Max Stahlschmidt & others'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ['sphinx.ext.autodoc', 'sphinxcontrib.mermaid']

templates_path = ['_templates']
exclude_patterns = []


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']

# -- Autodoc settings --------------------------------------------------------

autodoc_default_options = {
'show-inheritance': True
}
22 changes: 22 additions & 0 deletions docs/source/examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Examples
********

This section shows different simple examples how you can integrate these tests.

Example for testing clients
===========================

.. important::
Please note, that this section is not completed yet.

Example for testing servers
===========================

.. important::
Please note, that this section is not completed yet.

Create own custom features
==========================

.. important::
Please note, that this section is not completed yet.
69 changes: 69 additions & 0 deletions docs/source/features.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
Features
********


This section describes all features that are shipped with this package.


Scenario Features
=================

Client Features
---------------

.. autoclass:: balderhub.rfb.lib.features.client.ErrorMessageViewerFeature
:members:

.. autoclass:: balderhub.rfb.lib.features.client.RfbClientErrorMessageConfig
:members:

.. autoclass:: balderhub.rfb.lib.features.client.RfbClientFeature
:members:

Server Features
---------------

.. autoclass:: balderhub.rfb.lib.features.server.ClosedPortConfig
:members:

.. autoclass:: balderhub.rfb.lib.features.server.ProtocolInjectorFeature
:members:

.. autoclass:: balderhub.rfb.lib.features.server.PasswordSetterFeature
:members:

.. autoclass:: balderhub.rfb.lib.features.server.RfbServerConfig
:members:

.. autoclass:: balderhub.rfb.lib.features.server.RunningRfbServerFeature
:members:

.. autoclass:: balderhub.rfb.lib.features.server.SecResultInjectorFeature
:members:

.. autoclass:: balderhub.rfb.lib.features.server.SecurityTypeInjectorFeature
:members:


Setup Features
==============

Client Setup Features
---------------------

This section holds features that can directly be used in your setup.

.. autoclass:: balderhub.rfb.lib.setup_features.server.ProtocolInjectorFeature
:members:

.. autoclass:: balderhub.rfb.lib.setup_features.server.LocalTestRfbServerFeature
:members:

.. autoclass:: balderhub.rfb.lib.setup_features.server.PasswordSetterFeature
:members:

.. autoclass:: balderhub.rfb.lib.setup_features.server.SecResultInjectorFeature
:members:

.. autoclass:: balderhub.rfb.lib.setup_features.server.SecurityTypeInjectorFeature
:members:
28 changes: 28 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.. BalderHub SNMPAgent documentation master file, created by
sphinx-quickstart on Wed Feb 22 19:24:39 2023.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
BalderHub-RFB
=============

The BalderHub rfb package provides basic tests for testing RFB server and client devices.

.. note::
Please note, this package is still under development and provides no full test coverage of the RFC's. If you would
like to contribute, take a look into the `GitHub project <https://github.com/balder-dev/balderhub-rfb>`_.

This is a BalderHub package for the `Balder <https://docs.balder.dev/>`_ test framework. It allows you to test RFB
client and server devices, without the need of writing own tests. If you are new to Balder check out the
`official documentation <https://docs.balder.dev>`_ first.


.. toctree::
:maxdepth: 2

installation.rst
topic_intro.rst
scenarios.rst
features.rst
examples.rst
utilities.rst
29 changes: 29 additions & 0 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Installation
************

This section shows how you can install this BalderHub package.

Install python
==============

For this python in the version ``3.9`` or higher is required. You can get the latest version of python at
`https://www.python.org/downloads/ <https://www.python.org/downloads/>`_ or install it with your packet management
system of your operating system.

Install balder
==============

You can easily install balder in different ways, that are described here.

.. code-block::
python -m pip install baldertest
Install balderhub-rfb
=====================

You can easily install this package with the following command:

.. code-block::
python -m pip install balderhub-rfb
40 changes: 40 additions & 0 deletions docs/source/scenarios.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Scenarios
*********

Scenarios describe **what you need**. They define the tests and the necessary devices for them. Here you can find all
scenarios that are implemented in this BalderHub package.

For testing client devices
==========================


Handshaking Phase Scenarios
---------------------------

.. autoclass:: balderhub.rfb.scenarios.client.handshaking.ScenarioRfbHandshakingIllegalProt
:members:
:private-members:

.. autoclass:: balderhub.rfb.scenarios.client.handshaking.ScenarioRfbHandshakingNoSecType
:members:
:private-members:

.. autoclass:: balderhub.rfb.scenarios.client.handshaking.ScenarioRfbHandshakingSecHandshakeFailed
:members:
:private-members:

.. autoclass:: balderhub.rfb.scenarios.client.handshaking.ScenarioRfbHandshakingSecTypeNone
:members:
:private-members:

.. autoclass:: balderhub.rfb.scenarios.client.handshaking.ScenarioRfbHandshakingSecTypeVnc
:members:
:private-members:


For testing server devices
==========================


.. important::
Please note, that this section is not completed yet.
Loading

0 comments on commit a08a1f1

Please sign in to comment.