Commit Graph

297 Commits

Author SHA1 Message Date
Jenkins 5d3d96c4b0 Merge "Make rebuild server schema 'additionalProperties' False" 2015-01-05 17:19:45 +00:00
ghanshyam 340ffeeff1 Make rebuild server schema 'additionalProperties' False
Nova V2.1 API has strong input validation by making validation
through JSON schema.

This patch makes rebuild server schema 'additionalProperties' to False
as all rebuild server extensions are implemented in V2.1.
After this, V2.1 will not allow extra arg for rebuild server.

This patch also modify the corresponding rebuild server tests
for extra input passed in request body-
    test_rebuild_admin_password_pass_disabled
    test_create_and_rebuild_server
    Access ip extension sample files

Partially implements blueprint v2-on-v3-api

Change-Id: Ib13b02cefb9617e8af3b62b81d2f7eb7cd88eab1
2015-01-05 11:33:51 +09:00
ghanshyam 5ba9301c34 Make create server schema 'additionalProperties' False
Nova V2.1 API has strong input validation by making validation
through JSON schema.

This patch makes create server schema 'additionalProperties' to False
as all create server extensions are implemented in V2.1.

After this, V2.1 will not allow extra arg for create server.

This patch also fix the API sample files which were passing extra arg in
create request body.

Partially implements blueprint v2-on-v3-api

Change-Id: Ib2a4272cbacb3011b800776577233545af3d9d4b
2014-12-15 15:00:11 +09:00
Eli Qiao 001d702e90 Modify v21 alias name for compatible with v2
This patch changes some of the alias names to be compatible with v2.
so the extension info output will be as same with v2.
 consoles -> os-consoles
 flavor-extra-specs -> os-flavor-extra-specs
 flavor-manage -> os-flavor-manage

Partially implements blueprint v2-on-v3-api

Change-Id: Ia8c6a0144e43134667636db9ba862b26f265a433
2014-12-09 12:57:36 +08:00
Jenkins 45cc1a79fc Merge "Convert v3/v2.1 extension info to present v2 API format" 2014-12-05 11:32:05 +00:00
Chris Yeoh bb38d13c69 Convert v3/v2.1 extension info to present v2 API format
Changes from the v3 API /extensions interface format to the
v2 API format. Note that this does not yet list the same
extensions as the v2 api because in v2.1 some have been split
or renamed. This will be addressed in a future patch

Partially implements blueprint v2-on-v3-api

Change-Id: Icaf945b356fcbbe2126343ad01ee58cecd15100f
2014-12-04 19:27:50 +08:00
Jenkins 2a2f36a56a Merge "Add API validation schema for volume_attachments" 2014-12-04 03:44:27 +00:00
Jenkins 1277c12209 Merge "Fix API samples/templates of multinic-add-fixed-ip" 2014-12-02 13:05:15 +00:00
Jenkins 289736bfcf Merge "Port virtual-interfaces plugin to v2.1(v3) API" 2014-12-02 07:01:28 +00:00
Jenkins d2298c6433 Merge "GET servers API sorting REST API updates" 2014-12-02 06:18:09 +00:00
Jenkins 8425fbc01c Merge "Implement 'personality' plugin for V2.1" 2014-12-01 14:29:14 +00:00
jichenjc 7ffdb2deaf Port virtual-interfaces plugin to v2.1(v3) API
Ports virtual-interfaces extension and adapts it to the
v2.1/v3 API framework. API behaviour is identical.

- unittest code modified to share testing with both v2/v2.1
- Adds expected error decorators for API methods

Partially implements blueprint v2-on-v3-api

Change-Id: Ic25ae83ecfaaa461b6ddd044e04af844d02dd6b7
2014-12-01 11:04:08 +08:00
Steven Kaufer f268be97bd GET servers API sorting REST API updates
Updates the v2 and v3 /servers and /servers/detail APIs to support the
multiple sort keys and sort directions (using the 'sort_key' and
'sort_dir' parameters); these parameters can be specified multiple
times to create a list of sort keys and directions. These parameters
are passed from the API layer to the compute layer, then to the
instance layer (with updated version), then to the database layers,
and then to the common paginate_query function; the paginate_query
function already supports multiple sort keys and directions. The
function signatures in these various layers are updated with new
'sort_keys' and 'sort_dirs' parameters that represent the sort keys
and directions information as lists.

