summaryrefslogtreecommitdiffstats
path: root/nova
Commit message (Collapse)AuthorAgeFilesLines
* fix N402 for nova/testsSean Dague2013-01-0973-553/+541
| | | | | | | | | convert docstrings on test_ functions to comments to prevent the function name from being masked by test infrastructure convert the rest of the docstrings to end in punctuation as per N401 Change-Id: Ib400537c6f7feb30739207a627b5aac3a7eb165a
* Fix N402 for nova/virtSean Dague2013-01-0837-194/+194
| | | | | | | | Fix N402 errors (single line docstring should end in a period) for nova/virt, part of a larger attempt to stop ignoring our own hacking.py tests. Change-Id: I523ce41bd2b38c73cf3fdb031101ccc0695f2488
* Fix N402 for nova/apiSean Dague2013-01-0861-134/+134
| | | | | | | | | | Fix N402 errors (single line docstring should end in a period) for nova/api, part of a larger attempt to stop ignoring our own hacking.py tests. Fix tests that look at docs in extensions Change-Id: I89d89d1fcf37c4e7740c36375da4c751d1b621ed
* Merge "attach/detach_volume() take instance as a parameter"Jenkins2013-01-0913-57/+46
|\
| * attach/detach_volume() take instance as a parameterArata Notsu2013-01-0813-57/+46
| | | | | | | | | | | | | | | | | | | | | | Previously the methods take instance['name'] as a parameter. With this change, ComputeDriver can lookup informations about the instance from hypervisor (in bare-metal driver, it is a local DB) by any other attributes of the instance. blueprint general-bare-metal-provisioning-framework Change-Id: Ibd0567f34ed5053909ce1a408f9cbf87516ba597
* | Merge "Remove availability_zones from service table"Jenkins2013-01-0922-88/+283
|\ \
| * | Remove availability_zones from service tableJoe Gordon2013-01-0822-88/+283
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the final step in enabling availability_zones using aggregate metadata. Previously all services had an availability_zone, but the availability_zone is only used for nova-compute. Services such as nova-scheduler, nova-network, nova-conductor have always spanned all availability_zones. After this change only compute nodes (nova-compute), will have an availability_zone. In order to preserve current APIs, when running: * nova host-list (os-hosts) * euca-describe-availability-zones verbose * nova-manage service list Internal services will appear in there own internal availability_zone (CONF.internal_service_availability_zone) Internal zone is hidden in euca-describe-availability_zones (non-verbose) CONF.node_availability_zone has been renamed to CONF.default_availability_zone and is only used by the nova-api and nova-scheduler. CONF.node_availability_zone still works but is deprecated DocImpact Completes blueprint aggregate-based-availability-zones Change-Id: Ib772df5f9ac2865f20df479f8ddce575a9ce3aff
* | | Merge "Import latest timeutils from oslo-incubator"Jenkins2013-01-091-5/+28
|\ \ \
| * | | Import latest timeutils from oslo-incubatorFlaper Fesp2013-01-081-5/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug #1097464 Changes synced are: a08daf1 Use basestring instead of str for type check. 615d769 Account for tasks duration in LoopingCall delay ce80aac Convenience wrapper for datetime.timedelta.total_seconds() Change-Id: If4ab7ccd2f4e815e01c41f25fdd541ffcd7693d5
* | | | Merge "Enable Aggregate based availability zones"Jenkins2013-01-0927-162/+304
|\ \ \ \ | | |/ / | |/| |
| * | | Enable Aggregate based availability zonesJoe Gordon2013-01-0827-162/+304
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of implementing availability zones in the service table, availability zones are implemented using general aggregate metadata. This patch does not remove availability zones from the service table, a latter patch will do that. * In theory supports a single compute node in multiple availability zones * Drop availability_zone column from Aggregate table (is now a property) * map aggregate metadata 'availability_zone' so API does not change Implements blueprint aggregate-based-availability-zones Change-Id: I2a2ac5bfaa526d639dff5efa392c051347dbd9bb
* | | | Merge "Added sample tests to FlavorRxtx API."Jenkins2013-01-099-1/+235
|\ \ \ \
| * | | | Added sample tests to FlavorRxtx API.Giampaolo Lauria2013-01-089-1/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Partially implements blueprint nova-api-samples Fixes bug 1091743 Change-Id: I400e627cfc499b3e7bb1c88d6ce7d24b4d222b84
* | | | | Merge "Move global glance opts into nova.image.glance"Jenkins2013-01-0911-69/+69
|\ \ \ \ \
| * | | | | Move global glance opts into nova.image.glanceMark McLoughlin2013-01-0811-69/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the glance_host, glance_port and glance_protocol options into the nova.image.glance module. Also move the generate_glance_url() and generate_image_url() utility methods there since they're the only uses of the options outside of the module. blueprint: scope-config-opts Change-Id: I3beca1a65cdd902a94ddc1c512d79a4de635ef38
* | | | | | Merge "Adds to manager init_host validation for instances location"Jenkins2013-01-0910-1/+396
|\ \ \ \ \ \
| * | | | | | Adds to manager init_host validation for instances locationKravchenko Pavel2013-01-0810-1/+396
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the compute was down the instances running on it could be evacuated to another host. The method checks that instance host identical to current host. Otherwise destroying it. part of blueprint rebuild-for-ha DocImpact Change-Id: Ic90df2b2887ee203e6d8261084e3f97773c5d81c Co-authored-by: Oshrit Feder <oshritf@il.ibm.com>
* | | | | | | Merge "Clarify the DBApi object in cells fakes"Jenkins2013-01-091-2/+7
|\ \ \ \ \ \ \
| * | | | | | | Clarify the DBApi object in cells fakesChris Behrens2013-01-081-2/+7
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a docstring and makes instance_get_by_uuid() raise by default. It's only used as a stubbing point, but returning 'None' is not really valid and having it raise might save someone some confusion in the future. Change-Id: Ie3fa333288f9c0263ead69c2d307101b8583dea7
* | | | | | | Merge "Add to libvirt driver instance_on_disk method"Jenkins2013-01-093-0/+27
|\ \ \ \ \ \ \ | | |/ / / / / | |/| | | | |
| * | | | | | Add to libvirt driver instance_on_disk methodKravchenko Pavel2013-01-083-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added method to driver layer to validate that instance directory accessible from the host. part of libvirt driver support for blueprint rebuild-for-ha DocImpact Change-Id: I9c6a3aec99f61bd4fb6bc4b4264771e077aae96a Co-authored-by: Oshrit Feder <oshritf@il.ibm.com>
* | | | | | | Merge "add to driver option to keep disks when instance destroyed"Jenkins2013-01-0912-75/+161
|\| | | | | |
| * | | | | | add to driver option to keep disks when instance destroyedKravchenko Pavel2013-01-0812-75/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding delete_disks flag to destroy instance method. In case it's false the driver keeps disks. *required for blueprint rebuild-for-ha DocImpact Change-Id: I38c7833114d8414dff831c9cc0c04c4610dbd33a Co-authored-by: Oshrit Feder <oshritf@il.ibm.com>
* | | | | | | Merge "Fix serialization in impl_zmq."Jenkins2013-01-091-9/+32
|\ \ \ \ \ \ \
| * | | | | | | Fix serialization in impl_zmq.Russell Bryant2013-01-081-9/+32
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sync rpc from oslo-incubator to include some fixes to impl_zmq: https://review.openstack.org/#/c/18913/ Change-Id: I5f5c157e81026c108df04bd385776a9985d4a497
* | | | | | | Merge "fix N401 errors, stop ignoring all N4* errors"Jenkins2013-01-0936-119/+116
|\ \ \ \ \ \ \
| * | | | | | | fix N401 errors, stop ignoring all N4* errorsSean Dague2013-01-0736-119/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had previously been ignoring all our custom N4xx hacking.py errors. This fixes all the N401 errors "doc strings should not start with a space" and reduces the ignore set down to N402 only "single line docstrings should end with period". It also fixes the N401 parser to catch only docstrings, and not tripple quoted string blocks used later on in a function. Clean up a few of the more crazy uses of """ in our code Clean up additional funky comments to make indents a bit more consistent, and pull in lines when possible. Change-Id: I9040a1d2ca7efda83bd5e425b95d1408b5b63577
* | | | | | | | Merge "Fix baremetal VIFDriver"Jenkins2013-01-081-2/+1
|\ \ \ \ \ \ \ \ | |_|_|_|/ / / / |/| | | | | | |
| * | | | | | | Fix baremetal VIFDriverDevananda van der Veen2013-01-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit Id287f7e661 removed the nova/virt/vif.py file and the VIFDriver base class, and erroneously stated in its commit message that baremetal driver did not use it. This patch repeats the work of that earlier patch by removing the import of nova.virt.vif from baremetal/vif_driver.py. blueprint general-bare-metal-provisioning-framework Change-Id: Ifac9510a72a028dc5d3574148f3c4a6410b1d249
* | | | | | | | Merge "Remove unused osapi_path option"Jenkins2013-01-081-3/+0
|\ \ \ \ \ \ \ \ | | |_|_|_|/ / / | |/| | | | | |
| * | | | | | | Remove unused osapi_path optionMark McLoughlin2013-01-081-3/+0
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has been unused since deprecated auth was removed. It looks like we intended to remove this in commit ea06eff7. Change-Id: I7a5868c42300ba92d5c8f528a447cfe3fbace297
* | | | | | | Merge "Add api extension to get and reset password"Jenkins2013-01-0813-0/+282
|\ \ \ \ \ \ \
| * | | | | | | Add api extension to get and reset passwordVishvananda Ishaya2013-01-0713-0/+282
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Password is stored in system_instance_metadata as four items with the keys 'password_0' through 'password_3'. The extension adds a resource endpoint with two methods: GET v2/servers/<uuid>/os-server-password # get_password DELETE v2/servers/<uuid>/os-server-password # reset_password get_password retuns: JSON: {"password": "xxx"} XML: <?xml version='1.0' encoding='UTF-8'?><password>xxx</password> Note that this is intended to be an encrypted password set by the guest. Includes api tests for json and xml. Also includes api samples. Part of blueprint get-password Change-Id: I6c03f9c3bc8a2c70403bbb3e57917ab9522d75bd
* | | | | | | | Merge "Refresh instance metadata in-place"Jenkins2013-01-082-5/+31
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / |/| | | | | | |
| * | | | | | | Refresh instance metadata in-placeDan Smith2013-01-082-5/+31
| | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some reason that isn't entirely clear to me, the attempt to update instance metadata in _instance_update() results in a stale sqlalchemy object state. This is a similar issue to the one fixed in commit: 9fdf7552779d518af9cda4e366bf81fddb0cb6f2 For some reason, session.refresh() doesn't work for instance['metadata'] in the same way, which also raises suspicion that perhaps it's not the right fix for system_metadata either. This patch adds an _instance_update_metadata_in_place() method that updates the actual instance['metadata'] list _and_ the database, mirroring the high-level behavior of instance_metadata_update(), but without requiring us to refresh or re-fetch the metadata or the whole instance (as a workaround). Fixes bug 1096653 Change-Id: Ic5a205631b1b7dce3744960ed4201dcc7b4b2ae6
* | | | | | | Merge "Add exception handler for previous deleted flavor."Jenkins2013-01-083-1/+43
|\ \ \ \ \ \ \
| * | | | | | | Add exception handler for previous deleted flavor.Ken'ichi Ohmichi2013-01-083-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An exception happens if a previous flavor is deleted and 'nova resize-revert' run, because 'nova resize-revert' does not handle the deleted flavor. And also we have the same problem in _update_usage_from_migration(). This patch fixes the problems. How to reproduce the problem on DevStack: $ nova flavor-create sample 10 512 0 2 $ nova boot --image cirros-0.3.0-x86_64-uec --flavor sample test01 $ nova resize test01 m1.tiny $ nova flavor-delete 10 $ nova resize-revert test01 Before applying this patch: $ nova resize-revert test01 ERROR: The server could not comply with the request since it is either malformed or otherwise incorrect. (HTTP 400) (Request-ID: req-b0d3e016-9608-4a87-a0cc-44dfe00b25a1) $ After applying this patch: $ nova resize-revert test01 ERROR: Flavor used by the instance could not be found. (HTTP 400) (Request-ID: req-ed4ce174-33f2-4258-b522-674a1023ea74) $ Fixes bug 1091490 Change-Id: I39dd23a7565ae66544e8bc2aa7ad3299eb61bfcc
* | | | | | | | Merge "Support cinderclient http retries."Jenkins2013-01-082-4/+19
|\ \ \ \ \ \ \ \
| * | | | | | | | Support cinderclient http retries.Cory Stone2013-01-072-4/+19
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HTTP retries were recently added to cinderclient. This adds the config option required to use it. The default (unchanged) behavior is 0 retries. Change-Id: Ia7ad831045e8df9ad9c22f0119ae3485d91ad949
* | | | | | | | Merge "Conductor instance_get_all replaces _by_filters"Jenkins2013-01-085-10/+21
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | |
| * | | | | | | Conductor instance_get_all replaces _by_filtersDan Prince2013-01-075-10/+21
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates the Nova conductor so that it uses instance_get_all() and instance_get_all_by_host() from the Nova DB API to implement its own like named functions. This fixes a regression that occured in d22b0ca where we switched from using the DB API's instance_get_all_by_host and instance_get_all methods over to the DB APIs instance_get_all_by_filters. This caused some subtle regressions due to the fact that instance_get_all_by_filters has different defaults for deleted records. The previously used (prior to d22b0ca) instance_get_all() and instance_get_all_by_host() functions rely on the context.read_deleted and also handle the display of deleted and soft deleted records differently. Fixes LP Bug #1096972. Change-Id: Icb587ef169d1d7dd86cf6ee682e74bd4e84c37e2
* | | | | | | Merge "CLI for bare-metal database sync."Jenkins2013-01-081-0/+49
|\ \ \ \ \ \ \
| * | | | | | | CLI for bare-metal database sync.Mikyung Kang2013-01-081-0/+49
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part 3 of 6: blueprint general-bare-metal-provisioning-framework. Change-Id: Ia19ce00edb84aa924c2ab2c9c2217f6b49073d69 Co-authored-by: Mikyung Kang <mkkang@isi.edu> Co-authored-by: David Kang <dkang@isi.edu> Co-authored-by: Ken Igarashi <igarashik@nttdocomo.co.jp> Co-authored-by: Arata Notsu <notsu@virtualtech.jp>
* | | | | | | Merge "powervm: Implement snapshot for local volumes"Jenkins2013-01-086-14/+296
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | |
| * | | | | | powervm: Implement snapshot for local volumesLance Bragstad2013-01-076-14/+296
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Snapshot local volumes by copying the logical volume on VIOS, gzip the file, transfer to compute service node, and finally upload to glance. PEP8 and string concatenation fixes. Added utility to powervm.common for constructing UNIX file paths. Added unit tests for new utility. bp powervm-compute-enhancements Change-Id: Ie6bafbeef75a9464457d78d2997be78346d3ab24
* | | | | | Merge "Add two tests for resize action in ServerActionsControllerTest."Jenkins2013-01-081-1/+24
|\ \ \ \ \ \
| * | | | | | Add two tests for resize action in ServerActionsControllerTest.Xiangyang Chu2013-01-051-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add test_resize_not_found for NotFound; and test_resize_with_too_many_instances for TooManyInstances. Fix bug #1089417 Change-Id: I18dda1129e1bb3d411bb8a5dab9474d67fcb18fd
* | | | | | | Merge "Sync rpc and notifier from oslo-incubator."Jenkins2013-01-0810-87/+270
|\ \ \ \ \ \ \ | |_|_|_|_|_|/ |/| | | | | |
| * | | | | | Sync rpc and notifier from oslo-incubator.Russell Bryant2013-01-0710-87/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch syncs the latest changes to rpc and notifier from oslo-incubator. The most significant changes are for adding support for a message envelope for all messages, including notifications, sent via rpc. Related oslo-incubator reviews: https://review.openstack.org/#/c/17554/ https://review.openstack.org/#/c/18057/ Note that a new notifier module was added: rpc_notifier2, which when used, sends notifications out with a message envelope. DocImpact. Implements bp version-rpc-messages. Change-Id: I495c224d0c502086ce3db6c078d48829b8d913a6
* | | | | | | Merge "Added sample tests to QuotaClasses API."Jenkins2013-01-087-1/+115
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | |