1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

Documentation cleanup

Ticket:
Reviewed By:
Testing Done:

- these changes are mainly related to api doc generation using sphinx
This commit is contained in:
Roopa Prabhu
2014-07-22 11:15:56 -07:00
parent 2c0ad8b338
commit 904908bc5f
22 changed files with 472 additions and 114 deletions

View File

@@ -2,8 +2,8 @@ Documentation for the Code
**************************
ifupdownmain -- explicit members
================================
ifupdownmain
============
ifupdownmain is the main ifupdown module.
@@ -12,10 +12,8 @@ ifupdownmain is the main ifupdown module.
.. autoclass:: ifupdownMain
:members: up, down, reload, query
iface -- explicit members
=========================
iface is the class that represents an ifupdown iface object.
iface
=====
.. automodule:: iface
@@ -28,8 +26,8 @@ iface is the class that represents an ifupdown iface object.
.. autoclass:: ifaceJsonEncoder
scheduler -- explicit members
=============================
scheduler
=========
.. automodule:: scheduler
@@ -39,16 +37,16 @@ scheduler -- explicit members
.. autoclass:: ifaceSchedulerFlags
networkinterfaces -- explicit members
=====================================
networkinterfaces
=================
.. automodule:: networkinterfaces
.. autoclass:: networkInterfaces
:members: load, subscribe
statemanager -- explicit members
================================
statemanager
============
.. automodule:: statemanager
@@ -58,11 +56,10 @@ statemanager -- explicit members
.. autoclass:: stateManager
:members: read_saved_state, save_state
graph -- explicit members
=========================
graph
=====
.. automodule:: graph
.. autoclass:: graph
:members: topological_sort_graphs_all, generate_dots

View File

@@ -16,8 +16,7 @@ import sys, os
# 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.
#sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('/work/monster-03/roopa/cumulus-2.1-ifupdown2/packages/ifupdown2/pkg'))
sys.path.insert(0, os.path.abspath('../../ifupdown'))
# -- General configuration -----------------------------------------------------

View File

@@ -11,8 +11,11 @@ python modules. That includes inet, inet6 and dhcp configurations.
for python-ifupdown2
* if you are looking at developing a new module, pls look at writing a addon
module in the python-ifupdown2 documentation
module in the python-ifupdown2-addons documentation
Apiref
------
:doc:`apiref.rst`
.. toctree::
:maxdepth: 2
apiref.rst

View File

@@ -3,20 +3,25 @@ Getting Started
Prerequisites
-------------
* python-ifupdown2 is current only tested on a debian release wheezy or greater
* python-ifupdown2 is currently only tested on debian wheezy
* python-ifupdown2 needs python version 2.6 or greater
* build depends on: python-stdeb (for deb builds), python-docutils (for rst2man)
* depends on python-gvgen package for printing interface graphs (this will be made optional soon)
* depends on python-gvgen package for printing interface graphs (this will be made optional in the future)
* optional dependency for template engine: python-mako
* python-ifupdown2 needs python-ifupdown2-addons to function correctly
Building
--------
git clone <ifupdown2 git url>
cd ifupdown2
./build.sh
$git clone <ifupdown2 git url> ifupdown2
$cd ifupdown2/ifupdown2
$./build.sh
Installing
----------
install generated python-ifupdown2-<ver>.deb
$dpkg -i <python-ifupdown2-addons-<ver>.deb

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View File

@@ -1,15 +1,3 @@
Introduction
============
ifupdown2 is a replacement for the debian network interface
management package ifupdown. It is ifupdown re-written in python. It
maintains the original ifupdown pluggable architecture and extends it further.
It comes as two packages:
* python-ifupdown2
* python-ifupdown2-addons
(Packaging may change in the future)
python-ifupdown2
----------------
@@ -18,7 +6,7 @@ parsing /etc/network/interfaces file, loading, scheduling, template parsing,
state management and interface dependency generation of interfaces.
It dynamically loads python modules from /usr/share/ifupdownmodules (provided
by the python-ifupdown2-addons package). To remain compatible with other
by the python-ifupdown2-addons package). To remain compatible with other
packages that depend on ifupdown, it also executes scripts under /etc/network/.
To make the transition smoother, a python module under
/usr/share/ifupdownmodules will override a script by the same name under
@@ -30,26 +18,3 @@ adding python modules.
ifupdown2 module calls all modules for every interface declared in the
/etc/network/interfaces file.
python-ifupdown2-addons
-----------------------
The python-ifupdown2-addons package contains ifupdown2 addon modules.
addon modules are responsible for applying interface configuration.
The modules are installed under /usr/share/ifupdownmodules.
Each module can declare its own set of supported attributes. Each module
is passed the iface object (which is a representation of /etc/network/interfaces
iface entry). Each module is also passed the operation to be performed.
Example modules are /usr/share/ifupdownmodules/address.py,
/usr/share/ifupdownmodules/bridge.py etc
The order in which these modules are invoked is listed in
/var/lib/ifupdownaddons/addons.conf. There is a ifaddon utility in the works
to better manage the module ordering.
For details on how to add a module, see the api reference and development
documentation.