From d6e74751fa156f3879ff2136caccf2a40d4b9e8c Mon Sep 17 00:00:00 2001 From: Todd Willey Date: Mon, 26 Jul 2010 15:01:42 -0400 Subject: Basic standup of SessionToken model for shortlived auth tokens. --- nova/compute/model.py | 36 ++++++++++++++++++++++++++++++ nova/exception.py | 3 +++ nova/tests/model_unittest.py | 52 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+) diff --git a/nova/compute/model.py b/nova/compute/model.py index cda188183..331b68349 100644 --- a/nova/compute/model.py +++ b/nova/compute/model.py @@ -43,6 +43,7 @@ True import logging import time import redis +import uuid from nova import datastore from nova import exception @@ -228,6 +229,41 @@ 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 + super(SessionToken, self).__init__() + + @property + def identifier(self): + return self.token + + def default_state(self): + return {'user': None, 'session_type': None, 'token': self.token} + + @classmethod + def generate(cls, userid, session_type=None): + 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 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 + + if __name__ == "__main__": import doctest doctest.testmod() 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/tests/model_unittest.py b/nova/tests/model_unittest.py index 1bd7e527f..7823991b9 100644 --- a/nova/tests/model_unittest.py +++ b/nova/tests/model_unittest.py @@ -66,6 +66,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""" @@ -204,3 +210,49 @@ 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) -- cgit From fd2d4e3f3dba426eedc22b326d2bb0cb6a19eb76 Mon Sep 17 00:00:00 2001 From: Todd Willey Date: Mon, 26 Jul 2010 17:00:50 -0400 Subject: Expiry awareness for SessionToken. --- nova/compute/model.py | 33 ++++++++++++++++++++++++--------- nova/tests/model_unittest.py | 9 +++++++++ nova/utils.py | 9 ++++++--- 3 files changed, 39 insertions(+), 12 deletions(-) diff --git a/nova/compute/model.py b/nova/compute/model.py index 331b68349..3aa6fc841 100644 --- a/nova/compute/model.py +++ b/nova/compute/model.py @@ -40,6 +40,7 @@ True True """ +import datetime import logging import time import redis @@ -241,10 +242,24 @@ class SessionToken(datastore.BasicModel): return self.token def default_state(self): - return {'user': None, 'session_type': None, 'token': self.token} + now = datetime.datetime.utcnow() + diff = datetime.timedelta(hours=1) + 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 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()) @@ -254,14 +269,14 @@ class SessionToken(datastore.BasicModel): instance.save() return instance - 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 + def update_expiry(self, **kwargs): + """updates the expirty attribute, but doesn't save""" + if not kwargs: + kwargs['hours'] = 1 + time = datetime.datetime.utcnow() + diff = datetime.timedelta(**kwargs) + expires = time + diff + self['expiry'] = expires.strftime(utils.TIME_FORMAT) if __name__ == "__main__": diff --git a/nova/tests/model_unittest.py b/nova/tests/model_unittest.py index 7823991b9..0755d8578 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 import logging import time from twisted.internet import defer @@ -256,3 +257,11 @@ class ModelTestCase(test.TrialTestCase): instance = yield model.SessionToken.generate('username', 'TokenType') found = yield model.SessionToken.lookup(instance.identifier) self.assert_(found) + + def test_update_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()) 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) -- cgit From 58b41fde4c8639577b738d0f57f10acda4c63c0e Mon Sep 17 00:00:00 2001 From: Todd Willey Date: Mon, 26 Jul 2010 18:00:39 -0400 Subject: Lookup should only not return expired tokens. --- nova/compute/model.py | 9 +++++++++ nova/tests/model_unittest.py | 16 +++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/nova/compute/model.py b/nova/compute/model.py index 3aa6fc841..ab0bfeb83 100644 --- a/nova/compute/model.py +++ b/nova/compute/model.py @@ -257,6 +257,15 @@ class SessionToken(datastore.BasicModel): 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: + return None + return token + @classmethod def generate(cls, userid, session_type=None): """make a new token for the given user""" diff --git a/nova/tests/model_unittest.py b/nova/tests/model_unittest.py index 0755d8578..10d3016f8 100644 --- a/nova/tests/model_unittest.py +++ b/nova/tests/model_unittest.py @@ -258,10 +258,24 @@ class ModelTestCase(test.TrialTestCase): found = yield model.SessionToken.lookup(instance.identifier) self.assert_(found) - def test_update_expiry(self): + 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) -- cgit From 7588ae06e8d6a7d526b12e0f15f3e5be522f16d0 Mon Sep 17 00:00:00 2001 From: Todd Willey Date: Mon, 26 Jul 2010 18:02:00 -0400 Subject: In fact, it should delete them. --- nova/compute/model.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nova/compute/model.py b/nova/compute/model.py index ab0bfeb83..7335d2c79 100644 --- a/nova/compute/model.py +++ b/nova/compute/model.py @@ -263,6 +263,7 @@ class SessionToken(datastore.BasicModel): if token: expires_at = utils.parse_isotime(token['expiry']) if datetime.datetime.utcnow() >= expires_at: + token.destroy() return None return token -- cgit From 74ce3aef4dafca8b0fc6bf0404725afdefe335ec Mon Sep 17 00:00:00 2001 From: Todd Willey Date: Mon, 26 Jul 2010 23:49:49 -0400 Subject: Give SessionToken an is_expired method --- nova/compute/model.py | 5 +++++ nova/tests/model_unittest.py | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/nova/compute/model.py b/nova/compute/model.py index 7335d2c79..bae93b6c1 100644 --- a/nova/compute/model.py +++ b/nova/compute/model.py @@ -288,6 +288,11 @@ class SessionToken(datastore.BasicModel): 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 + if __name__ == "__main__": import doctest diff --git a/nova/tests/model_unittest.py b/nova/tests/model_unittest.py index 10d3016f8..88ba5e6e9 100644 --- a/nova/tests/model_unittest.py +++ b/nova/tests/model_unittest.py @@ -279,3 +279,14 @@ class ModelTestCase(test.TrialTestCase): 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()) -- cgit From ad7f099aefc17d04a2a04deb7fd3055adc8cd84a Mon Sep 17 00:00:00 2001 From: Todd Willey Date: Tue, 27 Jul 2010 01:03:05 -0400 Subject: Flag for SessionToken ttl setting. --- nova/compute/model.py | 12 ++++++++++-- nova/flags.py | 2 ++ nova/tests/model_unittest.py | 11 ++++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/nova/compute/model.py b/nova/compute/model.py index bae93b6c1..212830d3c 100644 --- a/nova/compute/model.py +++ b/nova/compute/model.py @@ -235,6 +235,7 @@ class SessionToken(datastore.BasicModel): def __init__(self, session_token): self.token = session_token + self.default_ttl = FLAGS.auth_token_ttl super(SessionToken, self).__init__() @property @@ -243,7 +244,7 @@ class SessionToken(datastore.BasicModel): def default_state(self): now = datetime.datetime.utcnow() - diff = datetime.timedelta(hours=1) + 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)} @@ -282,7 +283,7 @@ class SessionToken(datastore.BasicModel): def update_expiry(self, **kwargs): """updates the expirty attribute, but doesn't save""" if not kwargs: - kwargs['hours'] = 1 + kwargs['seconds'] = self.default_ttl time = datetime.datetime.utcnow() diff = datetime.timedelta(**kwargs) expires = time + diff @@ -293,6 +294,13 @@ class SessionToken(datastore.BasicModel): 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 diff --git a/nova/flags.py b/nova/flags.py index 06ea1e007..3c1a0acaf 100644 --- a/nova/flags.py +++ b/nova/flags.py @@ -75,6 +75,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 88ba5e6e9..24c08a908 100644 --- a/nova/tests/model_unittest.py +++ b/nova/tests/model_unittest.py @@ -16,7 +16,7 @@ # License for the specific language governing permissions and limitations # under the License. -from datetime import datetime +from datetime import datetime, timedelta import logging import time from twisted.internet import defer @@ -290,3 +290,12 @@ class ModelTestCase(test.TrialTestCase): 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) -- cgit From 253b0005670d80ec4d953330a7dbd74b8a33b148 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Tue, 27 Jul 2010 23:06:03 +0200 Subject: Remove debian/ from main branch. --- debian/changelog | 232 ------------------------------------ debian/compat | 1 - debian/control | 136 --------------------- debian/nova-api.conf | 5 - debian/nova-api.init | 69 ----------- debian/nova-api.install | 3 - debian/nova-common.dirs | 11 -- debian/nova-common.install | 9 -- debian/nova-compute.conf | 7 -- debian/nova-compute.init | 69 ----------- debian/nova-compute.install | 2 - debian/nova-dhcpbridge.conf | 1 - debian/nova-instancemonitor.init | 69 ----------- debian/nova-instancemonitor.install | 1 - debian/nova-manage.conf | 4 - debian/nova-objectstore.conf | 5 - debian/nova-objectstore.init | 69 ----------- debian/nova-objectstore.install | 2 - debian/nova-volume.conf | 4 - debian/nova-volume.init | 69 ----------- debian/nova-volume.install | 2 - debian/pycompat | 1 - debian/pyversions | 1 - debian/rules | 4 - 24 files changed, 776 deletions(-) delete mode 100644 debian/changelog delete mode 100644 debian/compat delete mode 100644 debian/control delete mode 100644 debian/nova-api.conf delete mode 100644 debian/nova-api.init delete mode 100644 debian/nova-api.install delete mode 100644 debian/nova-common.dirs delete mode 100644 debian/nova-common.install delete mode 100644 debian/nova-compute.conf delete mode 100644 debian/nova-compute.init delete mode 100644 debian/nova-compute.install delete mode 100644 debian/nova-dhcpbridge.conf delete mode 100644 debian/nova-instancemonitor.init delete mode 100644 debian/nova-instancemonitor.install delete mode 100644 debian/nova-manage.conf delete mode 100644 debian/nova-objectstore.conf delete mode 100644 debian/nova-objectstore.init delete mode 100644 debian/nova-objectstore.install delete mode 100644 debian/nova-volume.conf delete mode 100644 debian/nova-volume.init delete mode 100644 debian/nova-volume.install delete mode 100644 debian/pycompat delete mode 100644 debian/pyversions delete mode 100755 debian/rules 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 Mon, 14 Jul 2010 12:00:00 -0700 - -nova (0.2.2-10) UNRELEASED; urgency=low - - * Fixed extra space in vblade-persist - - -- Vishvananda Ishaya 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 Mon, 12 Jul 2010 15:20:00 -0700 - -nova (0.2.2-8) UNRELEASED; urgency=low - - * Added a missing comma - - -- Vishvananda Ishaya 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 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 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 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 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 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 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 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 Mon, 25 May 2010 12:14:00 -0700 - -nova (0.2.0-20) UNRELEASED; urgency=low - - * template files are in proper folder - - -- Vishvananda Ishaya 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 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 Mon, 24 May 2010 17:18:00 -0700 - -nova (0.2.0-17) UNRELEASED; urgency=low - - * redis-backed datastore - - -- Vishvananda Ishaya 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 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 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 Sun, 23 May 2010 21:49:43 -0700 - -nova (0.2.0-13) UNRELEASED; urgency=low - - * init script for nova-objectstore - - -- Manish Singh Sun, 23 May 2010 21:33:25 -0700 - -nova (0.2.0-12) UNRELEASED; urgency=low - - * kvm, kpartx required for nova-compute - - -- Jesse Andrews 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 Sun, 23 May 2010 20:04:27 -0700 - -nova (0.2.0-10) UNRELEASED; urgency=low - - * add more requirements to bin packages - - -- Jesse Andrews 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 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 Sun, 23 May 2010 18:33:00 -0700 - -nova (0.2.0-7) UNRELEASED; urgency=low - - * Split bins into separate packages - - -- Manish Singh Sun, 23 May 2010 18:46:34 -0700 - -nova (0.2.0-6) UNRELEASED; urgency=low - - * Add python-m2crypto to deps - - -- Jesse Andrews Sun, 23 May 2010 18:33:00 -0700 - -nova (0.2.0-5) UNRELEASED; urgency=low - - * Add python-gflags to deps - - -- Manish Singh Sun, 23 May 2010 18:28:50 -0700 - -nova (0.2.0-4) UNRELEASED; urgency=low - - * install scripts - - -- Manish Singh Sun, 23 May 2010 18:16:27 -0700 - -nova (0.2.0-3) UNRELEASED; urgency=low - - * debian build goop - - -- Manish Singh Sun, 23 May 2010 18:06:37 -0700 - -nova (0.2.0-2) UNRELEASED; urgency=low - - * improved requirements - - -- Jesse Andrews Sun, 23 May 2010 17:42:00 -0700 - -nova (0.2.0-1) UNRELEASED; urgency=low - - * initial release - - -- Jesse Andrews 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 -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 $@ -- cgit From 0cdc13f0f0bcdcd085d58a78b7aa7dbb856cdc79 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Tue, 27 Jul 2010 23:56:24 +0200 Subject: Add a 'sdist' make target. It first generates a MANIFEST.in based on what's in bzr, then calls python setup.py sdist. --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index cd7e233e1..847da779f 100644 --- a/Makefile +++ b/Makefile @@ -24,8 +24,17 @@ clean: clean-all: clean rm -rf $(venv) +MANIFEST.in: + [ -d .bzr ] || (echo "Must be a bzr checkout" ; exit 1) + bzr ls --kind=file -VR | while read f; do echo include "$$f"; done > $@ + +sdist: MANIFEST.in + python setup.py sdist + $(venv): @echo "You need to install the Nova virtualenv before you can run this." @echo "" @echo "Please run tools/install_venv.py" @exit 1 + +.PHONY: MANIFEST.in -- cgit From c13b2fedb3cb6260fe132677a012a913c7249458 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Tue, 27 Jul 2010 19:51:07 -0700 Subject: fixed typo from auth refactor --- nova/endpoint/cloud.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nova/endpoint/cloud.py b/nova/endpoint/cloud.py index 76ca35320..0940c5d8a 100644 --- a/nova/endpoint/cloud.py +++ b/nova/endpoint/cloud.py @@ -49,8 +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: - manager = manager.AuthManager() - private_key, fingerprint = manager.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} -- cgit From 849a4062cdf8af50b8c3d44611f10857fedf6813 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 27 Jul 2010 21:35:55 -0700 Subject: Changed Makefile to shell script. The Makefile approach completely broke debhelper's ability to figure out that this was a python package. --- Makefile | 40 ---------------------------------------- run_tests.sh | 13 +++++++++++++ 2 files changed, 13 insertions(+), 40 deletions(-) delete mode 100644 Makefile create mode 100644 run_tests.sh diff --git a/Makefile b/Makefile deleted file mode 100644 index 847da779f..000000000 --- a/Makefile +++ /dev/null @@ -1,40 +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) - -MANIFEST.in: - [ -d .bzr ] || (echo "Must be a bzr checkout" ; exit 1) - bzr ls --kind=file -VR | while read f; do echo include "$$f"; done > $@ - -sdist: MANIFEST.in - python setup.py sdist - -$(venv): - @echo "You need to install the Nova virtualenv before you can run this." - @echo "" - @echo "Please run tools/install_venv.py" - @exit 1 - -.PHONY: MANIFEST.in diff --git a/run_tests.sh b/run_tests.sh new file mode 100644 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 -- cgit From 26113f6b1379aa81941169b858aee37493bad63a Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 27 Jul 2010 21:39:23 -0700 Subject: Put in a single MANIFEST.in file that takes care of things. --- MANIFEST.in | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 000000000..6482bd7ea --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,5 @@ +include HACKING LICENSE run_tests.sh run_test.py README builddeb.sh exercise_rsapi.py +graft CA +graft doc +graft smoketests +graft tools -- cgit From 464311c787d3d3176a89ec44791a03034ccb2851 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 27 Jul 2010 21:39:58 -0700 Subject: Made run_tests.sh executable. --- run_tests.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 run_tests.sh diff --git a/run_tests.sh b/run_tests.sh old mode 100644 new mode 100755 -- cgit From 9587bd8ce817d71a8581ac16d0820714fbb10d02 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 27 Jul 2010 21:40:06 -0700 Subject: Removed gitignore files. --- .gitignore | 12 ------------ CA/.gitignore | 11 ----------- CA/INTER/.gitignore | 1 - CA/reqs/.gitignore | 1 - 4 files changed, 25 deletions(-) delete mode 100644 .gitignore delete mode 100644 CA/.gitignore delete mode 100644 CA/INTER/.gitignore delete mode 100644 CA/reqs/.gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 2afc7a32c..000000000 --- a/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -*.pyc -*.DS_Store -local_settings.py -CA/index.txt -CA/serial -keeper -instances -keys -build/* -build-stamp -nova.egg-info -.nova-venv diff --git a/CA/.gitignore b/CA/.gitignore deleted file mode 100644 index fae0922bf..000000000 --- a/CA/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -index.txt -index.txt.old -index.txt.attr -index.txt.attr.old -cacert.pem -serial -serial.old -openssl.cnf -private/* -newcerts/* - diff --git a/CA/INTER/.gitignore b/CA/INTER/.gitignore deleted file mode 100644 index 72e8ffc0d..000000000 --- a/CA/INTER/.gitignore +++ /dev/null @@ -1 +0,0 @@ -* diff --git a/CA/reqs/.gitignore b/CA/reqs/.gitignore deleted file mode 100644 index 72e8ffc0d..000000000 --- a/CA/reqs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -* -- cgit From ea89153b930eed70c7586eae56636b648e4e7252 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 27 Jul 2010 21:41:07 -0700 Subject: Updated setup.py file to install stuff on a python setup.py install command. --- setup.cfg | 10 ++++++++-- setup.py | 19 ++++++++++++------- 2 files changed, 20 insertions(+), 9 deletions(-) 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', + ] ) -- cgit From 67711b8aa4ed0ec80d407fecea5b4bf5ffc22322 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 27 Jul 2010 21:52:01 -0700 Subject: Added a few more missing files to MANIFEST.in and added some placeholder files so that setup.py would carry the empty dir. --- CA/INTER/.placeholder | 0 CA/reqs/.placeholder | 0 MANIFEST.in | 19 ++++++++++++++++++- doc/build/.placeholder | 0 doc/source/_static/.placeholder | 0 doc/source/_templates/.placeholder | 0 6 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 CA/INTER/.placeholder create mode 100644 CA/reqs/.placeholder create mode 100644 doc/build/.placeholder create mode 100644 doc/source/_static/.placeholder create mode 100644 doc/source/_templates/.placeholder diff --git a/CA/INTER/.placeholder b/CA/INTER/.placeholder new file mode 100644 index 000000000..e69de29bb diff --git a/CA/reqs/.placeholder b/CA/reqs/.placeholder new file mode 100644 index 000000000..e69de29bb diff --git a/MANIFEST.in b/MANIFEST.in index 6482bd7ea..36482be88 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,22 @@ -include HACKING LICENSE run_tests.sh run_test.py README builddeb.sh exercise_rsapi.py +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 +include diff --git a/doc/build/.placeholder b/doc/build/.placeholder new file mode 100644 index 000000000..e69de29bb diff --git a/doc/source/_static/.placeholder b/doc/source/_static/.placeholder new file mode 100644 index 000000000..e69de29bb diff --git a/doc/source/_templates/.placeholder b/doc/source/_templates/.placeholder new file mode 100644 index 000000000..e69de29bb -- cgit From 25de868554bbf1a9c6e5f9ed295bef6c37194352 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 27 Jul 2010 23:18:27 -0700 Subject: Added the gitignore files back in for the folks who are still on the git. --- .gitignore | 12 ++++++++++++ CA/.gitignore | 11 +++++++++++ CA/INTER/.gitignore | 1 + CA/reqs/.gitignore | 1 + 4 files changed, 25 insertions(+) create mode 100644 .gitignore create mode 100644 CA/.gitignore create mode 100644 CA/INTER/.gitignore create mode 100644 CA/reqs/.gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..2afc7a32c --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +*.pyc +*.DS_Store +local_settings.py +CA/index.txt +CA/serial +keeper +instances +keys +build/* +build-stamp +nova.egg-info +.nova-venv diff --git a/CA/.gitignore b/CA/.gitignore new file mode 100644 index 000000000..fae0922bf --- /dev/null +++ b/CA/.gitignore @@ -0,0 +1,11 @@ +index.txt +index.txt.old +index.txt.attr +index.txt.attr.old +cacert.pem +serial +serial.old +openssl.cnf +private/* +newcerts/* + diff --git a/CA/INTER/.gitignore b/CA/INTER/.gitignore new file mode 100644 index 000000000..72e8ffc0d --- /dev/null +++ b/CA/INTER/.gitignore @@ -0,0 +1 @@ +* diff --git a/CA/reqs/.gitignore b/CA/reqs/.gitignore new file mode 100644 index 000000000..72e8ffc0d --- /dev/null +++ b/CA/reqs/.gitignore @@ -0,0 +1 @@ +* -- cgit From 90ffbc240ffc68154816d2237dc04ea33f5066cb Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 27 Jul 2010 23:23:23 -0700 Subject: Removed extra include. --- MANIFEST.in | 1 - 1 file changed, 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 36482be88..e917077c5 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -19,4 +19,3 @@ 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 -include -- cgit From 0465cd87fd767fbf421e77bdabb023c980242adb Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Wed, 28 Jul 2010 00:18:20 -0700 Subject: import ldapdriver for flags --- nova/auth/manager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nova/auth/manager.py b/nova/auth/manager.py index b3b5d14ca..66027f6c2 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 -- cgit