diff options
author | Vishvananda Ishaya <vishvananda@gmail.com> | 2012-10-23 19:30:48 -0700 |
---|---|---|
committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2012-10-28 11:34:05 -0700 |
commit | 7e2b93acc59dea81d52684f7f659fcff32507e14 (patch) | |
tree | 11bf7e96a3835d0002f133742dd9e1702c7cc6c6 /nova/scheduler/driver.py | |
parent | 4e449c0843150b785bc61e87599d05ff242a8f4a (diff) | |
download | nova-7e2b93acc59dea81d52684f7f659fcff32507e14.tar.gz nova-7e2b93acc59dea81d52684f7f659fcff32507e14.tar.xz nova-7e2b93acc59dea81d52684f7f659fcff32507e14.zip |
removes the nova-volume code from nova
This removes the majority of the nova-volume code from the codebase.
It updates relevent config options to default to cinder. It updates a
number of existing tests that were depending on code that was removed.
A few things still need to be removed:
* volume/driver.py & volume/iscsi.py
These files are used by the libvirt volume driver tests. These
tests should be updated to mock the relevant calls.
* scheduler/simple.py & scheduler/multi.py
These files should no longer be necessary so they can be removed
in a subsequent patch
* exception.py cleanup
Once the above files are removed there are a number of unused
exceptions which can be removed
* database calls and database tables
The database calls have not been removed and the tables have not
been dropped. This can be done in a separate migration
* additional config options and nova.conf.sample
There may be a few extra config options that can be removed and the
conf sample can be regenerated
Implements bp delete-nova-volume
Change-Id: I0b540e54dbabd26901a7530035a38583bb521fda
Diffstat (limited to 'nova/scheduler/driver.py')
-rw-r--r-- | nova/scheduler/driver.py | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/nova/scheduler/driver.py b/nova/scheduler/driver.py index 90e1a004b..cba1ed935 100644 --- a/nova/scheduler/driver.py +++ b/nova/scheduler/driver.py @@ -87,20 +87,6 @@ def handle_schedule_error(context, ex, instance_uuid, request_spec): 'scheduler.run_instance', notifier.ERROR, payload) -def cast_to_volume_host(context, host, method, **kwargs): - """Cast request to a volume host queue""" - - volume_id = kwargs.get('volume_id', None) - if volume_id is not None: - now = timeutils.utcnow() - db.volume_update(context, volume_id, - {'host': host, 'scheduled_at': now}) - rpc.cast(context, - rpc.queue_get_for(context, FLAGS.volume_topic, host), - {"method": method, "args": kwargs}) - LOG.debug(_("Casted '%(method)s' to volume '%(host)s'") % locals()) - - def instance_update_db(context, instance_uuid): '''Clear the host and set the scheduled_at field of an Instance. @@ -127,13 +113,11 @@ def cast_to_compute_host(context, host, method, **kwargs): def cast_to_host(context, topic, host, method, **kwargs): """Generic cast to host""" - topic_mapping = { - FLAGS.compute_topic: cast_to_compute_host, - FLAGS.volume_topic: cast_to_volume_host} + topic_mapping = {FLAGS.compute_topic: cast_to_compute_host} func = topic_mapping.get(topic) if func: - func(context, host, method, **kwargs) + cast_to_compute_host(context, host, method, **kwargs) else: rpc.cast(context, rpc.queue_get_for(context, topic, host), |