Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs + readthedocs #49

Merged
merged 27 commits into from
Nov 18, 2024
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
6 changes: 3 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ sphinx:
# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# python:
# install:
# - requirements: docs/requirements.txt
python:
install:
- requirements: docs/requirements.txt
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
CHANGELOG
---------
[24.10.1]
* Fix service issues with version (init with empty api_versions, ...)
* Add OAuth 2.0
* Add custom payload for cookie auth
* Switch to pyreadline3 for Windows / Python 3.x
* Clean Dockerfile

[24.2.1]
* Remove deprecated libs and functions (pkg_resources, datetime, gitpy_versioning)
* Log warnings
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ Riverbed SteelScript is a collection of libraries and scripts written in Python

## Quick Start

Here are 4 things you can do to start quick and easy with SteelScript.
Here are 4 things you can do to start quick and easy with SteelScript (click to expand the section).

<details>
<summary>Try examples just with git and Docker</summary>

### Quick Start SteelScript examples in a container
### Quick start SteelScript examples in a container

If you have [git](https://git-scm.com/downloads) and [Docker](https://www.docker.com/get-started) installed, for example on a Linux machine in your lab.

Expand Down Expand Up @@ -91,17 +91,17 @@ docker run --init --rm -p 8888:8888 --name=steelscript.notebook steelscript.note

In the output, grab the url containing the *token*, for example *http://127.0.0.1:8888/tree?token=123456* , and open it in your browser to log into the Jupyter web-console.

From there, in the *Notebooks* folder you can find some notebook based on SteelScript:
From there, in the *Notebooks* folder you can find some notebooks based on SteelScript:

* **AppResponse**: 01-appresponse-hostgroups.ipynb
* **AppResponse**: [01-appresponse-hostgroups.ipynb](https://github.com/riverbed/steelscript-appresponse/blob/master/notebooks/01-appresponse-hostgroups.ipynb)
* *work in progress* NetProfiler

</details>

<details>
<summary>Try SteelScript notebooks in your own SteelScript environment, just with python, pip, git and vscode</summary>

### Quick Start SteelScript notebooks in your environment
### Quick start SteelScript notebooks in your environment

If you have all the tools ready:
1. [Python](https://www.python.org/downloads) and pip
Expand Down Expand Up @@ -143,9 +143,9 @@ pip install git+https://github.com/riverbed/steelscript-scc

## Get SteelScript

SteelScript and modules are distributed via [Riverbed in GitHub](https://github.com/riverbed). The main repository is [SteelScript](https://github.com/riverbed/steelscript).
SteelScript and modules are distributed via [Riverbed on GitHub](https://github.com/riverbed). The main repository is [SteelScript](https://github.com/riverbed/steelscript).

To use SteelScript, it is recommended to either build your own SteelScript container or install the SteelScript modules in your own Python environment directly from the source in GitHub main repository. Refer to the quickstarts in the section above - *the guide needs update*.
To use SteelScript, it is recommended to either build your own SteelScript container or install the SteelScript modules in your own Python environment directly from the source on GitHub main repository. Refer to the quickstarts in the section above - *the guide needs update*.

> [!NOTE]
> Other distributions have not been maintained and contain outdated versions of SteelScript: [*outdated* SteelScript on Dockerhub](https://hub.docker.com/r/riverbed/steelscript), [*outdated* SteelScript in pypi](https://pypi.org/search/?q=steelscript), ...
Expand Down Expand Up @@ -214,6 +214,7 @@ The repos of SteelScript modules have a common structure
│ └── __init__.py
├── tests
├── setup.py
├── examples
├── notebooks
└── tox.ini
```
Expand All @@ -224,7 +225,7 @@ Mandatory:
- LICENSE: Riverbed Technology copyright, terms and conditions based on MIT
- CHANGELOG: Simple text file tracking major changes
- /docs: Documentation using reStructured Text (rst) file format.
- /examples: Python scripts samples showing how to use the module
- /examples: Python scripts samples showing how to use the module (only .py files)
- /steelscript: The actual code, written in Python (Python 3).
- /tests: Test plans and unit test. Can be organized in subfolders. Test plan are ideally documented and easy to run scripts but can be anything defining a test plan (script, text, ...), for example a Python script based on pytest.
- setup.py: Python setup file containing meta descriptions and requirements. Based on setuptools, distutils and pytest. Should NOT contain unit test (use Tox and put unit test inside /tests folder instead)
Expand Down
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
'cython_highlighting',
# 'cython_highlighting',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage']
Expand All @@ -65,7 +65,7 @@

# General information about the project.
project = u'steelscript'
copyright = u'2020 Riverbed Technology, Inc.'
copyright = u'2019 - 2024 Riverbed Technology, Inc.'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -288,6 +288,6 @@

def setup(app):
# add custom css that overrides the default theme
app.add_stylesheet('theme.css')
app.add_css_file('theme.css')
# Register the docstring processor with sphinx
#app.connect('autodoc-process-docstring', process_docstring)
31 changes: 14 additions & 17 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@
Riverbed SteelScript for Python
===============================

.. warning::
For quick starts and more about the latest version of `SteelScript <https://github.com/riverbed/steelscript>`_ for Python 3, please refer to `SteelScript repository in GitHub <https://github.com/riverbed/steelscript>`_
This documentation has been created for SteelScript 2.0 at the time of Python 2 and has not been updated and reviewed for a while.


Welcome, this is the documentation of `Riverbed SteelScript <https://github.com/riverbed/steelscript>`_
The core `SteelScript <https://github.com/riverbed/steelscript>`_ is a collection of Python modules that build upon REST APIs and other interfaces to interact with Riverbed appliances and software.
`SteelScript <https://github.com/riverbed/steelscript>`_ is a collection of libraries and scripts in Python for interacting with `Riverbed <https://www.riverbed.com/>`_ solutions and appliances, and other network infrastructure devices.
`SteelScript <https://github.com/riverbed/steelscript>`_ is provided by `Riverbed <https://www.riverbed.com/>`_ as an open source project on `GitHub <https://github.com/riverbed/steelscript>`_

Getting started with SteelScript (latest)
=========================================

Please go to `SteelScript repository in GitHub <https://github.com/riverbed/steelscript>`_ for quick starts and more about the latest version of `SteelScript <https://github.com/riverbed/steelscript>`_ for **Python 3**
.. tip::

Go to `SteelScript on GitHub <https://github.com/riverbed/steelscript>`_ for quick starts and more about the latest `SteelScript <https://github.com/riverbed/steelscript>`_

.. warning::

This documentation has been created for SteelScript 2.0 at the time of Python 2 and 3.8 and has not been updated and reviewed for a while. For latest information about SteelScript that works in containers, on Linux/Mac and Windows, supports Python 3.12+, notebooks and more, please refer to `SteelScript on GitHub <https://github.com/riverbed/steelscript>`_

*outdated* Getting started with SteelScript 2.0 for Python 2
<<*outdated*>> SteelScript 2.0 for Python 2/3.8 <<*outdated*>>
==========================================================

Installing
Expand All @@ -25,16 +22,16 @@ Installing
If you already have pip, just run the following (in a
`virtualenv <http://www.virtualenv.org/>`_)::

$ pip install steelscript
$ steel install
pip install steelscript
steel install

Not sure about pip, but you know you have Python?

1. Download :download:`steel_bootstrap.py`

2. Run it (in a `virtualenv <http://www.virtualenv.org/>`_)::

$ python steel_bootstrap.py install
python steel_bootstrap.py install

Adding a module with steel command
----------------------------------
Expand All @@ -47,9 +44,9 @@ provided in this package.
Once you have the base ``steelscript`` package installed, getting started
is just one command away::

$ steel install --steelhead
steel install --steelhead

For more details, see the :doc:`complete documentation <steelhead/overview>`.
For more details, see the :doc:`doc of the steelscript module for SteelHead <steelhead/overview>`.

Documentation
-------------
Expand Down
9 changes: 9 additions & 0 deletions docs/install/docker.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
SteelScript in a Docker
======================================

.. tip::

Go to `SteelScript on GitHub <https://github.com/riverbed/steelscript>`_ for quick starts and more about the latest `SteelScript <https://github.com/riverbed/steelscript>`_

.. warning::

This documentation has been created for SteelScript 2.0 at the time of Python 2 and 3.8 and has not been updated and reviewed for a while. For latest information about SteelScript that works in containers, on Linux/Mac and Windows, supports Python 3.12+, notebooks and more, please refer to `SteelScript on GitHub <https://github.com/riverbed/steelscript>`_


SteelScript for Python SDK - includes all of the core SteelScript packages in one simple container.

Quickstart
Expand Down
15 changes: 12 additions & 3 deletions docs/install/linuxmac.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
SteelScript Installation - Linux / Mac
======================================

.. tip::

Go to `SteelScript on GitHub <https://github.com/riverbed/steelscript>`_ for quick starts and more about the latest `SteelScript <https://github.com/riverbed/steelscript>`_

.. warning::

This documentation has been created for SteelScript 2.0 at the time of Python 2 and 3.8 and has not been updated and reviewed for a while. For latest information about SteelScript that works in containers, on Linux/Mac and Windows, supports Python 3.12+, notebooks and more, please refer to `SteelScript on GitHub <https://github.com/riverbed/steelscript>`_


This page provides step-by-step instructions for installing
SteelScript and associated modules in the system-wide site-packages
directory on a Linux or Mac. This will make SteelScript available to
Expand Down Expand Up @@ -71,7 +80,7 @@ separate different projects from one another.
$ . ~/steelscript/venv/bin/activate
(venv)$

.. note::
.. tip::
Note how your prompt changes to include the name of the virtual environment.
You can also confirm you are working within the new environment
by checking which python executable is in your path::
Expand Down Expand Up @@ -171,7 +180,7 @@ and their dependencies instead of directly installing them.
$ pip install --no-binary -d steelscript_packages steelscript.wireshark
$ pip install --no-binary -d steelscript_packages virtualenv

.. note::
.. tip::
The ``--no-binary`` option makes sure the packages can be installed
on a barebones system that may not have ``pip`` available.

Expand Down Expand Up @@ -214,7 +223,7 @@ and their dependencies instead of directly installing them.

$ sudo steel install --pip-options="--no-index -f pkgs"

.. note::
.. tip::
Omit ``sudo`` if you are using virtualenv, as admin
privileges are not required

Expand Down
9 changes: 9 additions & 0 deletions docs/install/steelhead.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
SteelScript SteelHead Installation
==================================

.. tip::

Go to `SteelScript on GitHub <https://github.com/riverbed/steelscript>`_ for quick starts and more about the latest `SteelScript <https://github.com/riverbed/steelscript>`_

.. warning::

This documentation has been created for SteelScript 2.0 at the time of Python 2 and 3.8 and has not been updated and reviewed for a while. For latest information about SteelScript that works in containers, on Linux/Mac and Windows, supports Python 3.12+, notebooks and more, please refer to `SteelScript on GitHub <https://github.com/riverbed/steelscript>`_


The SteelScript SteelHead Package is distributed entirely as
Python packages via the Python Package Index `PyPI
<https://pypi.python.org/pypi>`_. This makes it easy to install
Expand Down
16 changes: 13 additions & 3 deletions docs/install/toc.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
SteelScript Installation
========================

SteelScript is provided as open source on GitHub (https://github.com/riverbed).
.. tip::

Go to `SteelScript on GitHub <https://github.com/riverbed/steelscript>`_ for quick starts and more about the latest `SteelScript <https://github.com/riverbed/steelscript>`_

.. warning::

This documentation has been created for SteelScript 2.0 at the time of Python 2 and 3.8 and has not been updated and reviewed for a while. For latest information about SteelScript that works in containers, on Linux/Mac and Windows, supports Python 3.12+, notebooks and more, please refer to `SteelScript on GitHub <https://github.com/riverbed/steelscript>`_


`SteelScript <https://github.com/riverbed/steelscript>` is provided by `Riverbed <https://www.riverbed.com/>`_ as an open source project on `GitHub <https://github.com/riverbed/steelscript>`_

Installation of SteelScript varies depending on the platform you are using.

The quickest and easiest installation method is probably the :doc:`Docker container <docker>`.

Start with the specific instructions for :doc:`Docker <docker>`,
:doc:`Linux or Mac OS <linuxmac>`, or :doc:`Windows <windows>` for greater detail.

The quickest and easiest installation method is probably the :doc:`Docker container <docker>`.

Installing SteelScript SteelHead package requires executing the command ``steel install --steelhead``.
But it might take a few more steps, see :doc:`SteelHead Installation Instructions <steelhead>` for more details.

Expand Down
9 changes: 9 additions & 0 deletions docs/install/windows.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
SteelScript Installation - Windows
==================================

.. tip::

Go to `SteelScript on GitHub <https://github.com/riverbed/steelscript>`_ for quick starts and more about the latest `SteelScript <https://github.com/riverbed/steelscript>`_

.. warning::

This documentation has been created for SteelScript 2.0 at the time of Python 2 and 3.8 and has not been updated and reviewed for a while. For latest information about SteelScript that works in containers, on Linux/Mac and Windows, supports Python 3.12+, notebooks and more, please refer to `SteelScript on GitHub <https://github.com/riverbed/steelscript>`_


This page provides step-by-step instructions for installing
SteelScript and associated modules on Windows.

Expand Down
11 changes: 6 additions & 5 deletions docs/doc-requirements.txt → docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
Cython==0.29.10
recommonmark==0.5.0
Sphinx==2.1.1
sphinx-rtd-theme==0.4.3
Cython
Sphinx
sphinx-rtd-theme
-e git+https://github.com/riverbed/steelscript.git#egg=steelscript
-e git+https://github.com/riverbed/steelscript-appresponse.git#egg=steelscript.appresponse
-e git+https://github.com/riverbed/steelscript-netprofiler.git#egg=steelscript.netprofiler
-e git+https://github.com/riverbed/steelscript-wireshark.git#egg=steelscript.wireshark
-e git+https://github.com/riverbed/steelscript-cmdline.git#egg=steelscript.cmdline
-e git+https://github.com/riverbed/steelscript-scc.git#egg=steelscript.scc
-e git+https://github.com/riverbed/steelscript-steelhead.git#egg=steelscript.steelhead
-e git+https://github.com/riverbed/steelscript-wireshark.git#egg=steelscript.wireshark
# -e git+https://github.com/riverbed/steelscript-packets.git#egg=steelscript.packets
-e git+https://github.com/riverbed/reschema.git#egg=reschema
-e git+https://github.com/riverbed/sleepwalker.git#egg=sleepwalker