Permalink
Please sign in to comment.
Browse files
Remove AoE, Clean up volume code
* Removes Ata Over Ethernet * Adds drivers to libvirt for volumes * Adds initialize_connection and terminate_connection to volume api * Passes connection info back through volume api Change-Id: I1b1626f40bebe8466ab410fb174683293c7c474f
- Loading branch information...
Showing
with
1,018 additions
and 914 deletions.
- +1 −0 Authors
- +2 −3 bin/nova-manage
- 0 bin/nova-spoolsentry
- +0 −1 doc/source/runnova/getting.started.rst
- +0 −3 nova/compute/api.py
- +146 −82 nova/compute/manager.py
- +0 −29 nova/compute/utils.py
- +1 −35 nova/db/api.py
- +5 −55 nova/db/sqlalchemy/api.py
- +51 −0 nova/db/sqlalchemy/migrate_repo/versions/052_kill_export_devices.py
- +35 −0 nova/db/sqlalchemy/migrate_repo/versions/053_add_connection_info_to_block_device_mapping.py
- +1 −15 nova/db/sqlalchemy/models.py
- +4 −4 nova/exception.py
- +4 −5 nova/rpc/common.py
- +11 −10 nova/tests/api/ec2/test_cloud.py
- +0 −4 nova/tests/fake_flags.py
- +6 −5 nova/tests/integrated/test_volumes.py
- +3 −2 nova/tests/scheduler/test_scheduler.py
- +85 −216 nova/tests/test_compute.py
- +126 −10 nova/tests/test_libvirt.py
- +5 −3 nova/tests/test_virt_drivers.py
- +2 −80 nova/tests/test_volume.py
- +20 −4 nova/tests/test_xenapi.py
- +10 −6 nova/virt/driver.py
- +19 −4 nova/virt/fake.py
- +4 −3 nova/virt/hyperv.py
- +7 −15 nova/virt/libvirt.xml.template
- +89 −49 nova/virt/libvirt/connection.py
- +149 −0 nova/virt/libvirt/volume.py
- +4 −3 nova/virt/vmwareapi_conn.py
- +8 −7 nova/virt/xenapi/volume_utils.py
- +7 −4 nova/virt/xenapi/volumeops.py
- +10 −7 nova/virt/xenapi_conn.py
- +40 −4 nova/volume/api.py
- +118 −215 nova/volume/driver.py
- +45 −28 nova/volume/manager.py
- +0 −3 nova/volume/san.py
0
bin/nova-spoolsentry
100644 → 100755
No changes.
| @@ -1,29 +0,0 @@ | ||
| -# vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
| - | ||
| -# Copyright (c) 2011 VA Linux Systems Japan K.K | ||
| -# Copyright (c) 2011 Isaku Yamahata | ||
| -# | ||
| -# Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
| -# not use this file except in compliance with the License. You may obtain | ||
| -# a copy of the License at | ||
| -# | ||
| -# http://www.apache.org/licenses/LICENSE-2.0 | ||
| -# | ||
| -# Unless required by applicable law or agreed to in writing, software | ||
| -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| -# License for the specific language governing permissions and limitations | ||
| -# under the License. | ||
| - | ||
| -from nova import volume | ||
| - | ||
| - | ||
| -def terminate_volumes(db, context, instance_id): | ||
| - """delete volumes of delete_on_termination=True in block device mapping""" | ||
| - volume_api = volume.API() | ||
| - for bdm in db.block_device_mapping_get_all_by_instance(context, | ||
| - instance_id): | ||
| - #LOG.debug(_("terminating bdm %s") % bdm) | ||
| - if bdm['volume_id'] and bdm['delete_on_termination']: | ||
| - volume_api.delete(context, bdm['volume_id']) | ||
| - db.block_device_mapping_destroy(context, bdm['id']) |
| @@ -0,0 +1,51 @@ | ||
| +# vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
| + | ||
| +# Copyright 2011 University of Southern California | ||
| +# | ||
| +# Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
| +# not use this file except in compliance with the License. You may obtain | ||
| +# a copy of the License at | ||
| +# | ||
| +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| +# | ||
| +# Unless required by applicable law or agreed to in writing, software | ||
| +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| +# License for the specific language governing permissions and limitations | ||
| +# under the License. | ||
| + | ||
| +from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer | ||
| +from sqlalchemy import MetaData, String, Table | ||
| +from nova import log as logging | ||
| + | ||
| +meta = MetaData() | ||
| + | ||
| +# Table definition | ||
| +export_devices = Table('export_devices', meta, | ||
| + Column('created_at', DateTime(timezone=False)), | ||
| + Column('updated_at', DateTime(timezone=False)), | ||
| + Column('deleted_at', DateTime(timezone=False)), | ||
| + Column('deleted', Boolean(create_constraint=True, name=None)), | ||
| + Column('id', Integer(), primary_key=True, nullable=False), | ||
| + Column('shelf_id', Integer()), | ||
| + Column('blade_id', Integer()), | ||
| + Column('volume_id', | ||
| + Integer(), | ||
| + ForeignKey('volumes.id'), | ||
| + nullable=True), | ||
| + ) | ||
| + | ||
| + | ||
| +def downgrade(migrate_engine): | ||
| + meta.bind = migrate_engine | ||
| + try: | ||
| + export_devices.create() | ||
| + except Exception: | ||
| + logging.info(repr(export_devices)) | ||
| + logging.exception('Exception while creating table') | ||
| + raise | ||
| + | ||
| + | ||
| +def upgrade(migrate_engine): | ||
| + meta.bind = migrate_engine | ||
| + export_devices.drop() |
| @@ -0,0 +1,35 @@ | ||
| +# vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
| + | ||
| +# Copyright 2011 OpenStack LLC. | ||
| +# All Rights Reserved. | ||
| +# | ||
| +# Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
| +# not use this file except in compliance with the License. You may obtain | ||
| +# a copy of the License at | ||
| +# | ||
| +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| +# | ||
| +# Unless required by applicable law or agreed to in writing, software | ||
| +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| +# License for the specific language governing permissions and limitations | ||
| +# under the License.from sqlalchemy import * | ||
| + | ||
| +from sqlalchemy import Column, MetaData, Table, Text | ||
| + | ||
| + | ||
| +meta = MetaData() | ||
| + | ||
| +new_column = Column('connection_info', Text()) | ||
| + | ||
| + | ||
| +def upgrade(migrate_engine): | ||
| + meta.bind = migrate_engine | ||
| + table = Table('block_device_mapping', meta, autoload=True) | ||
| + table.create_column(new_column) | ||
| + | ||
| + | ||
| +def downgrade(migrate_engine): | ||
| + meta.bind = migrate_engine | ||
| + table = Table('block_device_mapping', meta, autoload=True) | ||
| + table.c.connection_info.drop() |
Oops, something went wrong.
0 comments on commit
eb03d47