This support is enabled on the v2 API by the existence of a new
'os-server-sort-keys' API extension and is always enabled in the v3
API. The extension API sample issues 2 server creates and then ensures
that both servers are listed (name is unique) in the list reply.

DocImpact: The existing v2 and v3 servers API documentation needs to
reflect these new parameters.

The nova client will also be updated to use these parameters.

Change-Id: I02baf6c3cc7d29abab132ef1726140c57e17d9b6
Partially implements: blueprint nova-pagination
2014-12-01 02:47:02 +00:00
ghanshyam 9ff1a56c61 Add API validation schema for volume_attachments
This patch adds API validation schema for volume_attachments.

Update volume required only Volume Id in request body but sample
files used to pass 'device' also.
This patch also correct those API sample files-
doc/v3/api_samples/os-volumes/update-volume-req.json
nova/tests/functional/v3/api_samples/os-volumes/update-volume-req.json.tpl

DocImpact

Partially implements blueprint v2-on-v3-api

Change-Id: I489272528fe4f4c43ab781d6a1a46742b1702c76
2014-12-01 10:21:15 +09:00
Eli Qiao 9a47137f53 Port floating_ips extension to v2.1
This patch ports floating_ips extension from v2 to v2.1,
and have v2 unit test cases shared between v2.1 and v2.

Partially implements blueprint v2-on-v3-api

Change-Id: Ib06c0d6c7ff123f09a99ed94f4b0009695897602
2014-11-28 13:19:30 +08:00
ghanshyam d99b308e6d Implement 'personality' plugin for V2.1
User can specify 'personality' attribute while server creation
& rebuild to inject files into server.

This patch implement this as separate plugin for V2.1 API.

Also define the schema and unit tests for the same.

Partially implements blueprint v2-on-v3-api

Change-Id: Ia0c527539af7fe33eba4999822476653e1b96bc6
2014-11-27 15:02:15 +09:00
Ken'ichi Ohmichi 701168de08 Fix API samples/templates of multinic-add-fixed-ip
API samples and templates of multinic-add-fixed-ip are malformed and
one parameter name is wrong now.
This patch fixes them.

Change-Id: I997584fdcf0b57220280b554ab9da9782d3d0250
2014-11-27 04:28:21 +00:00
Jenkins 42fc976d63 Merge "Port volume_attachments extension to v2.1 API" 2014-11-26 07:05:44 +00:00
Jenkins 1b9d8f2393 Merge "Port v2 quota_classes extension to work in v2.1(v3) framework" 2014-11-26 05:12:05 +00:00
Chris Yeoh c82f5886ab Port v2 quota_classes extension to work in v2.1(v3) framework
Port v2 quota_classes extension and adapts it to the v2.1/v3 API
framework. API behaviour is identical with the exception that
there is no support for XML. Also

- unittest code modified to share existing testing with both
  v2/v2.1
- Adds expected error decorators for API methods
- Adds API samples

Partially implements blueprint v2-on-v3-api

Change-Id: I372e9940f499d3e2cf621a58eafa9502d4e14cea
2014-11-26 13:56:13 +10:30
Jenkins 51b9f02453 Merge "Fix bulk floating ip ext to show uuid and fixed_ip" 2014-11-26 02:13:50 +00:00
ghanshyam d2367ea1d2 Port volume_attachments extension to v2.1 API
This patch ports v2 volume_attachments & volume_attachment_update
extension to v2.1.
Unittest code modified to share testing with both v2/v2.1.
API sample file and their tests have been added.

Partially implements blueprint v2-on-v3-api

Change-Id: Icf63529f317bc61debc665641d1c9d9f2e45bcec
2014-11-19 12:39:40 +09:00
Eli Qiao 0621c2507f Port assisted-volume-snapshots extension to v2.1
This patch ports assisted-volume-snapshots to v2.1 and make v2 and v2.1
share unit test cases.
This patch addes a schema to do the input validation for snapshots_create
The differences between v2 and v3 are described on the wiki page
https://wiki.openstack.org/wiki/NovaAPIv2tov3 .
Partially implements blueprint v2-on-v3-api

