API: Implement V2.1 API on V3 API (partial)

Registered by Christopher Yeoh on 2014-10-07

This is a continuation of the blueprint v2-on-v3-api-juno blueprint. Implementing the V2.1 API (functionally equivalent to the V2 API except with strong input validation) using the V3 API framework.

Blueprint information

Status:
Complete
Approver:
John Garbutt
Priority:
High
Drafter:
Christopher Yeoh
Direction:
Approved
Assignee:
Christopher Yeoh
Definition:
Approved
Series goal:
Accepted for kilo
Implementation:
Implemented
Milestone target:
milestone icon 2015.1.0
Started by
John Garbutt on 2014-10-08
Completed by
John Garbutt on 2015-03-19

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/v2-on-v3-api,n,z

Addressed by: https://review.openstack.org/122363
    Porting SecurityGroup related controller into v2.1

Addressed by: https://review.openstack.org/122633
    Port SecurityGroupRules controller into v2.1

Addressed by: https://review.openstack.org/115165
    Porting assisted-volume-snapshots extension to v2.1

Addressed by: https://review.openstack.org/124279
    Port security-group-default-rules extension into v2.1

Addressed by: https://review.openstack.org/118968
    Port fixed_ip extention to v2.1

Addressed by: https://review.openstack.org/124331
    Add decorator expected_errors for security_group extension

Addressed by: https://review.openstack.org/119283
    Port floating_ip_pools extention to v2.1

Addressed by: https://review.openstack.org/122610
    Port volume_attachments extension to v2.1 API

Addressed by: https://review.openstack.org/124367
    Port disk_config extension for V2.1

Addressed by: https://review.openstack.org/126831
    Fix wrong exception return in fixed_ips v2 extention

Addressed by: https://review.openstack.org/119319
    Port floating_ips_bulk extention to v2.1

Addressed by: https://review.openstack.org/127098
    Make v2.1 API tests use v2 URLs(test_[f-m].*)

Addressed by: https://review.openstack.org/127101
    Make v2.1 API tests use v2 URLs(test_[r-v].*)

Addressed by: https://review.openstack.org/127105
    Use 400 instead of 422 for security_groups v2 API

Addressed by: https://review.openstack.org/120674
    Refactor of test case of floating_ips

Addressed by: https://review.openstack.org/120703
    Port floating_ips extention to v2.1

Addressed by: https://review.openstack.org/113432
    Convert service v3 plugin to v2.1 API

Addressed by: https://review.openstack.org/119013
    Port floating_ip_dns extention to v2.1

Addressed by: https://review.openstack.org/119012
    Refactor test cases of test_floating_ip_dnsto simple code

Addressed by: https://review.openstack.org/120669
    Port os-networks plugin to v2.1(v3) infrastructure

Addressed by: https://review.openstack.org/121804
    Cleanup tenant networks plugin config creation

Addressed by: https://review.openstack.org/121008
    Port cloudpipe_update extension to v2.1

Addressed by: https://review.openstack.org/120973
    Port cloudpipe extension to v2.1

Addressed by: https://review.openstack.org/117922
    Porting baremetal_nodes extension to v2.1/v3

Addressed by: https://review.openstack.org/121805
    Port os-tenant-networks plugin to v2.1(v3) infrastructure

Addressed by: https://review.openstack.org/122078
    Port os-networks-associate plugin to v2.1(v3) infrastructure

Addressed by: https://review.openstack.org/118934
    Port v2 quota_classes extension to work in v2.1(v3) framework

Gerrit topic: https://review.openstack.org/#q,topic:floating-ips,n,z

Addressed by: https://review.openstack.org/128670
    Use wsgi.response for v2.1 API

Addressed by: https://review.openstack.org/128677
    Add API schema for aggregates set_metadata API

Addressed by: https://review.openstack.org/129133
    Add API validation schema for floating_ip_dns

Addressed by: https://review.openstack.org/129148
    Change error code of floating_ip_dns api(v2.1)

Addressed by: https://review.openstack.org/129179
    Add API validation schema for cloudpipe api

