Skip to content

Commit

Permalink
Add some sphinx.
Browse files Browse the repository at this point in the history
  • Loading branch information
gizmoguy committed Dec 2, 2017
1 parent 408d2a3 commit 1f6f1ed
Show file tree
Hide file tree
Showing 26 changed files with 1,904 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_build
20 changes: 20 additions & 0 deletions docs2/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.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = faucet
SOURCEDIR = .
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)
2 changes: 2 additions & 0 deletions docs2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$ sudo pip3 install -r requirements.txt
$ make html
164 changes: 164 additions & 0 deletions docs2/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
# -*- coding: utf-8 -*-
#
# faucet documentation build configuration file, created by
# sphinx-quickstart on Thu Oct 26 13:48:25 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('../'))

autodoc_mock_imports = ["ryu", "networkx", "prometheus_client", "influxdb", "couchdb"]
autodoc_default_flags = ["members", "undoc-members", "show-inheritance"]

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
needs_sphinx = '1.6'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# General information about the project.
copyright = u'2017, Faucet Developers'
author = u'Faucet Developers'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False


# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# This is required for the alabaster theme
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
html_sidebars = {
'**': [
'relations.html', # needs 'show_related': True theme option to display
'searchbox.html',
]
}


# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'faucetdoc'


# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'faucet.tex', u'Faucet Documentation',
u'Faucet Developers', 'manual'),
]


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'faucet', u'Faucet Documentation',
[author], 1)
]


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'faucet', u'Faucet Documentation',
author, 'faucet', '',
'Miscellaneous'),
]



14 changes: 14 additions & 0 deletions docs2/external_resources.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
External Resources
----------------------------

Online Tutorials
================

* http://docs.openvswitch.org/en/latest/tutorials/faucet/
* http://costiser.ro/2017/03/07/sdn-lesson-2-introducing-faucet-as-an-openflow-controller/
* https://inside-openflow.com/openflow-tracks/faucet-controller-application-technical-track/

Tutorial Videos
===============

* https://www.youtube.com/watch?v=fuqzzjmcwlI
74 changes: 74 additions & 0 deletions docs2/faq.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
Frequently Asked Questions
==========================

How are packet-ins handled when a message is generated through table-miss flow entry?
-------------------------------------------------------------------------------------
Faucet adds explicit rules for unmatched packets.

Are group actions supported in Faucet?
--------------------------------------
Yes, just not by default currently. Set the `group_table` option to `True` on a datapath to enable group output actions.

Does Faucet send any multi-part requests? If so, please provide sample use cases
---------------------------------------------------------------------------------
Gauge uses multi-part messages for the stats collection (flow table stats and port stats).

Does Faucet install table-miss entry?
-------------------------------------
Yes.

Does Faucet clear all all switch table entries on connection?
-------------------------------------------------------------
Faucet gives all entries a specific cookie, and it clears all entries with that cookie. I.e., it clears entries added by itself but not anyone else.

Does Faucet install fresh set of table entries on connection and re-connection?
-------------------------------------------------------------------------------
Yes.

Does Faucet installed flows support priority? How is this defined - who get higher priority than the other and why?
--------------------------------------------------------------------------------------------------------------------
Yes, priority is necessary for a number of things. Example: there are higher priority rules for packets with a known source address, and lower ones to send those packets to the controller.

Is there a gui for generating a YAML file?
------------------------------------------
No.

Should Faucet detect Management, OF controller ports and gateway ports on the switch or pure OF only ports where hosts are connected?
-------------------------------------------------------------------------------------------------------------------------------------
Out of scope for Faucet as it is currently.

If another controller is connected to the switch in addition to Faucet, what happens to Faucet?
-----------------------------------------------------------------------------------------------
Faucet identifies its own flows using a cookie value, if the other controller doesn’t use the same cookie value there shouldn’t be a problem (provided the rules don’t conflict in a problematic way)

If another controller connected to switch changes role (master, slave, equal) on the switch, what happens to Faucet?
--------------------------------------------------------------------------------------------------------------------
Shouldn't be an issue, if another controller is the master then my understanding is Faucet wouldnt be able to install any flows however?

Does Faucet send LLDP packets?
------------------------------
No.

Some switches always send VLAN info in packet_in messages and some don't. How does Faucet handle this?
------------------------------------------------------------------------------------------------------
Packets should have VLANs pushed before being sent to the controller.

Is there a event handler registered to detect if flows on the switch change?
----------------------------------------------------------------------------
No.

Does Faucet use auxiliary connections?
--------------------------------------
No.

Does Faucet support L2.5 (MPLS, etc.)?
--------------------------------------
No.

Stats - what does Faucet collect (flow count, etc)?
---------------------------------------------------
Gauge collects port stats and takes a full flow-table dump periodically.

How do I use Gauge?
-------------------
Give Gauge a list of Faucet yaml config files and it will poll them for stats (as specified in the config file).
34 changes: 34 additions & 0 deletions docs2/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
User Documentation
==================

.. toctree::
:maxdepth: 2

intro
recipe_book/index
vendors/index
external_resources

Developer Documentation
=======================

.. toctree::
:maxdepth: 2

source/index

Quick References
================

.. toctree::
:maxdepth: 1

faq


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
40 changes: 40 additions & 0 deletions docs2/intro.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Introduction to Faucet
######################

What is Faucet?
===============


What is Gauge?
===============


Why Faucet?
===========

https://queue.acm.org/detail.cfm?id=3015763

Getting Help
============

We use maintain a number of mailing lists for communicating with users and
developers:

* `faucet-announce <https://list.waikato.ac.nz/mailman/listinfo/faucet-announce>`_
* `faucet-dev <https://list.waikato.ac.nz/mailman/listinfo/faucet-dev>`_
* `faucet-users <https://lists.geant.org/sympa/info/faucet-users>`_

We also have the #faucetsdn IRC channel on
`freenode <https://webchat.freenode.net/?channels=#faucetsdn>`_.

A few tutorial videos are available on our
`YouTube channel <https://www.youtube.com/channel/UChRZ5O2diT7QREazfQX0stQ>`_.

The
`faucetsdn blog <https://faucet-sdn.blogspot.co.nz>`_
and
`faucetsdn twitter <https://twitter.com/faucetsdn>`_
are good places to keep up with the latest news about faucet.

If you find bugs, or if have feature requests, please create an issue on our
`bug tracker <https://github.com/faucetsdn/faucet/issues>`_.
2 changes: 2 additions & 0 deletions docs2/recipe_book/forwarding.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Forwarding
==========
9 changes: 9 additions & 0 deletions docs2/recipe_book/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Configuration Recipe Book
=========================

.. toctree::
:maxdepth: 2

forwarding
routing
policy
2 changes: 2 additions & 0 deletions docs2/recipe_book/policy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Policy
======
2 changes: 2 additions & 0 deletions docs2/recipe_book/routing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Routing
=======
2 changes: 2 additions & 0 deletions docs2/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sphinx>=1.6
sphinx_rtd_theme

0 comments on commit 1f6f1ed

Please sign in to comment.