Change-Id: I5b7be1de8ac2628a287897dcc5ca0eaf7a8957a2
2014-11-19 10:09:58 +08:00
Vishvananda Ishaya cc02d56ca8 Fix bulk floating ip ext to show uuid and fixed_ip
The bulk floating ip extension was not showing the instance_uuid
or the fixed_ip properly due to a missing join and an ommision
when the extension was first created. This updates the extension
to display all of the relevant data.

Change-Id: I81c2c742a7eed134b5452c19da0cc55811c009ab
Closes-Bug: #1360426
2014-11-17 16:42:16 -08:00
Jenkins 2efc2a174b Merge "Add 'instance-usage-audit-log' plugin for V2.1" 2014-11-17 03:40:14 +00:00
ghanshyam 88a29f69f5 Convert v3 console plugin to v2.1
This patch changes v3 console plugin to v2.1 and makes v2
unit tests share between v2 and v2.1.

The differences between v2 and v3 are described on the wiki page
https://wiki.openstack.org/wiki/NovaAPIv2tov3.

This patch also fix below issue in V2.1 console plugin-
 -  Remove try catch of 'InstanceNotFound' exception from V2.1
    console->index. This returns empty dict if non-existent server
    is specified. DB does not raise 'InstanceNotFound' exception.

Partially implements blueprint v2-on-v3-api

Change-Id: I306712f47457843c94e6441c4b9db7bf477c394c
2014-11-13 17:27:19 +09:00
ghanshyam 550f1fb07a Add 'instance-usage-audit-log' plugin for V2.1
This patch adds 'instance-usage-audit-log' plugin for V2.1 API.
Also implement the API sample tests and share the unit tests
between V2 & V2.1.

Partially implements blueprint v2-on-v3-api

Change-Id: I152d00fb4b12942515d5db54a7ec381279c31ccd
2014-11-13 14:38:25 +09:00
He Jie Xu c7d9924a08 Port security-group-default-rules extension into v2.1
This patch port security-group-default-rules into v2.1.

This patch just move the v2 code into v2.1 and share the unittest. The other
v2.1 related fix and improvement will be addressed by subsequent patchset.

Partially implements blueprint v2-on-v3-api

Change-Id: I4d65993d6413160d2c7c2eb2ce0c3f66768e1a36
2014-10-28 22:02:27 +08:00
Jenkins 7ac26ec90c Merge "Remove domain from floating-ip-dns-create-or-update-req body" 2014-10-27 06:25:13 +00:00
Jenkins 314d8f5f4b Merge "Port floating_ip_dns extention to v2.1" 2014-10-27 06:24:32 +00:00
Eli Qiao 5fbae427ea Remove domain from floating-ip-dns-create-or-update-req body
`domain` is passed in the url req id, so it is unuseful in the
request body, remove it and v3 api-samples.

Change-Id: If8bdfb7fc928daaf01c9612c97c6b391d3139505
2014-10-24 13:42:46 +08:00
Eli Qiao 8b0e091577 Port floating_ip_dns extention to v2.1
This patch ports floating_ip_dns extention from v2 to v2.1,
and have v2 unit test cases shared between v2.1 and v2.
Partially implements blueprint v2-on-v3-api

Change-Id: Ia1316697c141fde2b431ba79aebae5986687a4fa
2014-10-24 13:42:46 +08:00
Jenkins 06ee916d2b Merge "api: add serial console API calls v2.1/v3" 2014-10-24 05:40:33 +00:00
Jenkins 579f934450 Merge "Remove project id in ViewBuilder alternate link" 2014-10-24 03:51:27 +00:00
Jenkins b6fb621149 Merge "Add API validation schema for cloudpipe api" 2014-10-24 03:45:00 +00:00
Jenkins e53cb39c29 Merge "Port floating_ips_bulk extention to v2.1" 2014-10-24 01:10:34 +00:00
Jenkins 10d73a7531 Merge "Port fixed_ip extention to v2.1" 2014-10-23 11:58:32 +00:00
Jenkins 9683217ee2 Merge "Porting SecurityGroup related controller into v2.1" 2014-10-22 11:15:25 +00:00
Tony Breeds cea4e83c17 api: add serial console API calls v2.1/v3
This is a followup patch to:
api: add serial console API calls v2
    (https://review.openstack.org/#/c/113966/)
To add missing v3 APIs

Change-Id: I56a045d9b690ea36753513575a2023582da58e42
Patial-Implements: blueprint v2-on-v3-api
2014-10-22 21:07:24 +11:00
Eli Qiao 6120c2a2d3 Add API validation schema for cloudpipe api
Add API schema to validation, require project_id need to be uuid formate.

Partially implements blueprint v2-on-v3-api
Change-Id: I9d95229d9391b419fe633b5b9e6f06f68289d3a0
2014-10-22 16:05:36 +08:00
jichenjc e516de74c1 Remove project id in ViewBuilder alternate link
Clearly nobody really uses the "application/vnd.openstack.image"
links in the returned results from GET /v2/{tenant}/images
REST API call, since the link URI returned in it is wrong.

Glance URIs do *not* contain a project or tenant in the URI
structure like Nova's REST API URIs do, but _get_alternate_link()
method of the image ViewBuilder tacks it on improperly:

Change-Id: I4ccb5628569c60026a1772df0794ac0271c48db3
Closes-Bug: #1343080
2014-10-22 14:23:18 +08:00
Eli Qiao 4bb34182fe Port floating_ips_bulk extention to v2.1
This patch ports floating_ips_bulk extention from v2 to v2.1,
and have v2 unit test cases shared between v2.1 and v2.
Partially implements blueprint v2-on-v3-api

Change-Id: I9444ff9c394d530cb76dd4ac21b51cd4de7ef6dc
2014-10-22 10:42:33 +08:00
Eli Qiao 72859d6fbf Port update method of cloudpipe_update to v2.1(v3)
This patch adds couldpipe_update's `update` method to cloudpipe controller
add validation schema to cloudpipe, have v2 unit test cases shared between
v2.1 and v2.

Partially implements blueprint v2-on-v3-api

Change-Id: Ibf39d7fa7301bcba6e259ae88a73c20f64b7fc36
2014-10-21 10:16:08 +08:00
Eli Qiao f7107c8480 Port fixed_ip extention to v2.1
This patch ports fixed_ip extention from v2 to v2.1,
and have v2 unit test cases shared between v2.1 and v2.

Partially implements blueprint v2-on-v3-api
Change-Id: Ifa7e0dd5a91cfe881077b92aeb7019d0435d780a
2014-10-21 09:33:49 +08:00
Chris Yeoh 0c1ad907c4 Port os-networks-associate plugin to v2.1(v3) infrastructure
Ports os-networks-associate extension and adapts it to the
v2.1/v3 API framework. API behaviour is identical.

- unittest code modified to share testing with both v2/v2.1
- Adds expected error decorators for API methods

Partially implements blueprint v2-on-v3-api

Change-Id: I6ccf9613abf999784c548fb058522ac60db7f052
2014-10-16 11:22:28 +10:30
Chris Yeoh cc452485c2 Port os-tenant-networks plugin to v2.1(v3) infrastructure
Ports os-tenant-networks extension and adapts it to the v2.1/v3 API
framework. API behaviour is identical.

- unittest code modified to share testing with both v2/v2.1
- Adds expected error decorators for API methods

Partially implements blueprint v2-on-v3-api

Change-Id: I340c9b1312a3477c63d28f19df9611c95e67cde6
2014-10-16 11:08:40 +10:30
He Jie Xu a9d446d627 Porting SecurityGroup related controller into v2.1
This patch port SecurityGroup, ServerSecurityGroup and SecurityGroupAction
controller into v2.1 security_groups extension.

This patch just move the v2 code into v2.1 and share the unittest. The other
v2.1 related fix and improvement will be addressed by subsequent patchset.

Partially implements blueprint v2-on-v3-api

Change-Id: I93951ce677b74ebed7db1b2fff1f788344806dba
2014-10-15 14:04:14 +08:00
Jenkins ef85102dd4 Merge "Port disk_config extension for V2.1" 2014-10-14 05:40:34 +00:00
Jenkins 3e67e0f68c Merge "Port os-networks plugin to v2.1(v3) infrastructure" 2014-10-14 01:20:30 +00:00
Jenkins b722bb7884 Merge "Port floating_ip_pools extention to v2.1" 2014-10-13 16:22:25 +00:00