Addressed by: https://review.openstack.org/128844
    Remove `domain` from floating-ip-dns-create-or-update-req body

Addressed by: https://review.openstack.org/129155
    Remove unuseful parameter in cloudpipe api(v2/v2.1)

Addressed by: https://review.openstack.org/129772
    Use wsgi.response for v2.1 unrescue API

Addressed by: https://review.openstack.org/129833
    Add api validation schema for image_metadata

Addressed by: https://review.openstack.org/130028
    Handle exception better in v2.1 attach_interface

Addressed by: https://review.openstack.org/130079
    Make v2.1 tests use wsgi_app_v21 and remove wsgi_app_v3

Gerrit topic: https://review.openstack.org/#q,topic:schema_image_meta,n,z

Addressed by: https://review.openstack.org/130181
    api: add serial console API calls v2.1/v3

Gerrit topic: https://review.openstack.org/#q,topic:sg_schema,n,z

Addressed by: https://review.openstack.org/130438
    Add API schema for v2.1 "resize a server" API

Addressed by: https://review.openstack.org/130435
    Add json-schema for v2.1 security-groups extension

Addressed by: https://review.openstack.org/130440
    Use 404 instead of 400 when security_group is non-existed

Addressed by: https://review.openstack.org/130683
    Remove LOG outputs from v2.1 API layer

Addressed by: https://review.openstack.org/130685
    Add API validation schema for disk_config

Addressed by: https://review.openstack.org/130706
    Add API json schema to volumes api(v2.1)

Addressed by: https://review.openstack.org/130439
    Fix the unittest use wrong controller for SecurityGroups V2

Addressed by: https://review.openstack.org/130441
    Cleanup in volumes api(v21)

Addressed by: https://review.openstack.org/131627
    Remove Nova v3 API endpoint

Addressed by: https://review.openstack.org/131653
    Add "x-compute-request-id" to a response header

Addressed by: https://review.openstack.org/131904
    Add integer types for JSON-Schema

Addressed by: https://review.openstack.org/131924
    Add API schema for server_groups API

Addressed by: https://review.openstack.org/131925
    Implement 'personality' plugin for V2.1

Addressed by: https://review.openstack.org/131929
    Add resource types for JSON-Schema validation

Addressed by: https://review.openstack.org/131930
    Add API schema for v2.1/v3 scheduler_hints extension

Addressed by: https://review.openstack.org/68560
    Add API schema for v2.1/v3 scheduler_hints extension

Addressed by: https://review.openstack.org/131931
    Limit tcp/udp port to be empty string in json-schema

Addressed by: https://review.openstack.org/131932
    Add json-schema for v2.1 security-group-default-rules extension

Addressed by: https://review.openstack.org/131949
    Share unit test case for server_external_events api

Addressed by: https://review.openstack.org/131961
    Add API json schema for server_external_event(v2.1)

Addressed by: https://review.openstack.org/132615
    Add 'instance-usage-audit-log' plugin for V2.1

Addressed by: https://review.openstack.org/132941
    Fix the cell API with string rpc_port failed

Addressed by: https://review.openstack.org/132942
    Add API validation schema for services v2.1 plugin

Addressed by: https://review.openstack.org/133134
    Convert v3 console plugin to v2.1

Addressed by: https://review.openstack.org/133140
    Share console-auth-tokens tests between V2 & V2.1

Addressed by: https://review.openstack.org/133165
    Share migrations unit test between V2 & V2.1

Addressed by: https://review.openstack.org/133387
    Fix rule not found error in V2.1 sec grp default rule

Gerrit topic: https://review.openstack.org/#q,topic:(detached,n,z

Addressed by: https://review.openstack.org/134353
    Add API schema for v2.1 networks API

Addressed by: https://review.openstack.org/134453
    Share server_password unit test between V2 & V2.1

Addressed by: https://review.openstack.org/135212
    Sync server_external_events v2 to v2.1 Part 1

Addressed by: https://review.openstack.org/135214
    Sync server_external_events v2 to v2.1 Part 2

Addressed by: https://review.openstack.org/135532
    Clean the test cases for service plugins

Addressed by: https://review.openstack.org/135904
    Use a copy of NEW_NETWORK for test_networks

Addressed by: https://review.openstack.org/136358
    Share extended_volumes unit test between V2 & V2.1

Addressed by: https://review.openstack.org/136662
    Move pci unit test from V3 to V2.1

Addressed by: https://review.openstack.org/136965
    Replace HTTPRequestV3 with HTTPRequest for v2/v2.1 tests

Addressed by: https://review.openstack.org/136970
    Use HTTPRequestV3 instead of HTTPRequest for v2/v2.1 tests

Addressed by: https://review.openstack.org/136974
    Make user_data unit tests share between v2 and v2.1

Gerrit topic: https://review.openstack.org/#q,topic:clean_up_test_server_dia,n,z

Addressed by: https://review.openstack.org/136971
    Clean up in test_server_diagnostics unit test case

Addressed by: https://review.openstack.org/136993
    Make multiple_create unit tests share between v2 and v2.1

Addressed by: https://review.openstack.org/127889
    Improve error return code of floating_ips in v2/v2.1 api

Addressed by: https://review.openstack.org/129841
    Add integrated test case and api sample for image_metadata(v2.1)

Addressed by: https://review.openstack.org/137305
    Add delete not found unit testcase for floating_ip api

Addressed by: https://review.openstack.org/137513
    Add API validation schema for volume_attachments

Addressed by: https://review.openstack.org/123067
    Port virtual-interfaces plugin to v2.1(v3) API

Addressed by: https://review.openstack.org/137738
    Share server access ips tests between V2 & V2.1

Addressed by: https://review.openstack.org/137749
    [WIP]Use admin only common test case for admin action unit test cases

Addressed by: https://review.openstack.org/137765
    Fix v2.1 API os-simple-tenant-usage policy

Addressed by: https://review.openstack.org/137943
    Share lock_server unit test between V2 & V2.1

Addressed by: https://review.openstack.org/137944
    Share pause_server unit test between V2 & V2.1

Addressed by: https://review.openstack.org/137947
    Share suspend_server unit test between V2 & V2.1

Addressed by: https://review.openstack.org/137948
    Share CreateBackup unit test between V2 & V2.1

Addressed by: https://review.openstack.org/138009
    Share server_actions unit test between V2 & V2.1

Addressed by: https://review.openstack.org/138017
    Fix URL mapping of server metadata PUT request

Addressed by: https://review.openstack.org/138025
    Fix URL mapping of image metadata PUT request

Addressed by: https://review.openstack.org/138225
    Add a validation format "cidr"

Addressed by: https://review.openstack.org/138231
    Make a flavorRef validation strict

Addressed by: https://review.openstack.org/138243
    Share admin_password unit test between V2 & V2.1

Addressed by: https://review.openstack.org/138254
    Add more exceptions handle when change server password (v2)

Addressed by: https://review.openstack.org/115848
    Convert v3/v2.1 extension info to present v2 API format

Addressed by: https://review.openstack.org/138972
    Move admin_only_action_common out of v3 directory(cleanup)

Addressed by: https://review.openstack.org/138599
    Convert v2.1 extension_info to show V2 API extension list

Addressed by: https://review.openstack.org/139893
    Parse "networks" attribute if loading os-networks

Addressed by: https://review.openstack.org/139948
    Modify v21 alias name for compatible with v2

Addressed by: https://review.openstack.org/68338
    Add API schema for v2.1 block_device_mapping extension

Addressed by: https://review.openstack.org/140908
    Merge migrate server tests between V2 & V2.1

Addressed by: https://review.openstack.org/140915
    Cleanup in test_admin_actions

Addressed by: https://review.openstack.org/141283
    Add API schema for v2.1 block_device_mapping_v1

Addressed by: https://review.openstack.org/141691
    Fix update server test for strong input validation

Addressed by: https://review.openstack.org/141700
    Make rebuild server schema 'additionalProperties' False

Addressed by: https://review.openstack.org/141701
    Make resize server schema 'additionalProperties' False

