summaryrefslogtreecommitdiff
path: root/nova/api/openstack
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Fix agent_id with string type in API samples files for os-agents v2"Jenkins2014-06-271-0/+5
|\
| * Fix agent_id with string type in API samples files for os-agents v2He Jie Xu2014-06-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The agent_id should be integer for agent create and index. But in the api sample file it is string type. It's because the api sample tests provide agent_id with string type in fake data. This patch correct the api sample files and tests. For agent update, it use agent_id that passed from url, make the response use string for agent_id. We can't fix this problem for back-compatibility. This will be fix in the future after v3 API expose by micro-version Change-Id: I262b4b26c94dba003e80bda2f38d2e985ef9f220 Partial-Bug: #1333494
* | Merge "Fix update agent return agent_id with string for os-agents v3"Jenkins2014-06-271-1/+1
|\ \ | |/
| * Fix update agent return agent_id with string for os-agents v3He Jie Xu2014-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the agent update return agent_id with integer, that is inconsistent with the response of agent create and index. It because agent update use the agent_id that passed from url as the response. This problem is fixed by converting the agent id as integer. And the API sample tests provide agent_id with string type in the fake data. This patch fix this problem for API sample files and tests. And for back-compatibility, we should add translator for v2.1 API later. Then this fix will be exposed after v3 API feature exposed by microversion in the future. DocImpact: The agent_is is changed to integer type for agents'update action. Change-Id: Ia9c1034a325b77a2057934cc80b6eab679ff1d2b Partial-Bug: #1333494
* | Make Evacuate API use Instance objects.Leandro I. Costantino2014-06-262-4/+5
|/ | | | | | | | Replace current instance dicts and conversions to Instance Objects. Add services arg to create_fake_instance_obj. Change-Id: I7ddf11ce17df254a8253461e17b5c6519cb7d6fe Related to blueprint compute-manager-objects-juno
* Merge "Add API schema for v2.1/v3 remote_consoles API"Jenkins2014-06-262-0/+75
|\
| * Add API schema for v2.1/v3 remote_consoles APIHaiwei Xu2014-06-252-0/+75
| | | | | | | | | | | | | | | | | | | | | | By defining the API schema, it is possible to separate the validation code from the API method. The API method can be more simple. In addition, a response of API validation error can be consistent for the whole Nova API. Partially implements blueprint v3-api-schema Change-Id: Icdb1f87903e3c4345e6533c08b2f2d2f9d36316e
* | Merge "Add API schema for v2.1/v3 flavor_manage API"Jenkins2014-06-252-11/+78
|\ \
| * | Add API schema for v2.1/v3 flavor_manage APIYuiko Takada2014-06-242-11/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By defining the API schema, it is possible to separate the validation code from the API method. The API method can be more simple. In addition, a response of API validation error can be consistent for the whole Nova API. Partially implements blueprint v3-api-schema Change-Id: I92de34f6b9801b7ff9e4a9cc77baf2bf2bb36f6f
* | | Merge "Add API schema for v2.1/v3 aggregates API"Jenkins2014-06-252-58/+102
|\ \ \
| * | | Add API schema for v2.1/v3 aggregates APIYuiko Takada2014-06-242-58/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By defining the API schema, it is possible to separate the validation code from the API method. The API method can be more simple. In addition, a response of API validation error can be consistent for the whole Nova API. Partially implements blueprint v3-api-schema Change-Id: I67a1b723f37256e8bdfaf38d9f5ad0a4c4d2e53e
* | | | Merge "Object-ify APIv3 availability_zone extension"Jenkins2014-06-241-2/+2
|\ \ \ \
| * | | | Object-ify APIv3 availability_zone extensionDan Smith2014-06-231-2/+2
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the availablility_zone extension use the Service object for looking up service details instead of a direct-to-database call. Related to blueprint compute-manager-objects-juno Change-Id: I3091bc06a74e32871a743a831ab3db23220ae8f8
* | | | Merge "Avoid traceback logs from simple tenant usage extension"Jenkins2014-06-241-8/+29
|\ \ \ \
| * | | | Avoid traceback logs from simple tenant usage extensionChristopher Yeoh2014-06-231-8/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid generating traceback logs when invalid formatted datetime parameters are passed to the simple tenant usage extension. Exceptions have not been correctly handled by the os-simple-tenant usage extension which results in tracebacks being output to the log files. This patch correctly handles exceptions as a result of badly formatted datetime strings. Change-Id: Iecd42239357b96450b6530c0486b27c68995c37f Partial-Bug: 1300972
* | | | | Merge "Don't store duplicate policies for server_group"Jenkins2014-06-241-0/+5
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | Don't store duplicate policies for server_groupwingwj2014-06-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't make sense to store same policies in a server_group. We need to deny this usage in server_group creation. Change-Id: I4f3ad544aef78cbbc076c7a47cca04832a2f5b4b Closes-Bug: #1324348
* | | | | Merge "Target host in evacuate can't be the original one"Jenkins2014-06-232-0/+7
|\ \ \ \ \
| * | | | | Target host in evacuate can't be the original onewingwj2014-06-232-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'Evacuate' function aims to help administrator/operator to evacuate servers if this compute node fails. If no protection, the API returns a successful response, but the vm_state will be changed to ERROR after nova-compute started, due to the 'InstanceExists' exception raised from 'rebuild_instance()'. So we need to add verification here, the target host should not be the original host. Change-Id: Ic468cd57688b370a18cacfc6e0844a8201eb9ab3 Closes-Bug: #1271821
* | | | | | Merge "Object-ify APIv3 flavor_extraspecs extension"Jenkins2014-06-231-13/+28
|\ \ \ \ \ \
| * | | | | | Object-ify APIv3 flavor_extraspecs extensionDan Smith2014-06-201-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the APIv3 flavor_extraspecs extension use the Flavor object instead of going direct to the database. Related to blueprint compute-manager-objects-juno Change-Id: Ibe9211fb944bb64f722e2417725e29506b17ee30
* | | | | | | Merge "Object-ify APIv2 flavorextraspecs extension"Jenkins2014-06-231-16/+31
|\ \ \ \ \ \ \ | |/ / / / / / | | | | / / / | |_|_|/ / / |/| | | | |
| * | | | | Object-ify APIv2 flavorextraspecs extensionDan Smith2014-06-201-16/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the flavorextraspecs extension use the Flavor object. Related to blueprint compute-manager-objects-juno Change-Id: I28bcc24382f1e993b98b3f7342fed53c9ae85cbf
* | | | | | Merge "Allow user to specify image to use during rescue - V3 API changes"Jenkins2014-06-202-1/+7
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | |
| * | | | | Allow user to specify image to use during rescue - V3 API changesAditi Raveesh2014-06-022-1/+7
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit includes the V3 changes. Making changes in V3 API to take an extra parameter rescue_image_ref as part of the rescue action API. If specified, this image_ref will be used to rescue the instance. If the image is not specified, then the base image ref is used by default. Partially Implements: blueprint allow-image-to-be-specified-during-rescue DocImpact Change-Id: I7a9d88bf4dfe73879247f5b82a52928fdde76510
* | | | | Merge "Correct exception info format of v3 flavor manage"Jenkins2014-06-191-1/+3
|\ \ \ \ \
| * | | | | Correct exception info format of v3 flavor managejichenjc2014-05-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing flavor manage may raise HTTPBadRequest exception, But the msg info didn't use '_' prefix. This patch adds it. Change-Id: I736bf4b0e78ecc0bb753d376ee162f19fafc09e1
* | | | | | Merge "Remove XML namespace from some v3 extensions"Jenkins2014-06-196-6/+0
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | |
| * | | | | Remove XML namespace from some v3 extensionsshuangtai2014-06-116-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The XML support was removed from the V3 API plugins, this XML namespace was not used again. Change-Id: I427597dd3f6d454037a791f911756a97f343966d
* | | | | | Merge "Object-ify server_password APIv3 extension"Jenkins2014-06-181-4/+4
|\ \ \ \ \ \
| * | | | | | Object-ify server_password APIv3 extensionDan Smith2014-06-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the server_password APIv3 extension use the Instance object instead of direct database access. Related to blueprint compute-manager-objects-juno Change-Id: I960840e8261bacd4a9c99934f02342861e53bc74
* | | | | | | Merge "Object-ify server_password APIv2 extension"Jenkins2014-06-181-4/+3
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Object-ify server_password APIv2 extensionDan Smith2014-06-171-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the server_password extension use the Instance object instead of direct database access. Related to blueprint compute-manager-objects-juno Change-Id: I54f7762d14868278ef72589a8c6e3fc80c0e48c8
* | | | | | | Merge "Move the fixed_ips APIv2 extension to use objects"Jenkins2014-06-181-11/+13
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Move the fixed_ips APIv2 extension to use objectsDan Smith2014-06-171-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts the fixed_ips extension to use the FixedIP object instead of direct database access. Related to blueprint compute-manager-objects-juno Change-Id: I21afae063a360c1c36a417f0455e213b7236b541
* | | | | | | Merge "Completely object-ify the floating_ips_bulk V2 extension"Jenkins2014-06-181-14/+12
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Completely object-ify the floating_ips_bulk V2 extensionDan Smith2014-06-171-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts the floating_ips_bulk APIv2 extension from using direct DB access to using the FloatingIP object. Related to blueprint compute-manager-objects-juno Change-Id: I5fa7637b5eb06a9be51d7638701d98e3e033d68d
* | | | | | | Removes the use of mutables as default argsChangBo Guo(gcb)2014-06-181-1/+2
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing mutable objects as default args is a known Python pitfall. We'd better avoid this. This commit changes mutable default args with None, then use 'arg = arg or {}', 'arg = arg or []'. For unit code which doesn't use the args , just set with None. This commit also adds hacking check. Closes-Bug: #1327473 Change-Id: I5a8492bf8ffef8e000b13b6bdfaef1968b96f816
* | | | | | Merge "Check the length of aggregate metadata"Jenkins2014-06-172-8/+42
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | Check the length of aggregate metadatawingwj2014-06-042-8/+42
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PostgreSQL gives an error if you try to shove 256+ characters into a 255-character field. So we need raise a HTTPBadRequest explanation if the length of aggregate_metadata.keys or aggregate_metadata.values is above 255. Change-Id: I2c778f2237ba5bd2aa8335a0eae80f3aad3e9157 Closes-Bug: #1219693
* | | | | Merge "Make get_console_output() use objects"Jenkins2014-06-172-2/+4
|\ \ \ \ \
| * | | | | Make get_console_output() use objectsPhil Day2014-06-102-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the get_console_output() method in compute manager to take objects. Related to blueprint compute-manager-objects-juno Change-Id: Ia8cb2168313903d5255fa2c9616ee2a56aebdb68
* | | | | | Merge "Revert "Allow admin user to get all tenant's floating IPs""Jenkins2014-06-171-13/+2
|\ \ \ \ \ \
| * | | | | | Revert "Allow admin user to get all tenant's floating IPs"Matt Riedemann2014-06-131-13/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6478554f531f6ee2fa86226fbc79dd31e556bc06. This API change merged as a bug fix and introduced bugs and our API change policy is more or less to go through the blueprint/nova-specs review process: http://lists.openstack.org/pipermail/openstack-dev/2014-June/037536.html So reverting this so it can go through the blueprint/nova-specs review process. There should be minimal impacts to removing this (broken) API since it merged not too long ago and was added strictly for Ceilometer's usage, not an external deployer that would be (more) broken by this API removal. Closes-Bug: #1328694 Change-Id: I22a711795ea616aabc155a71703c9c794e84a5dc
* | | | | | | Merge "Fix api direct use of instance module objects"Jenkins2014-06-178-18/+17
|\ \ \ \ \ \ \
| * | | | | | | Fix api direct use of instance module objectsChris Behrens2014-06-038-18/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This switches the nova/api and nova/tests/api code to use nova.objects.Instance* vs nova.objects.instance.Instance*. Partial-Blueprint: object-subclassing Change-Id: I146f1d082fa37e1a5c09aa8c5363746daffbc219
* | | | | | | | Merge "Check if volume is bootable when creating an instance"Jenkins2014-06-141-1/+2
|\ \ \ \ \ \ \ \
| * | | | | | | | Check if volume is bootable when creating an instanceLeandro I. Costantino2014-05-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cinder provides a bootable flags for volumes that's not being checked when creating an instance. If a user select a non-bootable volume, then the VM became unusable since nothing will be booted at all. This check is done only in case that a volume is selected as root device for a VM. Boot from snapshot will still work (even that the volume will be marked as non-bootable by cinder, but will boot the attached snapshot instead) If the attribute bootable is not present, we keep the old behaviour and allow the instance creation. Change-Id: I8e028d40d6a11beeac4f043afccb17eb61f6ce62 Closes-Bug: #1321334
* | | | | | | | | Merge "Correct exception handling when create aggregate"Jenkins2014-06-111-4/+2
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / / |/| | | | | | | |
| * | | | | | | | Correct exception handling when create aggregatejichenjc2014-05-271-4/+2
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when create an aggregate, InvalidAggregateAction might be raised, this patch translates the InvalidAggregateAction to HTTPBadRequest. Also, 2 unnecessary logs was removed becuase log is not output in most BadRequest. Change-Id: I3dac808d8edab6118e347eb5d78b96f96b9d40ca