summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevin Carlen <devin.carlen@gmail.com>2010-07-28 18:24:52 +0000
committerDevin Carlen <devin.carlen@gmail.com>2010-07-28 18:24:52 +0000
commitd425ee86d389e8972a4e30ce5d26f1b3de96ebb7 (patch)
tree0117336e3e0aa0295895ff8fcd8853dbc933f81c
parente53caccb7a242bdabd4ea6aed914ab77cb1fca32 (diff)
parenta72fb79080df79306d947347e0ceb9be238c5cd8 (diff)
downloadnova-d425ee86d389e8972a4e30ce5d26f1b3de96ebb7.tar.gz
nova-d425ee86d389e8972a4e30ce5d26f1b3de96ebb7.tar.xz
nova-d425ee86d389e8972a4e30ce5d26f1b3de96ebb7.zip
Merged trunk
-rw-r--r--CA/INTER/.placeholder0
-rw-r--r--CA/reqs/.placeholder0
-rw-r--r--MANIFEST.in21
-rw-r--r--Makefile31
-rw-r--r--debian/changelog232
-rw-r--r--debian/compat1
-rw-r--r--debian/control136
-rw-r--r--debian/nova-api.conf5
-rw-r--r--debian/nova-api.init69
-rw-r--r--debian/nova-api.install3
-rw-r--r--debian/nova-common.dirs11
-rw-r--r--debian/nova-common.install9
-rw-r--r--debian/nova-compute.conf7
-rw-r--r--debian/nova-compute.init69
-rw-r--r--debian/nova-compute.install2
-rw-r--r--debian/nova-dhcpbridge.conf1
-rw-r--r--debian/nova-instancemonitor.init69
-rw-r--r--debian/nova-instancemonitor.install1
-rw-r--r--debian/nova-manage.conf4
-rw-r--r--debian/nova-objectstore.conf5
-rw-r--r--debian/nova-objectstore.init69
-rw-r--r--debian/nova-objectstore.install2
-rw-r--r--debian/nova-volume.conf4
-rw-r--r--debian/nova-volume.init69
-rw-r--r--debian/nova-volume.install2
-rw-r--r--debian/pycompat1
-rw-r--r--debian/pyversions1
-rwxr-xr-xdebian/rules4
-rw-r--r--doc/build/.placeholder0
-rw-r--r--doc/source/_static/.placeholder0
-rw-r--r--doc/source/_templates/.placeholder0
-rw-r--r--nova/auth/manager.py2
-rw-r--r--nova/compute/model.py74
-rw-r--r--nova/endpoint/cloud.py3
-rw-r--r--nova/exception.py3
-rw-r--r--nova/flags.py2
-rw-r--r--nova/tests/model_unittest.py95
-rw-r--r--nova/utils.py9
-rwxr-xr-xrun_tests.sh13
-rw-r--r--setup.cfg10
-rw-r--r--setup.py19
41 files changed, 238 insertions, 820 deletions
diff --git a/CA/INTER/.placeholder b/CA/INTER/.placeholder
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/CA/INTER/.placeholder
diff --git a/CA/reqs/.placeholder b/CA/reqs/.placeholder
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/CA/reqs/.placeholder
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 000000000..e917077c5
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,21 @@
+include HACKING LICENSE run_tests.py run_tests.sh
+include README builddeb.sh exercise_rsapi.py
+graft CA
+graft doc
+graft smoketests
+graft tools
+include nova/auth/novarc.template
+include nova/auth/slap.sh
+include nova/cloudpipe/bootscript.sh
+include nova/cloudpipe/client.ovpn.template
+include nova/compute/fakevirtinstance.xml
+include nova/compute/interfaces.template
+include nova/compute/libvirt.xml.template
+include nova/tests/CA/
+include nova/tests/CA/cacert.pem
+include nova/tests/CA/private/
+include nova/tests/CA/private/cakey.pem
+include nova/tests/bundle/
+include nova/tests/bundle/1mb.manifest.xml
+include nova/tests/bundle/1mb.part.0
+include nova/tests/bundle/1mb.part.1
diff --git a/Makefile b/Makefile
deleted file mode 100644
index cd7e233e1..000000000
--- a/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-venv=.nova-venv
-with_venv=tools/with_venv.sh
-
-build:
- # Nothing to do
-
-default_test_type:= $(shell if [ -e $(venv) ]; then echo venv; else echo system; fi)
-
-test: test-$(default_test_type)
-
-test-venv: $(venv)
- $(with_venv) python run_tests.py
-
-test-system:
- python run_tests.py
-
-clean:
- rm -rf _trial_temp
- rm -rf keys
- rm -rf instances
- rm -rf networks
- rm -f run_tests.err.log
-
-clean-all: clean
- rm -rf $(venv)
-
-$(venv):
- @echo "You need to install the Nova virtualenv before you can run this."
- @echo ""
- @echo "Please run tools/install_venv.py"
- @exit 1
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index 31dd5e91e..000000000
--- a/debian/changelog
+++ /dev/null
@@ -1,232 +0,0 @@
-nova (0.2.3-1) UNRELEASED; urgency=low
-
- * Relax the Twisted dependency to python-twisted-core (rather than the
- full stack).
- * Move nova related configuration files into /etc/nova/.
- * Add a dependency on nginx from nova-objectsstore and install a
- suitable configuration file.
- * Ship the CA directory in nova-common.
- * Add a default flag file for nova-manage to help it find the CA.
- * If set, pass KernelId and RamdiskId from RunInstances call to the
- target compute node.
- * Added --network_path setting to nova-compute's flagfile.
- * Move templates from python directories to /usr/share/nova.
- * Add debian/nova-common.dirs to create
- var/lib/nova/{buckets,CA,images,instances,keys,networks}
- * Don't pass --daemonize=1 to nova-compute. It's already daemonising
- by default.
-
- -- Vishvananda Ishaya <vishvananda@gmail.com> Mon, 14 Jul 2010 12:00:00 -0700
-
-nova (0.2.2-10) UNRELEASED; urgency=low
-
- * Fixed extra space in vblade-persist
-
- -- Vishvananda Ishaya <vishvananda@gmail.com> Mon, 13 Jul 2010 19:00:00 -0700
-
-nova (0.2.2-9) UNRELEASED; urgency=low
-
- * Fixed invalid dn bug in ldap for adding roles
-
- -- Vishvananda Ishaya <vishvananda@gmail.com> Mon, 12 Jul 2010 15:20:00 -0700
-
-nova (0.2.2-8) UNRELEASED; urgency=low
-
- * Added a missing comma
-
- -- Vishvananda Ishaya <vishvananda@gmail.com> Mon, 08 Jul 2010 10:05:00 -0700
-
-nova (0.2.2-7) UNRELEASED; urgency=low
-
- * Missing files from twisted patch
- * License upedates
- * Reformatting/cleanup
- * Users/ldap bugfixes
- * Merge fixes
- * Documentation updates
- * Vpn key creation fix
- * Multiple shelves for volumes
-
- -- Vishvananda Ishaya <vishvananda@gmail.com> Wed, 07 Jul 2010 18:45:00 -0700
-
-nova (0.2.2-6) UNRELEASED; urgency=low
-
- * Fix to make Key Injection work again
-
- -- Vishvananda Ishaya <vishvananda@gmail.com> Mon, 14 Jun 2010 21:35:00 -0700
-
-nova (0.2.2-5) UNRELEASED; urgency=low
-
- * Lowered message callback frequency to stop compute and volume
- from eating tons of cpu
-
- -- Vishvananda Ishaya <vishvananda@gmail.com> Mon, 14 Jun 2010 14:15:00 -0700
-
-nova (0.2.2-4) UNRELEASED; urgency=low
-
- * Documentation fixes
- * Uncaught exceptions now log properly
- * Nova Manage zip exporting works again
- * Twisted threads no longer interrupt system calls
-
- -- Vishvananda Ishaya <vishvananda@gmail.com> Sun, 13 Jun 2010 01:40:00 -0700
-
-nova (0.2.2-3) UNRELEASED; urgency=low
-
- * Fixes to api calls
- * More accurate documentation
- * Removal of buggy multiprocessing
- * Asynchronus execution of shell commands
- * Fix of messaging race condition
- * Test redis database cleaned out on each run of tests
- * Smoketest updates
-
- -- Vishvananda Ishaya <vishvananda@gmail.com> Fri, 12 Jun 2010 20:10:00 -0700
-
-nova (0.2.2-2) UNRELEASED; urgency=low
-
- * Bugfixes to volume code
- * Instances no longer use keeper
- * Sectors off by one fix
- * State reported properly by instances
-
- -- Vishvananda Ishaya <vishvananda@gmail.com> Wed, 03 Jun 2010 15:21:00 -0700
-
-nova (0.2.2-1) UNRELEASED; urgency=low
-
- * First release based on nova/cc
- * Major rewrites to volumes and instances
- * Addition of cloudpipe and rbac
- * Major bugfixes
-
- -- Vishvananda Ishaya <vishvananda@gmail.com> Wed, 02 Jun 2010 17:42:00 -0700
-
-nova (0.2.1-1) UNRELEASED; urgency=low
-
- * Support ephemeral (local) space for instances
- * instance related fixes
- * fix network & cloudpipe bugs
-
- -- Vishvananda Ishaya <vishvananda@gmail.com> Mon, 25 May 2010 12:14:00 -0700
-
-nova (0.2.0-20) UNRELEASED; urgency=low
-
- * template files are in proper folder
-
- -- Vishvananda Ishaya <vishvananda@gmail.com> Mon, 25 May 2010 12:14:00 -0700
-
-nova (0.2.0-19) UNRELEASED; urgency=low
-
- * removed mox dependency and added templates to install
-
- -- Vishvananda Ishaya <vishvananda@gmail.com> Mon, 25 May 2010 11:53:00 -0700
-
-nova (0.2.0-18) UNRELEASED; urgency=low
-
- * api server properly sends instance status code
-
- -- Vishvananda Ishaya <vishvananda@gmail.com> Mon, 24 May 2010 17:18:00 -0700
-
-nova (0.2.0-17) UNRELEASED; urgency=low
-
- * redis-backed datastore
-
- -- Vishvananda Ishaya <vishvananda@gmail.com> Mon, 24 May 2010 16:28:00 -0700
-
-nova (0.2.0-16) UNRELEASED; urgency=low
-
- * make sure twistd.pid is really overriden
-
- -- Manish Singh <yosh@gimp.org> Sun, 23 May 2010 22:18:47 -0700
-
-nova (0.2.0-15) UNRELEASED; urgency=low
-
- * rpc shouldn't require tornado unless you are using attach_to_tornado
-
- -- Jesse Andrews <anotherjesse@gmail.com> Sun, 23 May 2010 21:59:00 -0700
-
-nova (0.2.0-14) UNRELEASED; urgency=low
-
- * quicky init scripts for the other services, based on nova-objectstore
-
- -- Manish Singh <yosh@gimp.org> Sun, 23 May 2010 21:49:43 -0700
-
-nova (0.2.0-13) UNRELEASED; urgency=low
-
- * init script for nova-objectstore
-
- -- Manish Singh <yosh@gimp.org> Sun, 23 May 2010 21:33:25 -0700
-
-nova (0.2.0-12) UNRELEASED; urgency=low
-
- * kvm, kpartx required for nova-compute
-
- -- Jesse Andrews <anotherjesse@gmail.com> Sun, 23 May 2010 21:32:00 -0700
-
-nova (0.2.0-11) UNRELEASED; urgency=low
-
- * Need to include the python modules in nova-common.install as well.
-
- -- Manish Singh <yosh@gimp.org> Sun, 23 May 2010 20:04:27 -0700
-
-nova (0.2.0-10) UNRELEASED; urgency=low
-
- * add more requirements to bin packages
-
- -- Jesse Andrews <anotherjesse@gmail.com> Sun, 23 May 2010 19:54:00 -0700
-
-nova (0.2.0-9) UNRELEASED; urgency=low
-
- * nova bin packages should depend on the same version of nova-common they
- were built from.
-
- -- Manish Singh <yosh@gimp.org> Sun, 23 May 2010 18:46:34 -0700
-
-nova (0.2.0-8) UNRELEASED; urgency=low
-
- * Require libvirt 0.8.1 or newer for nova-compute
-
- -- Jesse Andrews <anotherjesse@gmail.com> Sun, 23 May 2010 18:33:00 -0700
-
-nova (0.2.0-7) UNRELEASED; urgency=low
-
- * Split bins into separate packages
-
- -- Manish Singh <yosh@gimp.org> Sun, 23 May 2010 18:46:34 -0700
-
-nova (0.2.0-6) UNRELEASED; urgency=low
-
- * Add python-m2crypto to deps
-
- -- Jesse Andrews <anotherjesse@gmail.com> Sun, 23 May 2010 18:33:00 -0700
-
-nova (0.2.0-5) UNRELEASED; urgency=low
-
- * Add python-gflags to deps
-
- -- Manish Singh <yosh@gimp.org> Sun, 23 May 2010 18:28:50 -0700
-
-nova (0.2.0-4) UNRELEASED; urgency=low
-
- * install scripts
-
- -- Manish Singh <yosh@gimp.org> Sun, 23 May 2010 18:16:27 -0700
-
-nova (0.2.0-3) UNRELEASED; urgency=low
-
- * debian build goop
-
- -- Manish Singh <yosh@gimp.org> Sun, 23 May 2010 18:06:37 -0700
-
-nova (0.2.0-2) UNRELEASED; urgency=low
-
- * improved requirements
-
- -- Jesse Andrews <anotherjesse@gmail.com> Sun, 23 May 2010 17:42:00 -0700
-
-nova (0.2.0-1) UNRELEASED; urgency=low
-
- * initial release
-
- -- Jesse Andrews <anotherjesse@gmail.com> Fri, 21 May 2010 12:28:00 -0700
-
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index 7f8f011eb..000000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-7
diff --git a/debian/control b/debian/control
deleted file mode 100644
index a6d12f36e..000000000
--- a/debian/control
+++ /dev/null
@@ -1,136 +0,0 @@
-Source: nova
-Section: net
-Priority: extra
-Maintainer: Jesse Andrews <jesse@ansolabs.com>
-Build-Depends: debhelper (>= 7), redis-server (>=2:2.0.0~rc1), python-m2crypto
-Build-Depends-Indep: python-support, python-setuptools
-Standards-Version: 3.8.4
-XS-Python-Version: 2.6
-
-Package: nova-common
-Architecture: all
-Depends: ${python:Depends}, aoetools, vlan, python-ipy, python-boto, python-m2crypto, python-pycurl, python-twisted-core, python-daemon, python-redis, python-carrot, python-lockfile, python-gflags, python-tornado, ${misc:Depends}
-Provides: ${python:Provides}
-Description: Nova Cloud Computing - common files
- Nova is a cloud computing fabric controller (the main part of an IaaS
- system) built to match the popular AWS EC2 and S3 APIs. It is written in
- Python, using the Tornado and Twisted frameworks, and relies on the
- standard AMQP messaging protocol, and the Redis distributed KVS.
- .
- Nova is intended to be easy to extend, and adapt. For example, it
- currently uses an LDAP server for users and groups, but also includes a
- fake LDAP server, that stores data in Redis. It has extensive test
- coverage, and uses the Sphinx toolkit (the same as Python itself) for code
- and user documentation.
- .
- While Nova is currently in Beta use within several organizations, the
- codebase is very much under active development.
- .
- This package contains things that are needed by all parts of Nova.
-
-Package: nova-compute
-Architecture: all
-Depends: nova-common (= ${binary:Version}), kpartx, kvm, python-libvirt, libvirt-bin (>= 0.7.5), curl, ${python:Depends}, ${misc:Depends}
-Description: Nova Cloud Computing - compute node
- Nova is a cloud computing fabric controller (the main part of an IaaS
- system) built to match the popular AWS EC2 and S3 APIs. It is written in
- Python, using the Tornado and Twisted frameworks, and relies on the
- standard AMQP messaging protocol, and the Redis distributed KVS.
- .
- Nova is intended to be easy to extend, and adapt. For example, it
- currently uses an LDAP server for users and groups, but also includes a
- fake LDAP server, that stores data in Redis. It has extensive test
- coverage, and uses the Sphinx toolkit (the same as Python itself) for code
- and user documentation.
- .
- While Nova is currently in Beta use within several organizations, the
- codebase is very much under active development.
- .
- This is the package you will install on the nodes that will run your
- virtual machines.
-
-Package: nova-volume
-Architecture: all
-Depends: nova-common (= ${binary:Version}), vblade, vblade-persist, ${python:Depends}, ${misc:Depends}
-Description: Nova Cloud Computing - storage
- Nova is a cloud computing fabric controller (the main part of an IaaS
- system) built to match the popular AWS EC2 and S3 APIs. It is written in
- Python, using the Tornado and Twisted frameworks, and relies on the
- standard AMQP messaging protocol, and the Redis distributed KVS.
- .
- Nova is intended to be easy to extend, and adapt. For example, it
- currently uses an LDAP server for users and groups, but also includes a
- fake LDAP server, that stores data in Redis. It has extensive test
- coverage, and uses the Sphinx toolkit (the same as Python itself) for code
- and user documentation.
- .
- While Nova is currently in Beta use within several organizations, the
- codebase is very much under active development.
- .
- This is the package you will install on your storage nodes.
-
-Package: nova-api
-Architecture: all
-Depends: nova-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends}
-Description: Nova Cloud Computing - API frontend
- Nova is a cloud computing fabric controller (the main part of an IaaS
- system) built to match the popular AWS EC2 and S3 APIs. It is written in
- Python, using the Tornado and Twisted frameworks, and relies on the
- standard AMQP messaging protocol, and the Redis distributed KVS.
- .
- Nova is intended to be easy to extend, and adapt. For example, it
- currently uses an LDAP server for users and groups, but also includes a
- fake LDAP server, that stores data in Redis. It has extensive test
- coverage, and uses the Sphinx toolkit (the same as Python itself) for code
- and user documentation.
- .
- While Nova is currently in Beta use within several organizations, the
- codebase is very much under active development.
- .
- This package provides the API frontend.
-
-Package: nova-objectstore
-Architecture: all
-Depends: nova-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends}
-Description: Nova Cloud Computing - object store
- Nova is a cloud computing fabric controller (the main part of an IaaS
- system) built to match the popular AWS EC2 and S3 APIs. It is written in
- Python, using the Tornado and Twisted frameworks, and relies on the
- standard AMQP messaging protocol, and the Redis distributed KVS.
- .
- Nova is intended to be easy to extend, and adapt. For example, it
- currently uses an LDAP server for users and groups, but also includes a
- fake LDAP server, that stores data in Redis. It has extensive test
- coverage, and uses the Sphinx toolkit (the same as Python itself) for code
- and user documentation.
- .
- While Nova is currently in Beta use within several organizations, the
- codebase is very much under active development.
- .
- This is the package you will install on the nodes that will contain your
- object store.
-
-Package: nova-instancemonitor
-Architecture: all
-Depends: nova-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends}
-Description: Nova instance monitor
-
-Package: nova-tools
-Architecture: all
-Depends: python-boto, ${python:Depends}, ${misc:Depends}
-Description: Nova Cloud Computing - management tools
- Nova is a cloud computing fabric controller (the main part of an IaaS
- system) built to match the popular AWS EC2 and S3 APIs. It is written in
- Python, using the Tornado and Twisted frameworks, and relies on the
- standard AMQP messaging protocol, and the Redis distributed KVS.
- .
- Nova is intended to be easy to extend, and adapt. For example, it
- currently uses an LDAP server for users and groups, but also includes a
- fake LDAP server, that stores data in Redis. It has extensive test
- coverage, and uses the Sphinx toolkit (the same as Python itself) for code
- and user documentation.
- .
- While Nova is currently in Beta use within several organizations, the
- codebase is very much under active development.
- .
- This package contains admin tools for Nova.
diff --git a/debian/nova-api.conf b/debian/nova-api.conf
deleted file mode 100644
index 3e6c056ad..000000000
--- a/debian/nova-api.conf
+++ /dev/null
@@ -1,5 +0,0 @@
---daemonize=1
---ca_path=/var/lib/nova/CA
---keys_path=/var/lib/nova/keys
---networks_path=/var/lib/nova/networks
---dhcpbridge_flagfile=/etc/nova/nova-dhcpbridge.conf
diff --git a/debian/nova-api.init b/debian/nova-api.init
deleted file mode 100644
index 597fbef95..000000000
--- a/debian/nova-api.init
+++ /dev/null
@@ -1,69 +0,0 @@
-#! /bin/sh
-### BEGIN INIT INFO
-# Provides: nova-api
-# Required-Start: $remote_fs $syslog
-# Required-Stop: $remote_fs $syslog
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: nova-api
-# Description: nova-api
-### END INIT INFO
-
-
-set -e
-
-DAEMON=/usr/bin/nova-api
-DAEMON_ARGS="--flagfile=/etc/nova/nova-api.conf"
-PIDFILE=/var/run/nova-api.pid
-
-ENABLED=true
-
-if test -f /etc/default/nova-api; then
- . /etc/default/nova-api
-fi
-
-. /lib/lsb/init-functions
-
-export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
-
-case "$1" in
- start)
- test "$ENABLED" = "true" || exit 0
- log_daemon_msg "Starting nova api" "nova-api"
- cd /var/run
- if $DAEMON $DAEMON_ARGS start; then
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
- stop)
- test "$ENABLED" = "true" || exit 0
- log_daemon_msg "Stopping nova api" "nova-api"
- cd /var/run
- if $DAEMON $DAEMON_ARGS stop; then
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
- restart|force-reload)
- test "$ENABLED" = "true" || exit 1
- cd /var/run
- if $DAEMON $DAEMON_ARGS restart; then
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
- status)
- test "$ENABLED" = "true" || exit 0
- status_of_proc -p $PIDFILE $DAEMON nova-api && exit 0 || exit $?
- ;;
- *)
- log_action_msg "Usage: /etc/init.d/nova-api {start|stop|restart|force-reload|status}"
- exit 1
- ;;
-esac
-
-exit 0
diff --git a/debian/nova-api.install b/debian/nova-api.install
deleted file mode 100644
index 89615d302..000000000
--- a/debian/nova-api.install
+++ /dev/null
@@ -1,3 +0,0 @@
-bin/nova-api usr/bin
-debian/nova-api.conf etc/nova
-debian/nova-dhcpbridge.conf etc/nova
diff --git a/debian/nova-common.dirs b/debian/nova-common.dirs
deleted file mode 100644
index b58fe8b7f..000000000
--- a/debian/nova-common.dirs
+++ /dev/null
@@ -1,11 +0,0 @@
-etc/nova
-var/lib/nova/buckets
-var/lib/nova/CA
-var/lib/nova/CA/INTER
-var/lib/nova/CA/newcerts
-var/lib/nova/CA/private
-var/lib/nova/CA/reqs
-var/lib/nova/images
-var/lib/nova/instances
-var/lib/nova/keys
-var/lib/nova/networks
diff --git a/debian/nova-common.install b/debian/nova-common.install
deleted file mode 100644
index 93251363a..000000000
--- a/debian/nova-common.install
+++ /dev/null
@@ -1,9 +0,0 @@
-bin/nova-manage usr/bin
-debian/nova-manage.conf etc/nova
-nova/auth/novarc.template usr/share/nova
-nova/cloudpipe/client.ovpn.template usr/share/nova
-nova/compute/libvirt.xml.template usr/share/nova
-nova/compute/interfaces.template usr/share/nova
-CA/openssl.cnf.tmpl var/lib/nova/CA
-CA/geninter.sh var/lib/nova/CA
-CA/genrootca.sh var/lib/nova/CA
diff --git a/debian/nova-compute.conf b/debian/nova-compute.conf
deleted file mode 100644
index 11de13ff6..000000000
--- a/debian/nova-compute.conf
+++ /dev/null
@@ -1,7 +0,0 @@
---ca_path=/var/lib/nova/CA
---keys_path=/var/lib/nova/keys
---instances_path=/var/lib/nova/instances
---simple_network_template=/usr/share/nova/interfaces.template
---libvirt_xml_template=/usr/share/nova/libvirt.xml.template
---vpn_client_template=/usr/share/nova/client.ovpn.template
---credentials_template=/usr/share/nova/novarc.template
diff --git a/debian/nova-compute.init b/debian/nova-compute.init
deleted file mode 100644
index d0f093a7a..000000000
--- a/debian/nova-compute.init
+++ /dev/null
@@ -1,69 +0,0 @@
-#! /bin/sh
-### BEGIN INIT INFO
-# Provides: nova-compute
-# Required-Start: $remote_fs $syslog
-# Required-Stop: $remote_fs $syslog
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: nova-compute
-# Description: nova-compute
-### END INIT INFO
-
-
-set -e
-
-DAEMON=/usr/bin/nova-compute
-DAEMON_ARGS="--flagfile=/etc/nova/nova-compute.conf"
-PIDFILE=/var/run/nova-compute.pid
-
-ENABLED=true
-
-if test -f /etc/default/nova-compute; then
- . /etc/default/nova-compute
-fi
-
-. /lib/lsb/init-functions
-
-export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
-
-case "$1" in
- start)
- test "$ENABLED" = "true" || exit 0
- log_daemon_msg "Starting nova compute" "nova-compute"
- cd /var/run
- if $DAEMON $DAEMON_ARGS start; then
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
- stop)
- test "$ENABLED" = "true" || exit 0
- log_daemon_msg "Stopping nova compute" "nova-compute"
- cd /var/run
- if $DAEMON $DAEMON_ARGS stop; then
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
- restart|force-reload)
- test "$ENABLED" = "true" || exit 1
- cd /var/run
- if $DAEMON $DAEMON_ARGS restart; then
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
- status)
- test "$ENABLED" = "true" || exit 0
- status_of_proc -p $PIDFILE $DAEMON nova-compute && exit 0 || exit $?
- ;;
- *)
- log_action_msg "Usage: /etc/init.d/nova-compute {start|stop|restart|force-reload|status}"
- exit 1
- ;;
-esac
-
-exit 0
diff --git a/debian/nova-compute.install b/debian/nova-compute.install
deleted file mode 100644
index 5f9df46a8..000000000
--- a/debian/nova-compute.install
+++ /dev/null
@@ -1,2 +0,0 @@
-bin/nova-compute usr/bin
-debian/nova-compute.conf etc/nova
diff --git a/debian/nova-dhcpbridge.conf b/debian/nova-dhcpbridge.conf
deleted file mode 100644
index 68cb8903e..000000000
--- a/debian/nova-dhcpbridge.conf
+++ /dev/null
@@ -1 +0,0 @@
---networks_path=/var/lib/nova/networks
diff --git a/debian/nova-instancemonitor.init b/debian/nova-instancemonitor.init
deleted file mode 100644
index 2865fc334..000000000
--- a/debian/nova-instancemonitor.init
+++ /dev/null
@@ -1,69 +0,0 @@
-#! /bin/sh
-### BEGIN INIT INFO
-# Provides: nova-instancemonitor
-# Required-Start: $remote_fs $syslog
-# Required-Stop: $remote_fs $syslog
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: nova-instancemonitor
-# Description: nova-instancemonitor
-### END INIT INFO
-
-
-set -e
-
-DAEMON=/usr/bin/nova-instancemonitor
-DAEMON_ARGS="--flagfile=/etc/nova.conf"
-PIDFILE=/var/run/nova-instancemonitor.pid
-
-ENABLED=false
-
-if test -f /etc/default/nova-instancemonitor; then
- . /etc/default/nova-instancemonitor
-fi
-
-. /lib/lsb/init-functions
-
-export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
-
-case "$1" in
- start)
- test "$ENABLED" = "true" || exit 0
- log_daemon_msg "Starting nova compute" "nova-instancemonitor"
- cd /var/run
- if $DAEMON $DAEMON_ARGS start; then
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
- stop)
- test "$ENABLED" = "true" || exit 0
- log_daemon_msg "Stopping nova compute" "nova-instancemonitor"
- cd /var/run
- if $DAEMON $DAEMON_ARGS stop; then
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
- restart|force-reload)
- test "$ENABLED" = "true" || exit 1
- cd /var/run
- if $DAEMON $DAEMON_ARGS restart; then
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
- status)
- test "$ENABLED" = "true" || exit 0
- status_of_proc -p $PIDFILE $DAEMON nova-instancemonitor && exit 0 || exit $?
- ;;
- *)
- log_action_msg "Usage: /etc/init.d/nova-instancemonitor {start|stop|restart|force-reload|status}"
- exit 1
- ;;
-esac
-
-exit 0
diff --git a/debian/nova-instancemonitor.install b/debian/nova-instancemonitor.install
deleted file mode 100644
index 48e7884b4..000000000
--- a/debian/nova-instancemonitor.install
+++ /dev/null
@@ -1 +0,0 @@
-bin/nova-instancemonitor usr/bin
diff --git a/debian/nova-manage.conf b/debian/nova-manage.conf
deleted file mode 100644
index 5ccda7ecf..000000000
--- a/debian/nova-manage.conf
+++ /dev/null
@@ -1,4 +0,0 @@
---ca_path=/var/lib/nova/CA
---credentials_template=/usr/share/nova/novarc.template
---keys_path=/var/lib/nova/keys
---vpn_client_template=/usr/share/nova/client.ovpn.template
diff --git a/debian/nova-objectstore.conf b/debian/nova-objectstore.conf
deleted file mode 100644
index 8eca39715..000000000
--- a/debian/nova-objectstore.conf
+++ /dev/null
@@ -1,5 +0,0 @@
---daemonize=1
---ca_path=/var/lib/nova/CA
---keys_path=/var/lib/nova/keys
---images_path=/var/lib/nova/images
---buckets_path=/var/lib/nova/buckets
diff --git a/debian/nova-objectstore.init b/debian/nova-objectstore.init
deleted file mode 100644
index 9676345ad..000000000
--- a/debian/nova-objectstore.init
+++ /dev/null
@@ -1,69 +0,0 @@
-#! /bin/sh
-### BEGIN INIT INFO
-# Provides: nova-objectstore
-# Required-Start: $remote_fs $syslog
-# Required-Stop: $remote_fs $syslog
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: nova-objectstore
-# Description: nova-objectstore
-### END INIT INFO
-
-
-set -e
-
-DAEMON=/usr/bin/nova-objectstore
-DAEMON_ARGS="--flagfile=/etc/nova/nova-objectstore.conf"
-PIDFILE=/var/run/nova-objectstore.pid
-
-ENABLED=true
-
-if test -f /etc/default/nova-objectstore; then
- . /etc/default/nova-objectstore
-fi
-
-. /lib/lsb/init-functions
-
-export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
-
-case "$1" in
- start)
- test "$ENABLED" = "true" || exit 0
- log_daemon_msg "Starting nova objectstore" "nova-objectstore"
- cd /var/run
- if $DAEMON $DAEMON_ARGS start; then
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
- stop)
- test "$ENABLED" = "true" || exit 0
- log_daemon_msg "Stopping nova objectstore" "nova-objectstore"
- cd /var/run
- if $DAEMON $DAEMON_ARGS stop; then
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
- restart|force-reload)
- test "$ENABLED" = "true" || exit 1
- cd /var/run
- if $DAEMON $DAEMON_ARGS restart; then
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
- status)
- test "$ENABLED" = "true" || exit 0
- status_of_proc -p $PIDFILE $DAEMON nova-objectstore && exit 0 || exit $?
- ;;
- *)
- log_action_msg "Usage: /etc/init.d/nova-objectstore {start|stop|restart|force-reload|status}"
- exit 1
- ;;
-esac
-
-exit 0
diff --git a/debian/nova-objectstore.install b/debian/nova-objectstore.install
deleted file mode 100644
index c5b3d997a..000000000
--- a/debian/nova-objectstore.install
+++ /dev/null
@@ -1,2 +0,0 @@
-bin/nova-objectstore usr/bin
-debian/nova-objectstore.conf etc/nova
diff --git a/debian/nova-volume.conf b/debian/nova-volume.conf
deleted file mode 100644
index 57e3411a0..000000000
--- a/debian/nova-volume.conf
+++ /dev/null
@@ -1,4 +0,0 @@
---ca_path=/var/lib/nova/CA
---keys_path=/var/lib/nova/keys
---images_path=/var/lib/nova/images
---buckets_path=/var/lib/nova/buckets
diff --git a/debian/nova-volume.init b/debian/nova-volume.init
deleted file mode 100644
index d5c2dddf8..000000000
--- a/debian/nova-volume.init
+++ /dev/null
@@ -1,69 +0,0 @@
-#! /bin/sh
-### BEGIN INIT INFO
-# Provides: nova-volume
-# Required-Start: $remote_fs $syslog
-# Required-Stop: $remote_fs $syslog
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: nova-volume
-# Description: nova-volume
-### END INIT INFO
-
-
-set -e
-
-DAEMON=/usr/bin/nova-volume
-DAEMON_ARGS="--flagfile=/etc/nova/nova-volume.conf"
-PIDFILE=/var/run/nova-volume.pid
-
-ENABLED=true
-
-if test -f /etc/default/nova-volume; then
- . /etc/default/nova-volume
-fi
-
-. /lib/lsb/init-functions
-
-export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
-
-case "$1" in
- start)
- test "$ENABLED" = "true" || exit 0
- log_daemon_msg "Starting nova volume" "nova-volume"
- cd /var/run
- if $DAEMON $DAEMON_ARGS start; then
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
- stop)
- test "$ENABLED" = "true" || exit 0
- log_daemon_msg "Stopping nova volume" "nova-volume"
- cd /var/run
- if $DAEMON $DAEMON_ARGS stop; then
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
- restart|force-reload)
- test "$ENABLED" = "true" || exit 1
- cd /var/run
- if $DAEMON $DAEMON_ARGS restart; then
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
- status)
- test "$ENABLED" = "true" || exit 0
- status_of_proc -p $PIDFILE $DAEMON nova-volume && exit 0 || exit $?
- ;;
- *)
- log_action_msg "Usage: /etc/init.d/nova-volume {start|stop|restart|force-reload|status}"
- exit 1
- ;;
-esac
-
-exit 0
diff --git a/debian/nova-volume.install b/debian/nova-volume.install
deleted file mode 100644
index 9a840c78e..000000000
--- a/debian/nova-volume.install
+++ /dev/null
@@ -1,2 +0,0 @@
-bin/nova-volume usr/bin
-debian/nova-volume.conf etc/nova
diff --git a/debian/pycompat b/debian/pycompat
deleted file mode 100644
index 0cfbf0888..000000000
--- a/debian/pycompat
+++ /dev/null
@@ -1 +0,0 @@
-2
diff --git a/debian/pyversions b/debian/pyversions
deleted file mode 100644
index 0c043f18c..000000000
--- a/debian/pyversions
+++ /dev/null
@@ -1 +0,0 @@
-2.6-
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index 2d33f6ac8..000000000
--- a/debian/rules
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/make -f
-
-%:
- dh $@
diff --git a/doc/build/.placeholder b/doc/build/.placeholder
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/doc/build/.placeholder
diff --git a/doc/source/_static/.placeholder b/doc/source/_static/.placeholder
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/doc/source/_static/.placeholder
diff --git a/doc/source/_templates/.placeholder b/doc/source/_templates/.placeholder
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/doc/source/_templates/.placeholder
diff --git a/nova/auth/manager.py b/nova/auth/manager.py
index b7702d64c..4beb1c2f0 100644
--- a/nova/auth/manager.py
+++ b/nova/auth/manager.py
@@ -35,7 +35,9 @@ from nova import exception
from nova import flags
from nova import objectstore # for flags
from nova import utils
+from nova.auth import ldapdriver # for flags
from nova.auth import signer
+
FLAGS = flags.FLAGS
# NOTE(vish): a user with one of these roles will be a superuser and
diff --git a/nova/compute/model.py b/nova/compute/model.py
index cda188183..212830d3c 100644
--- a/nova/compute/model.py
+++ b/nova/compute/model.py
@@ -40,9 +40,11 @@ True
True
"""
+import datetime
import logging
import time
import redis
+import uuid
from nova import datastore
from nova import exception
@@ -228,6 +230,78 @@ class Daemon(datastore.BasicModel):
for x in cls.associated_to("host", hostname):
yield x
+class SessionToken(datastore.BasicModel):
+ """This is a short-lived auth token that is passed through web requests"""
+
+ def __init__(self, session_token):
+ self.token = session_token
+ self.default_ttl = FLAGS.auth_token_ttl
+ super(SessionToken, self).__init__()
+
+ @property
+ def identifier(self):
+ return self.token
+
+ def default_state(self):
+ now = datetime.datetime.utcnow()
+ diff = datetime.timedelta(seconds=self.default_ttl)
+ expires = now + diff
+ return {'user': None, 'session_type': None, 'token': self.token,
+ 'expiry': expires.strftime(utils.TIME_FORMAT)}
+
+ def save(self):
+ """Call into superclass to save object, then save associations"""
+ if not self['user']:
+ raise exception.Invalid("SessionToken requires a User association")
+ success = super(SessionToken, self).save()
+ if success:
+ self.associate_with("user", self['user'])
+ return True
+
+ @classmethod
+ def lookup(cls, key):
+ token = super(SessionToken, cls).lookup(key)
+ if token:
+ expires_at = utils.parse_isotime(token['expiry'])
+ if datetime.datetime.utcnow() >= expires_at:
+ token.destroy()
+ return None
+ return token
+
+ @classmethod
+ def generate(cls, userid, session_type=None):
+ """make a new token for the given user"""
+ token = str(uuid.uuid4())
+ while cls.lookup(token):
+ token = str(uuid.uuid4())
+ instance = cls(token)
+ instance['user'] = userid
+ instance['session_type'] = session_type
+ instance.save()
+ return instance
+
+ def update_expiry(self, **kwargs):
+ """updates the expirty attribute, but doesn't save"""
+ if not kwargs:
+ kwargs['seconds'] = self.default_ttl
+ time = datetime.datetime.utcnow()
+ diff = datetime.timedelta(**kwargs)
+ expires = time + diff
+ self['expiry'] = expires.strftime(utils.TIME_FORMAT)
+
+ def is_expired(self):
+ now = datetime.datetime.utcnow()
+ expires = utils.parse_isotime(self['expiry'])
+ return expires <= now
+
+ def ttl(self):
+ """number of seconds remaining before expiration"""
+ now = datetime.datetime.utcnow()
+ expires = utils.parse_isotime(self['expiry'])
+ delta = expires - now
+ return (delta.seconds + (delta.days * 24 * 3600))
+
+
if __name__ == "__main__":
import doctest
doctest.testmod()
diff --git a/nova/endpoint/cloud.py b/nova/endpoint/cloud.py
index 754b0780c..0940c5d8a 100644
--- a/nova/endpoint/cloud.py
+++ b/nova/endpoint/cloud.py
@@ -49,7 +49,8 @@ flags.DEFINE_string('cloud_topic', 'cloud', 'the topic clouds listen on')
def _gen_key(user_id, key_name):
""" Tuck this into AuthManager """
try:
- private_key, fingerprint = manager.AuthManager().generate_key_pair(user_id, key_name)
+ mgr = manager.AuthManager()
+ private_key, fingerprint = mgr.generate_key_pair(user_id, key_name)
except Exception as ex:
return {'exception': ex}
return {'private_key': private_key, 'fingerprint': fingerprint}
diff --git a/nova/exception.py b/nova/exception.py
index 2108123de..52497a19e 100644
--- a/nova/exception.py
+++ b/nova/exception.py
@@ -47,6 +47,9 @@ class NotAuthorized(Error):
class NotEmpty(Error):
pass
+class Invalid(Error):
+ pass
+
def wrap_exception(f):
def _wrap(*args, **kw):
try:
diff --git a/nova/flags.py b/nova/flags.py
index ec1390fdd..f63f82c3a 100644
--- a/nova/flags.py
+++ b/nova/flags.py
@@ -76,6 +76,8 @@ DEFINE_string('vpn_key_suffix',
'-key',
'Suffix to add to project name for vpn key')
+DEFINE_integer('auth_token_ttl', 3600, 'Seconds for auth tokens to linger')
+
# UNUSED
DEFINE_string('node_availability_zone',
'nova',
diff --git a/nova/tests/model_unittest.py b/nova/tests/model_unittest.py
index 34d573854..16e9cb0cc 100644
--- a/nova/tests/model_unittest.py
+++ b/nova/tests/model_unittest.py
@@ -16,6 +16,7 @@
# License for the specific language governing permissions and limitations
# under the License.
+from datetime import datetime, timedelta
import logging
import time
from twisted.internet import defer
@@ -64,6 +65,12 @@ class ModelTestCase(test.TrialTestCase):
daemon.save()
return daemon
+ def create_session_token(self):
+ session_token = model.SessionToken('tk12341234')
+ session_token['user'] = 'testuser'
+ session_token.save()
+ return session_token
+
@defer.inlineCallbacks
def test_create_instance(self):
"""store with create_instace, then test that a load finds it"""
@@ -202,3 +209,91 @@ class ModelTestCase(test.TrialTestCase):
if x.identifier == 'testhost:nova-testdaemon':
found = True
self.assertTrue(found)
+
+ @defer.inlineCallbacks
+ def test_create_session_token(self):
+ """create"""
+ d = yield self.create_session_token()
+ d = model.SessionToken(d.token)
+ self.assertFalse(d.is_new_record())
+
+ @defer.inlineCallbacks
+ def test_delete_session_token(self):
+ """create, then destroy, then make sure loads a new record"""
+ instance = yield self.create_session_token()
+ yield instance.destroy()
+ newinst = yield model.SessionToken(instance.token)
+ self.assertTrue(newinst.is_new_record())
+
+ @defer.inlineCallbacks
+ def test_session_token_added_to_set(self):
+ """create, then check that it is included in list"""
+ instance = yield self.create_session_token()
+ found = False
+ for x in model.SessionToken.all():
+ if x.identifier == instance.token:
+ found = True
+ self.assert_(found)
+
+ @defer.inlineCallbacks
+ def test_session_token_associates_user(self):
+ """create, then check that it is listed for the user"""
+ instance = yield self.create_session_token()
+ found = False
+ for x in model.SessionToken.associated_to('user', 'testuser'):
+ if x.identifier == instance.identifier:
+ found = True
+ self.assertTrue(found)
+
+ @defer.inlineCallbacks
+ def test_session_token_generation(self):
+ instance = yield model.SessionToken.generate('username', 'TokenType')
+ self.assertFalse(instance.is_new_record())
+
+ @defer.inlineCallbacks
+ def test_find_generated_session_token(self):
+ instance = yield model.SessionToken.generate('username', 'TokenType')
+ found = yield model.SessionToken.lookup(instance.identifier)
+ self.assert_(found)
+
+ def test_update_session_token_expiry(self):
+ instance = model.SessionToken('tk12341234')
+ oldtime = datetime.utcnow()
+ instance['expiry'] = oldtime.strftime(utils.TIME_FORMAT)
+ instance.update_expiry()
+ expiry = utils.parse_isotime(instance['expiry'])
+ self.assert_(expiry > datetime.utcnow())
+
+ @defer.inlineCallbacks
+ def test_session_token_lookup_when_expired(self):
+ instance = yield model.SessionToken.generate("testuser")
+ instance['expiry'] = datetime.utcnow().strftime(utils.TIME_FORMAT)
+ instance.save()
+ inst = model.SessionToken.lookup(instance.identifier)
+ self.assertFalse(inst)
+
+ @defer.inlineCallbacks
+ def test_session_token_lookup_when_not_expired(self):
+ instance = yield model.SessionToken.generate("testuser")
+ inst = model.SessionToken.lookup(instance.identifier)
+ self.assert_(inst)
+
+ @defer.inlineCallbacks
+ def test_session_token_is_expired_when_expired(self):
+ instance = yield model.SessionToken.generate("testuser")
+ instance['expiry'] = datetime.utcnow().strftime(utils.TIME_FORMAT)
+ self.assert_(instance.is_expired())
+
+ @defer.inlineCallbacks
+ def test_session_token_is_expired_when_not_expired(self):
+ instance = yield model.SessionToken.generate("testuser")
+ self.assertFalse(instance.is_expired())
+
+ @defer.inlineCallbacks
+ def test_session_token_ttl(self):
+ instance = yield model.SessionToken.generate("testuser")
+ now = datetime.utcnow()
+ delta = timedelta(hours=1)
+ instance['expiry'] = (now + delta).strftime(utils.TIME_FORMAT)
+ # give 5 seconds of fuzziness
+ self.assert_(abs(instance.ttl() - FLAGS.auth_token_ttl) < 5)
diff --git a/nova/utils.py b/nova/utils.py
index 9ecceafe0..a1eb0a092 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -20,7 +20,7 @@
System-level utilities and helper functions.
"""
-from datetime import datetime
+from datetime import datetime, timedelta
import inspect
import logging
import os
@@ -32,7 +32,7 @@ import sys
from nova import flags
FLAGS = flags.FLAGS
-
+TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
def fetchfile(url, target):
logging.debug("Fetching %s" % url)
@@ -118,4 +118,7 @@ def get_my_ip():
def isotime(at=None):
if not at:
at = datetime.utcnow()
- return at.strftime("%Y-%m-%dT%H:%M:%SZ")
+ return at.strftime(TIME_FORMAT)
+
+def parse_isotime(timestr):
+ return datetime.strptime(timestr, TIME_FORMAT)
diff --git a/run_tests.sh b/run_tests.sh
new file mode 100755
index 000000000..1bf3d1a79
--- /dev/null
+++ b/run_tests.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+venv=.nova-venv
+with_venv=tools/with_venv.sh
+
+if [ -e ${venv} ]; then
+ ${with_venv} python run_tests.py
+else
+ echo "You need to install the Nova virtualenv before you can run this."
+ echo ""
+ echo "Please run tools/install_venv.py"
+ exit 1
+fi
diff --git a/setup.cfg b/setup.cfg
index 839472544..14dcb5c8e 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,4 +1,10 @@
[build_sphinx]
+all_files = 1
+build-dir = doc/build
source-dir = doc/source
-build-dir = doc/build
-all_files = 1
+
+[egg_info]
+tag_build =
+tag_date = 0
+tag_svn_revision = 0
+
diff --git a/setup.py b/setup.py
index f9a616335..127d014b1 100644
--- a/setup.py
+++ b/setup.py
@@ -16,19 +16,24 @@
# License for the specific language governing permissions and limitations
# under the License.
-import glob
-import os
-import sys
-
from setuptools import setup, find_packages
-srcdir = os.path.join(os.path.dirname(sys.argv[0]), 'src')
-
setup(name='nova',
version='0.9.0',
description='cloud computing fabric controller',
author='OpenStack',
author_email='nova@lists.launchpad.net',
url='http://www.openstack.org/',
- packages = find_packages(),
+ packages = find_packages(exclude=['bin','smoketests']),
+ scripts=['bin/nova-api',
+ 'bin/nova-compute',
+ 'bin/nova-dhcpbridge',
+ 'bin/nova-import-canonical-imagestore',
+ 'bin/nova-instancemonitor',
+ 'bin/nova-manage',
+ 'bin/nova-network',
+ 'bin/nova-objectstore',
+ 'bin/nova-rsapi',
+ 'bin/nova-volume',
+ ]
)