Addressed by: https://review.openstack.org/141709
    Cleanup in admin_actions(v2.1api)

Addressed by: https://review.openstack.org/141719
    Make create server schema 'additionalProperties' False

Addressed by: https://review.openstack.org/141726
    Move test_extension_info from V3 dir to V2.1

Moving to kilo-2, as its not got all its changes merged yet. --johnthetubaguy 16th December 2014

Addressed by: https://review.openstack.org/142312
    Cleanup in ResourceExtension ALIAS(v2.1api)

Addressed by: https://review.openstack.org/142368
    Cleanup in ResourceExtension ALIAS(v2.1api)

Addressed by: https://review.openstack.org/142993
    Make direct call to controller in test_console_auth_tokens

Addressed by: https://review.openstack.org/142995
    Call controller methods directly in test_console_output

Addressed by: https://review.openstack.org/143012
    Make test_consoles to directly call controller methods

Addressed by: https://review.openstack.org/143360
    Cleanup in test_availability_zone not to use wsgi_app

Addressed by: https://review.openstack.org/143377
    Call controller methods directly in test_evacuate

Addressed by: https://review.openstack.org/143793
    Cleanup in test_keypairs not to use wsgi_app

Addressed by: https://review.openstack.org/143920
    Use controller methods in test_floating_ips

Addressed by: https://review.openstack.org/143928
    Call controller methods directly in test_multinic

Addressed by: https://review.openstack.org/143930
    Use controller methods directly in test_rescue

Addressed by: https://review.openstack.org/143931
    Add API schema for v2.1/v3 server actions

Addressed by: https://review.openstack.org/144061
    Make direct call to controller test_server_password

Addressed by: https://review.openstack.org/144071
    Tests with controller methods in test_simple_tenant_usage

Addressed by: https://review.openstack.org/144079
    Calling controller methods directly in test_snapshots

Addressed by: https://review.openstack.org/144087
    Add API schema for v2.1 createImage API

Addressed by: https://review.openstack.org/144092
    Add parameter_types.ip_address for cleanup

Addressed by: https://review.openstack.org/144105
    Convert wsgi call to controller in test_virtual_interfaces

Addressed by: https://review.openstack.org/144575
    Use controller methods directly in test_admin_password

Addressed by: https://review.openstack.org/144869
    Re-calculate resource usage after suspending vm and resuming vm. Add RPC call resume_instance() in nova scheduler so that nova scheduler will be invoked before resuming instance on compute node. Related with bug 1402502: 'Resource usage will not be update

Addressed by: https://review.openstack.org/144930
    Remove unused function _get_flavor_refs in flavor_access extension

Addressed by: https://review.openstack.org/145398
    Add checking changePassword None in _action_change_password(v2)

Addressed by: https://review.openstack.org/145687
    Make V2.1 servers filtering (--tenant-id) same as V2

Addressed by: https://review.openstack.org/147208
    Remove HTTPRequestV3 in scheduler_hints test

Addressed by: https://review.openstack.org/147176
    Make test re-use HTTPReuqest part 1

Addressed by: https://review.openstack.org/147190
    Make test re-use HTTPReuqest part 2

Addressed by: https://review.openstack.org/147204
    Make test re-use HTTPReuqest part 3

Addressed by: https://review.openstack.org/148073
    Make test re-use HTTPReuqest part 5

Addressed by: https://review.openstack.org/148021
    Make test re-use HTTPReuqest part 4

Addressed by: https://review.openstack.org/148445
    Use controller method in all admin actions tests

Addressed by: https://review.openstack.org/138652
    Add policy check for consoles

Addressed by: https://review.openstack.org/148835
    Merge evacuate extension tests in test_evacuate

Addressed by: https://review.openstack.org/149145
    Remove wsgi_app usage from test_server_actions

Addressed by: https://review.openstack.org/149497
    Make use of controller method in test_flavor_manage

Addressed by: https://review.openstack.org/149948
    WIP: Change v2.1 API status to CURRENT

Unsure on status, moving to kilo-3 for now --johnthetubaguy 26th Jan 2015

