Skip to content

Commit

Permalink
Applied cookiecutter template
Browse files Browse the repository at this point in the history
Change-Id: Id860d5c4c97ae02c361c06e407a2e11cb3379783
  • Loading branch information
Fabio Verboso committed Mar 16, 2016
1 parent 7e5ced2 commit 7fd6112
Show file tree
Hide file tree
Showing 97 changed files with 922 additions and 7,174 deletions.
4 changes: 4 additions & 0 deletions .gitreview
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[gerrit]
host=review.openstack.org
port=29418
project=openstack/iotronic.git
17 changes: 17 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
If you would like to contribute to the development of OpenStack, you must
follow the steps in this page:

http://docs.openstack.org/infra/manual/developers.html

If you already have a good understanding of how the system works and your
OpenStack accounts are set up, you can skip to the development workflow
section of this documentation to learn how changes to OpenStack should be
submitted for review via the Gerrit tool:

http://docs.openstack.org/infra/manual/developers.html#development-workflow

Pull requests submitted through GitHub will be ignored.

Bugs should be filed on Launchpad, not GitHub:

https://bugs.launchpad.net/iotronic
4 changes: 4 additions & 0 deletions HACKING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
iotronic Style Commandments
===============================================

Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/
30 changes: 2 additions & 28 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Apache License

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

Expand Down Expand Up @@ -173,30 +174,3 @@ Apache License
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright {yyyy} {name of copyright owner}

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include AUTHORS
include ChangeLog
exclude .gitignore
exclude .gitreview

global-exclude *.pyc
19 changes: 19 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
===============================
iotronic
===============================

IoTronic is an Internet of Things resource management service for OpenStack clouds.

Please feel here a long description which must be at least 3 lines wrapped on
80 cols, so that distribution package maintainers can use it in their packages.
Note that this is a hard requirement.

* Free software: Apache license
* Documentation: http://docs.openstack.org/developer/iotronic
* Source: http://git.openstack.org/cgit/openstack/iotronic
* Bugs: http://bugs.launchpad.net/iotronic

Features
--------

* TODO
2 changes: 2 additions & 0 deletions babel.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[python: **.py]

75 changes: 75 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import sys

sys.path.insert(0, os.path.abspath('../..'))
# -- General configuration ----------------------------------------------------

# 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.intersphinx',
'oslosphinx'
]

# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable

# The suffix of source filenames.
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'iotronic'
copyright = u'2013, OpenStack Foundation'

# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True

# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
add_module_names = True

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

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

# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."]
# html_theme = '_theme'
# html_static_path = ['static']

# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index',
'%s.tex' % project,
u'%s Documentation' % project,
u'OpenStack Foundation', 'manual'),
]

# Example configuration for intersphinx: refer to the Python standard library.
#intersphinx_mapping = {'http://docs.python.org/': None}
4 changes: 4 additions & 0 deletions doc/source/contributing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
============
Contributing
============
.. include:: ../../CONTRIBUTING.rst
25 changes: 25 additions & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.. iotronic documentation master file, created by
sphinx-quickstart on Tue Jul 9 22:26:36 2013.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to iotronic's documentation!
========================================================

Contents:

.. toctree::
:maxdepth: 2

readme
installation
usage
contributing

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

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

12 changes: 12 additions & 0 deletions doc/source/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
============
Installation
============

At the command line::

$ pip install iotronic

Or, if you have virtualenvwrapper installed::

$ mkvirtualenv iotronic
$ pip install iotronic
1 change: 1 addition & 0 deletions doc/source/readme.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../../README.rst
7 changes: 7 additions & 0 deletions doc/source/usage.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
========
Usage
========

To use iotronic in a project::

import iotronic
7 changes: 3 additions & 4 deletions iotronic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.

import eventlet
import os

os.environ['EVENTLET_NO_GREENDNS'] = 'yes'

import eventlet

eventlet.monkey_patch(os=False)
os.environ['EVENTLET_NO_GREENDNS'] = 'yes'
eventlet.monkey_patch(os=False)
4 changes: 2 additions & 2 deletions iotronic/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
default=1000,
help='The maximum number of items returned in a single '
'response from a collection resource.'),
]
]


CONF = cfg.CONF

opt_group = cfg.OptGroup(name='api',
title='Options for the iotronic-api service')
CONF.register_group(opt_group)
CONF.register_opts(API_SERVICE_OPTS, opt_group)
CONF.register_opts(API_SERVICE_OPTS, opt_group)
20 changes: 12 additions & 8 deletions iotronic/api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,19 @@


api_opts = [
cfg.StrOpt('auth_strategy',
cfg.StrOpt(
'auth_strategy',
default='keystone',
help='Authentication strategy used by iotronic-api: one of "keystone" '
'or "noauth". "noauth" should not be used in a production '
'environment because all authentication will be disabled.'),
cfg.BoolOpt('pecan_debug',
default=False,
help=('Enable pecan debug mode. WARNING: this is insecure '
'and should not be used in a production environment.')),
]
'or "noauth". "noauth" should not be used in a production '
'environment because all authentication will be disabled.'),
cfg.BoolOpt(
'pecan_debug',
default=False,
help=(
'Enable pecan debug mode. WARNING: this is insecure '
'and should not be used in a production environment.')),
]

CONF = cfg.CONF
CONF.register_opts(api_opts)
Expand Down Expand Up @@ -79,6 +82,7 @@ def setup_app(pecan_config=None, extra_hooks=None):


class VersionSelectorApplication(object):

def __init__(self):
pc = get_pecan_config()
pc.app.enable_acl = (CONF.auth_strategy == 'keystone')
Expand Down
4 changes: 2 additions & 2 deletions iotronic/api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
'acl_public_routes': [
'/',
'/v1',
#'/v1/drivers/[a-z_]*/vendor_passthru/lookup',
#'/v1/nodes/[a-z0-9\-]+/vendor_passthru/heartbeat',
# '/v1/drivers/[a-z_]*/vendor_passthru/lookup',
# '/v1/nodes/[a-z0-9\-]+/vendor_passthru/heartbeat',
'/v1/nodes/[a-z0-9\-]',
],
}
Expand Down
4 changes: 2 additions & 2 deletions iotronic/api/controllers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ def __init__(self, headers, default_version, latest_version):
:param latest_version: version to use if latest is requested
:raises: webob.HTTPNotAcceptable
"""
(self.major, self.minor) = Version.parse_headers(headers,
default_version, latest_version)
(self.major, self.minor) = Version.parse_headers(
headers, default_version, latest_version)

def __repr__(self):
return '%s.%s' % (self.major, self.minor)
Expand Down
Loading

0 comments on commit 7fd6112

Please sign in to comment.