Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
Fixed #174 -- updated Sphinx docs to match refactored modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
mboersma authored and Gabriel Monroy committed Sep 17, 2013
1 parent cd28ce4 commit f6f13b4
Show file tree
Hide file tree
Showing 25 changed files with 170 additions and 280 deletions.
2 changes: 1 addition & 1 deletion api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ def generate_app_name():
'yachting', 'yardbird', 'yearbook', 'yearling', 'yeomanry', 'yodeling',
'zaniness', 'zeppelin', 'ziggurat', 'zirconia', 'zoologer', 'zucchini',
]
return '{}-{}'.format(
return "{}-{}".format(
random.choice(adjectives), random.choice(nouns))
9 changes: 7 additions & 2 deletions cm/chef.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@
_valid_pem_path = os.path.join(CHEF_CONFIG_PATH, 'validation.pem')
CHEF_VALIDATION_KEY = subprocess.check_output(
['sudo', '/bin/cat', _valid_pem_path]).strip('\n')
except Exception as e:
raise EnvironmentError('Failed to auto-configure Chef -- {}'.format(e))
except Exception as err:
msg = "Failed to auto-configure Chef -- {}".format(err)
if os.environ.get('READTHEDOCS'):
# Just print the error if Sphinx is running
print(msg)
else:
raise EnvironmentError(msg)


def _get_client():
Expand Down
1 change: 0 additions & 1 deletion cm/views.py

This file was deleted.

2 changes: 1 addition & 1 deletion dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ docopt==0.6.1
requests==1.2.3

# Deis documentation requirements
Sphinx>=1.2b1
Sphinx>=1.2b2
smartypants>=1.8.2
sphinxcontrib-httpdomain>=1.1.9

Expand Down
3 changes: 3 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ PYTHON = python
ZIP = zip
BUILDDIR = _build

READTHEDOCS = true
export READTHEDOCS

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
Expand Down
14 changes: 14 additions & 0 deletions docs/server/api.ssh.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:description: Python API Reference for the Deis api.ssh module
:keywords: deis, api.ssh, python, api

=======
api.ssh
=======

.. contents::
:local:
.. currentmodule:: api.ssh

.. automodule:: api.ssh
:members:
:undoc-members:
27 changes: 27 additions & 0 deletions docs/server/api.tasks.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
:description: Python API Reference for the Deis api.tasks module
:keywords: deis, api.tasks, python, api

=========
api.tasks
=========

.. contents::
:local:
.. currentmodule:: api.tasks

.. automodule:: api.tasks
:members:
:undoc-members:

.. autofunction:: build_layer(layer)
.. autofunction:: destroy_layer(layer)
.. autofunction:: build_node(node)
.. autofunction:: destroy_node(node)
.. autofunction:: converge_node(node)
.. autofunction:: run_node(node, command)
.. autofunction:: build_formation(formation)
.. autofunction:: destroy_formation(formation)
.. autofunction:: converge_formation(formation)
.. autofunction:: build_app(app)
.. autofunction:: destroy_app(app)
.. autofunction:: converge_controller()
20 changes: 0 additions & 20 deletions docs/server/celerytasks.azuresms.rst

This file was deleted.

14 changes: 0 additions & 14 deletions docs/server/celerytasks.chef.rst

This file was deleted.

14 changes: 0 additions & 14 deletions docs/server/celerytasks.chef_mock.rst

This file was deleted.

14 changes: 0 additions & 14 deletions docs/server/celerytasks.chef_rsa.rst

This file was deleted.

18 changes: 0 additions & 18 deletions docs/server/celerytasks.controller.rst

This file was deleted.

21 changes: 0 additions & 21 deletions docs/server/celerytasks.ec2.rst

This file was deleted.

21 changes: 0 additions & 21 deletions docs/server/celerytasks.mock.rst

This file was deleted.

14 changes: 0 additions & 14 deletions docs/server/celerytasks.util.rst

This file was deleted.

14 changes: 14 additions & 0 deletions docs/server/cm.chef.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:description: Python API Reference for the Deis cm.chef module
:keywords: deis, cm.chef, python, celery, configuration management, chef, api

=======
cm.chef
=======

.. contents::
:local:
.. currentmodule:: cm.chef

.. automodule:: cm.chef
:members:
:undoc-members:
14 changes: 14 additions & 0 deletions docs/server/cm.chef_api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:description: Python API Reference for the Deis cm.chef_api module
:keywords: deis, cm.chef_api, python, celery, configuration management, chef, api

===========
cm.chef_api
===========

.. contents::
:local:
.. currentmodule:: cm.chef_api

.. automodule:: cm.chef_api
:members:
:undoc-members:
14 changes: 14 additions & 0 deletions docs/server/cm.chef_rsa.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:description: Python API Reference for the Deis cm.chef_rsa module
:keywords: deis, cm.chef_rsa, python, celery, configuration management, chef, rsa, api

===========
cm.chef_rsa
===========

.. contents::
:local:
.. currentmodule:: cm.chef_rsa

.. automodule:: cm.chef_rsa
:members:
:undoc-members:
14 changes: 14 additions & 0 deletions docs/server/cm.mock.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:description: Python API Reference for the Deis cm.mock module
:keywords: deis, cm.mock, python, celery, configuration management, mock, api

=======
cm.mock
=======

.. contents::
:local:
.. currentmodule:: cm.mock

.. automodule:: cm.mock
:members:
:undoc-members:
18 changes: 10 additions & 8 deletions docs/server/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,20 @@ Server Reference
api.models
api.routers
api.serializers
api.ssh
api.tasks
api.urls
api.utils
api.views

celerytasks.azuresms
celerytasks.chef
celerytasks.chef_mock
celerytasks.chef_rsa
celerytasks.controller
celerytasks.ec2
celerytasks.mock
celerytasks.util
cm.chef
cm.chef_api
cm.chef_rsa
cm.mock

provider.controller
provider.ec2
provider.mock

web.urls
web.views
19 changes: 19 additions & 0 deletions docs/server/provider.controller.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
:description: Python API Reference for the Deis provider.controller module
:keywords: deis, provider.controller, python, celery, api

===================
provider.controller
===================

.. contents::
:local:
.. currentmodule:: provider.controller

.. automodule:: provider.controller
:members:
:undoc-members:

.. autofunction:: update_gitosis(databag_item_value)
.. autofunction:: update_formation(formation_id, databag_item_value)
.. autofunction:: update_application(app_id, databag_item_value)
.. autofunction:: destroy_formation(formation_id)
14 changes: 14 additions & 0 deletions docs/server/provider.ec2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:description: Python API Reference for the Deis provider.ec2 module
:keywords: deis, provider.ec2, python, celery, ec2, api

============
provider.ec2
============

.. contents::
:local:
.. currentmodule:: provider.ec2

.. automodule:: provider.ec2
:members:
:undoc-members:
14 changes: 14 additions & 0 deletions docs/server/provider.mock.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:description: Python API Reference for the Deis provider.mock module
:keywords: deis, provider.mock, python, celery, api

=============
provider.mock
=============

.. contents::
:local:
.. currentmodule:: provider.mock

.. automodule:: provider.mock
:members:
:undoc-members:
Loading

0 comments on commit f6f13b4

Please sign in to comment.