Addressed by: https://review.openstack.org/150324
    Add API schema for v2.1 'addFloatingIp'

Addressed by: https://review.openstack.org/150331
    Add API schema for v2.1 'removeFloatingIp'

Addressed by: https://review.openstack.org/151131
    Add JSON schema for "associate_host" API

Addressed by: https://review.openstack.org/151986
    Add JSON schema for v2.1 add network API

Addressed by: https://review.openstack.org/152003
    Fix expected error in V2.1 add network API

Addressed by: https://review.openstack.org/152386
    Add JSON schema for v2.1 'quota_class' API

Addressed by: https://review.openstack.org/153099
    Add missing setup.cfg entry for os-user-data plugin

Addressed by: https://review.openstack.org/153135
    Add more tests for tenant network API

Addressed by: https://review.openstack.org/153137
    Extract preserve ephemeral on rebuild from servers plugin

Addressed by: https://review.openstack.org/153154
    Remove v1.1 from v2.1 extension description

Addressed by: https://review.openstack.org/153436
    Add API schema for v2.1 tenant networks API

Addressed by: https://review.openstack.org/153466
    Change some v2.1 extension names to v2

Addressed by: https://review.openstack.org/153935
    Sync simple_tenant_usage V2.1 exception with V2

Addressed by: https://review.openstack.org/154434
    Implement api samples test for os-baremetal-nodes

Addressed by: https://review.openstack.org/154453
    Change functional tests to use V2.1 URL instead of V3

Addressed by: https://review.openstack.org/154459
    Remove V3 API from api-paste.ini

Addressed by: https://review.openstack.org/154714
    Implement api samples test for os-baremetal-nodes Part 2

Addressed by: https://review.openstack.org/154775
    Add test case for test_simple_tenant_usage

Addressed by: https://review.openstack.org/155265
    Fix NotImplementedError handling in interfaces API

Addressed by: https://review.openstack.org/156882
    Add developer documentation for writing V2.1 API plugins

Addressed by: https://review.openstack.org/158201
    Make ServerVirtualInterfaceTestV21 inherit from test.NoDBTestCase

Addressed by: https://review.openstack.org/159352
    Remove accessips attribute from V2.1 POST server resp

Gerrit topic: https://review.openstack.org/#q,topic:quota,n,z

Addressed by: https://review.openstack.org/159399
    Remove 'id' from V2.1 update quota_set resp

Addressed by: https://review.openstack.org/159689
    Remove 'locked_by' from V2.1 extended server status

Addressed by: https://review.openstack.org/159708
    Remove OS-EXT-IPS attributes from V2.1 server ips

Gerrit topic: https://review.openstack.org/#q,topic:bug/1426241,n,z

Addressed by: https://review.openstack.org/159767
    Disables pci plugin for v2.1 & microversions

Addressed by: https://review.openstack.org/160150
    Remove attach/detach/swap from V2.1 extended_volumes

Addressed by: https://review.openstack.org/159742
    Change v3 import to v21 in 2.1 api unit test

Addressed by: https://review.openstack.org/161112
    Remove extended addresses from V2.1 update & rebuild

Addressed by: https://review.openstack.org/162869
    Clean up Fake_Url for unit test of flavor_access

Since we have hit feature proposal freeze, marking this as ready to review. Please no more "new code" should be uploaded as we try to get the current items merged before feature freeze. While the tests can merge post freeze, lets try to complete the non-test code inside this blueprint to help with tracking. --johnthetubaguy 10th March 2015

Addressed by: https://review.openstack.org/163697
    Add and use raise_http_not_implemented_error()

Addressed by: https://review.openstack.org/163698
    Add a hacking rule for consistent HTTP501 message

Remaining work is docs and test clean up, so marking this as complete, for the sake of the feature bits in kilo. --johnthetubaguy 19th March 2015

Addressed by: https://review.openstack.org/172771
    Add the description about v2.1 API validation

Addressed by: https://review.openstack.org/172856
    Add min/max of API microversions to version API

Addressed by: https://review.openstack.org/278383
    Revert "Fix wrong exception return in fixed_ips v2 extention"

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.