Skip to content

Commit

Permalink
Restructure the repository according to OpenStack
Browse files Browse the repository at this point in the history
This patch is restructuring the VirtualBMC repository according to the
OpenStack template for projects (Cookiecutter).

This patch also removes the dependency on the python-daemon library
since it is not present in the OpenStack global-requirements, now a new
class called "detach_process" has been added to the virtualbmc/utils.py
module that will take care of detaching the process context from its
parent and session.

Change-Id: Id4ae1db5b73a18abc54276fe1dfbf3ceff7adc06
  • Loading branch information
umago committed May 9, 2016
1 parent 05ffd8b commit 85a0b20
Show file tree
Hide file tree
Showing 32 changed files with 520 additions and 113 deletions.
59 changes: 53 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,54 @@
*.py[co]
.*.swp
*~
build
*.py[cod]

# C extensions
*.so

# Packages
*.egg
*.egg-info
dist
*egg-info
*egg
build
.eggs
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
lib
lib64

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox
nosetests.xml
.testrepository
.venv

# Translations
*.mo

# Mr Developer
.mr.developer.cfg
.project
.pydevproject

# Complexity
output/*.html
output/*/index.html

# Sphinx
doc/build

# pbr generates these
AUTHORS
ChangeLog

# Editors
*~
.*.swp
.*sw?
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/virtualbmc.git
7 changes: 7 additions & 0 deletions .testr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list
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/virtualbmc
4 changes: 4 additions & 0 deletions HACKING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
virtualbmc Style Commandments
===============================================

Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/
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
33 changes: 0 additions & 33 deletions README.md

This file was deleted.

28 changes: 28 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Virtual BMC
===========

A virtual BMC for controlling virtual machines using IPMI commands.

Installation
------------

.. code-block:: bash
pip install virtualbmc
Supported IPMI commands
-----------------------

.. code-block:: bash
# Power the virtual machine on or off
ipmitool -I lanplus -U admin -P password -H 127.0.0.1 power on|off
# Check the power status
ipmitool -I lanplus -U admin -P password -H 127.0.0.1 power status
# Set the boot device to network, hd or cdrom
ipmitool -I lanplus -U admin -P password -H 127.0.0.1 chassis bootdev pxe|disk|cdrom
# Get the current boot device
ipmitool -I lanplus -U admin -P password -H 127.0.0.1 chassis bootparam get 5
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'virtualbmc'
copyright = u'2016, 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 @@
.. virtualbmc 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 virtualbmc'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 virtualbmc

Or, if you have virtualenvwrapper installed::

$ mkvirtualenv virtualbmc
$ pip install virtualbmc
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 virtualbmc in a project::

import virtualbmc
Binary file removed images/demo.gif
Binary file not shown.
9 changes: 9 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.

pbr>=1.6 # Apache-2.0
six>=1.9.0 # MIT
libvirt-python>=1.2.5 # LGPLv2+
pyghmi>=0.6.11 # Apache-2.0
PrettyTable>=0.7,<0.8 # BSD
50 changes: 50 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[metadata]
name = virtualbmc
summary = Create virtual BMCs for controlling virtual instances via IPMI
description-file =
README.rst
author = OpenStack
author-email = [email protected]
home-page = http://www.openstack.org/
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
Intended Audience :: System Administrators
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4

[files]
packages =
virtualbmc

[entry_points]
console_scripts =
vbmc = virtualbmc.cmd.vbmc:main

[build_sphinx]
source-dir = doc/source
build-dir = doc/build
all_files = 1

[upload_sphinx]
upload-dir = doc/build/html

[compile_catalog]
directory = virtualbmc/locale
domain = virtualbmc

[update_catalog]
domain = virtualbmc
output_dir = virtualbmc/locale
input_file = virtualbmc/locale/virtualbmc.pot

[extract_messages]
keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg
output_file = virtualbmc/locale/virtualbmc.pot
Loading

0 comments on commit 85a0b20

Please sign in to comment.