Commit Graph

47 Commits

Author SHA1 Message Date
Matt Riedemann d727795d66 Add REST API support for get me a network
This adds the 2.37 microversion to the REST API for automatically
allocating a network, i.e. get me a network.

The majority of the changes to the REST API concern request
validation. 'networks' is now required in the server POST body
after this microversion. The 'auto' or 'none' special network
uuid values are used, but if specified, can not be specified
with any other requested network values.

The other special case that is checked is when the minimum
compute service version is not new enough to support this change,
i.e. a Mitaka compute will not have the network API code that
knows how to deal with the special auto/none network IDs. Because
the REST API is checking the service version, the service caches
the service version after the first check. Once all computes are
updated to Newton then a restart of the nova-api service(s) will
be required to flush the cache. A release note is provided for
this situation.

The api-ref docs are also updated for this microversion including
an example API sample request.

The matching Tempest change to test this is here:

I89b18709e0cfbbcbf9be96a91a13a1356cdf85b0

The matching python-novaclient change is here:

I6636ddcd3be7bf393d2d69cc6c1ba5c7d65ff674

Implements blueprint get-me-a-network

Change-Id: I89b18709e0cfbbcbf9be96a91a13a1356cdf85b0
2016-08-15 14:10:42 -04:00
He Jie Xu 8639559f61 Remove the useless version calculation for proxy api deprecated version
This patch use constant instead of the calculation for the proxy API
deprecated version. This is more readable.

Partially implements blueprint deprecate-api-proxies

Change-Id: I5e9972643a7dd2e2559f7f9593b85618df2647c3
2016-07-28 20:45:28 +08:00
He Jie Xu 1794fae8f3 Bump Microversion to 2.36 for Proxy API deprecation
This is the final patch in this series. This patch bumps the
microversion to 2.36, all the proxy APIs were deprecated.

Partially implements blueprint deprecate-api-proxies

Change-Id: I1a8a44530be29292561e90d6f7bd7ed512a88ee3
2016-07-26 19:26:37 +08:00
He Jie Xu ea0befc7ca Depracate Images Proxy APIs
This patch deprecates all proxy APIs for Images. All those APIs will
return 404 in new Microversion.

The deprecated API endpoint is '/images'

This patch doesn't bump the max API version, due to the patch
separation. The max API version will bump in the last patch.

Partially implements blueprint deprecate-api-proxies

Change-Id: I5be1dd94171177d959b77b112148978166c78810
2016-07-21 00:50:36 +08:00
Pavel Kholkin 47358449d3 Microversion 2.35 adds keypairs pagination support
After this microversion Nova API allows to get several keypairs
with the help of new optional parameters 'limit' and 'marker'
which were added to GET /os-keypairs request.

Partial-Bug: #1599904

Implements blueprint: keypairs-pagination

Change-Id: Idd3757f5be90ec4af1bd1a7ca3f9c20319dbfd33
2016-07-12 19:48:05 +03:00
Timofey Durakov 452be384cd rest api version bumped for async pre live migration checks
pre live-migration checks now are done in async way. This patch
updates rest api version to keep this tracked.

bp: async-live-migration-rest-check

Change-Id: I9fed3079d0f1b7de3ad1b3ecd309c93785fd11fe
2016-07-11 14:57:54 -07:00
liyingjun ec53c6c0ec Microversion 2.33 adds pagination support for hypervisors
When there are thousands of compute nodes, it would be slow to get the
whole hypervisor list, and it is bad for user experience to display
thousands of items in a table in horizon. This patch is proposed to
support pagination for hypervisor by adding `limit` and `marker` to
the list api.

Implements blueprint: pagination-for-hypervisor

Change-Id: Ie7f8b5c733b383f3e69fa23188e56257e503b5f7
2016-07-01 08:47:50 +08:00
Artom Lifshitz e83e114e1b Device tagging API support
This patch allows the user to specify a tag for a virtual network
interface and/or block device mapping when booting an instance.

Implements: blueprint bp/virt-device-role-tagging
Change-Id: I89247200f4cf1f644daf476727b4a6acb22b0cf6
2016-06-29 20:55:16 -07:00
Radoslav Gerganov 3c3925e71a Fix ConsoleAuthTokens to work for all console types
The current API allows getting connection info only for tokens which
correspond to RDP consoles. It should work for all types of tokens. This
patch introduces a new microversion which fixes this problem.

APIImpact

blueprint fix-console-auth-tokens

Change-Id: I27a65e0cd8b5eb51ecdc84cbf310ae107ff131dc
2016-06-22 17:11:09 +03:00
Sylvain Bauza 7aa2285e72 API change for verifying the scheduler when live migrating
After modifying the evacuate action, we now add a new microversion
change for modifying the live-migrate call so that the scheduler is
called when the admin user provides an hostname unless the force
field is provided.

APIImpact

Implements: blueprint check-destination-on-migrations-newton

Change-Id: I212cbb44f46d7cb36b5d8c74a79065d38fc526d8
2016-06-06 11:44:06 +02:00
Sylvain Bauza 86706785ff API change for verifying the scheduler when evacuating
Adding a new microversion for changing the evacuate action behaviour
to call the scheduler anyway unless the admin user provides a force
flag that then keeps the previous behaviour by forcing the conductor
to call the destination without verifying it.

Implements: blueprint check-destination-on-migrations

APIImpact

Change-Id: I9ecbe3d481bf17b12072511da4bb106ff1b6404e
2016-06-02 15:03:39 +02:00
Pavel Kholkin 228e916cdd Microversion 2.28 changes cpu_info string to JSON object
After this microversion Nova API the GET request to
/v2.1/os-hypervisors/{hypervisor_id} responses cpu_info
as regular JSON object instead of string.

Implements blueprint nova-api-hypervsor-cpu-info

Change-Id: I14db9017f69e70e759cc80d031f76af8be179e45
2016-06-01 16:25:17 +00:00
Chris Dent bd199e3f9b Support for both microversion headers
In this change the new OpenStack-API-Version headers is allowed,
but not required, for requesting a microversion.

Both headers are accepted in the request and both headers are sent in
the response (both the header and its value, and the addition to the Vary
header).

Many tests which explicitly use a microversion header have been
updated to use both. This change is not 100% as most of the tests
are testing the handling of the value of the header, not which
header is involved.

Partially-Implements: blueprint modern-microversions
Change-Id: I68da13b5ba0c2f3357523e765a5b9db81899daf1
2016-05-25 21:41:27 +00:00
Sergey Nikitin 537df23d85 Added server tags support in nova-api
Added new API microversion which allows the following:
- add tag to the server
- replace set of server tags with new set of tags
- get information about server, including list of tags for server
- get just list of tags for server
- check if tag exists on a server
- remove specified tag from server
- remove all tags from server
- search servers by tags

DocImpact
APIImpact

Implements: blueprint tag-instances

Change-Id: I9573aa52aae9f49945d8806ca5e52ada29fb087a
2016-04-06 16:38:21 +03:00
Matt Riedemann a9a0d646cf Fix v2.12 microversion REST API history doc
The attribute returned in the response body is 'net_id', not
'net-id'. We should be accurate in our REST API docs.

Change-Id: I4d6a8084fd73777a7dc5ebd58a462ada0627daf4
Related-Bug: #1496664
2016-03-07 11:53:49 -05:00
Eli Qiao f18a46c072 API: Improve os-migrateLive input parameters
This is os-migrateLive API changes:

    * 2.25 - Make block_migration to support 'auto' value, remove
             disk_over_commit.

Partially implements: blueprint making-live-migration-api-friendly
APIImpact
DocImpact
Change-Id: Ibb0d50f0f7444028ef9d0c294aea41edf0024b31
2016-02-29 17:44:17 +00:00
Andrea Rosa fa00292546 Abort an ongoing live migration
This change adds a DELETE call on the server-migrations object to cancel
a running live migration of a specific instance.
TO perform the cancellation the virtualization driver needs to support
it, in case that the feature is not supported we return an error.
We allow a cancellation of a migration only if the migration is
running at the moment of the request and if the migration type is equal
to 'live-migration'.
In this change we implement this feature for the libvirt driver.
When the cancellation of a live migration succeeded we rollback the live
migration and we set the state of the Migration object equals to
'cancelled'.
The implementation of this change is based on the work done by the
implementation of the feature called 'force live migration':
https://review.openstack.org/245921

DocImpact
ApiImpact

Implements blueprint: abort-live-migration
Change-Id: I1ff861e54997a069894b542bd764ac3ef1b3dbb2
2016-02-26 15:11:41 +00:00
ShaoHe Feng 98e4a64ad3 Add new APIs and deprecate old API for migrations
This patch does two things:
1. Add two APIs /servers/migrations:index/show for server migrations.
Two new novaclient commands server-migration-list and
server-migration-show will also be added.
ref: I071198fa9ba0699383bdebf4fab54714a435e6c3

2. Add ref link for /os-migrations
The old top-level resource `/os-migrations` won't be extended anymore.
It is deprecated.
Adding migration_type for it, also add ref link to
/servers/{uuid}/migrations/{id} for it when the migration is an
in progress migration.

Partially implements blueprint live-migration-progress-report

Change-Id: Ia92ecbe3c99082e3a34adf4fd29041b1a95ef21e
Co-authored-by: ShaoHe Feng <shaohe.feng@intel.com>
2016-02-26 14:25:48 +00:00
Pawel Koniszewski c9091d0871 Add new API to force live migration to complete
This change adds manual knob to force ongoing live migration to
complete. It is implemented as a new server-migrations API.

DocImpact
ApiImpact

Implements: blueprint pause-vm-during-live-migration
Change-Id: I034b4041414a797f65ede52db2963107f2ef7456
2016-02-08 08:59:52 +01:00
Mark Doffman 934a0e4ede Make os-instance-action read deleted instances.
Add a microversion change to the os-instance-actions API so that we
mutate the context to set 'read_deleted="yes"' when looking up the
instance.

Blueprint: os-instance-actions-read-deleted-instances
Change-Id: I607a28bbe06e20e17ee47a283e06b1d42b5c0e84
2016-02-05 07:59:52 -05:00
Andrea Rosa cf34a32820 Enable volume operations for shelved instances
This change enables the attach and detach volume operations for
instances which are in shelve and shelved_offloaded state.
The code to manage the actual attach and detach is implemented by this
change: https://review.openstack.org/259528
New tempest tests are going to be written for testing the new feature.

APIImpact
DocImpact by this change we are allowing operations which were not
allowed before, we need to track this change in the documentation.

Partially implements blueprint: volume-ops-when-shelved

Change-Id: I43b67a50d998d43a6ff78c917093c513231b6ff2
2016-02-03 17:51:26 +00:00
Chuck Carmack 4841cab03e REST API changes for user settable server description
This patches adds changes to the Nova REST API to allow
users to create a server with a description, rebuild
a server with a description, update the description,
and get the description in the server details.

Note: Future commits will be done to support the server
description in python-novaclient and openstack-client.

APIImpact

Implements blueprint: user-settable-server-description

Change-Id: I74b1a340c5ab98fdea2186e87dd13f42ce7c7661
2016-01-25 21:33:30 +00:00
Sean Dague 1f16a763e7 Make project_id optional in v2.1 urls
This introduces microversion 2.18 which signals that the {project_id}
is no longer required in URLs.

It tests this with an additional scenario in api_samples which makes
all the requests without the project_id in the url (using a different
noauth middleware to accomplish this).

Update the link fixer in the ApiSamples matching code to also update
for optional project_id. This is the least worse approach here,
because if we set request_api_version, then we have to duplicate the
entire template tree as well, which we definitely don't want to do, as
it now correctly handles either url form.

This updates the auth tests to bifurcate with testscenarios instead of
the subclass model, which makes for more consistent tests.

In order to support adding routes without project_id we have to be
able to restrict project_id something that doesn't match any of our
top level routes.

The default for this is [0-9a-f\-]+ which will match all of the
following:

 - keystone default generated project_ids [0-9a-f]{32}
 - integer project_ids (\d+) - known in use by RAX
 - uuids with dashes (no known users, but suspect there might be)

This can be overrided with the new (but already deprecated)
``project_id_regex`` config option.

NOTE: we used this feature to expand the regex to match 'fake' and
'openstack' as valid project ids in tests. Those concepts are deeply
embedded in our tests, and need to be unwound independently.

APIImpact

Implements bp:service-catalog-tng

Co-Authored-By: Augustina Ragwitz <auggy@cpan.org>
Change-Id: Id92251243d9e92f30e466419110fce5781304823
2016-01-24 06:38:15 -05:00
Tang Chen 30c6f49817 Add a REST API to trigger crash dump in an instance.
Change I9b649aafba011d537e3fe4eebef7a678ff6733e4 has added a
compute API to trigger crash dump in instance. This patch adds
the REST API to nova. It enables users to trigger crash dump in
an instance through REST API.

Change-Id: I6ed777ff637254b4b79417008f9055dd19fc7405
Implements: blueprint instance-crash-dump
Co-Authored-By: Hironori Shiina <shiina.hironori@jp.fujitsu.com>
Co-Authored-By: Tang Chen <tangchen@cn.fujitsu.com>
2016-01-20 09:42:50 +08:00
Tomi Juvonen 9345d5835f Add host_status attribute for servers/detail and servers/{server_id}
When a compute service fails, the power states of the hosted VMs are not
updated. A normal user querying his or her VMs does not get any indication
about the failure. Also there is no indication about maintenance.

This change will expose new attribute host_status to user querying his
VMs. Attribute is only seen if policy allows.

DocImpact: This adds API microversion
Implements blueprint get-valid-server-state
APIImpact

Change-Id: I5abea08bdc27624a7f23a7db8964f8c2a7b0eaa7
2016-01-16 20:07:49 +02:00
Balazs Gibizer 1c30edc5b2 api: add soft-affinity policies for server groups
Allows soft-affinity and soft-anti-affinity to be used as a policy
for the server group api extension. Add soft policies
to the JSONSchema, which validates server group definitions.
Bump API microversion to 2.15.

Implements: blueprint soft-affinity-for-server-group
Change-Id: I376bdba7df1344d269aa126f4896610baf2e16a2
2016-01-07 10:43:57 +01:00
Felix Li d900fe2419 Wrong spelling of defined
Change "definied" to "defined"

Change-Id: Ic5fa3313dc56e641b1bd43e34fcd294d32f92b25
2016-01-04 15:46:20 -05:00
Balazs Gibizer c01d16e81a Remove onSharedStorage from evacuate API
The patch I4217bd00d8c253db522241885dba2847a26af6df made the
on_shared_storge flag optional in the compute api in Liberty.
This patch removes the corresponding onSharedStorage flag from the
REST API as nova can easily detect this information.

APIImpact
DocImpact

Implements: bp remove-shared-storage-flag-in-evacuate-api
Change-Id: I54bfa1275e188573c1b95d770d89160a86cdf52c
2015-12-15 11:23:11 +01:00
Kevin_Zheng 6c74a145bc Add project-id and user-id when list server-groups
Currently, command "nova server-group-list" and
"nova server-group-get" doesn't return groups'
project id and user id information. It is really
hard to identify which group belong to which
project/user when admin user use this command
with option "--all-projects".

This patch add project-id and user-id to the list.
All os-server-groups APIs will contain the above
mentioned data in the response data.

DocImpact: This adds API microversion
APIImpact: Project id information will be returned for
os-servers-group API

Change-Id: I0405ed6271c33981578841cfade220758615b1fd
Implements: blueprint add-project-id-and-user-id
Partial-bug: #1481210
Depends-On: I167141676ef4f597a1c022c1fd5dc96fd55d02ad
2015-12-10 20:11:33 +08:00
Sergey Nikitin 2002120c45 Added method is_supported to check API microversions
Right now to check if some part of code supports
requested microversion developer usually:

 1. get a microversion from request.
 2. create instance of class APIVersionRequest
    with requested microversion.
 3. compare these two objects.

This check takes at least 2 lines and looks ugly.
Sometimes developers create unnecessary class fields
to store object APIVersionRequest with requested microversion.

To make nova code more readable and simple method
'is_supported' was created.

Microversion check with this method takes only one line
and code looks more beautiful.

Change-Id: I9078cfa1afad8b6b09583dac87fa757a0cc32daa
2015-11-13 19:27:52 +03:00
ghanshyam 45d1e3c1fa Expose VIF net-id attribute in os-virtual-interfaces
Adds a new microversion to show virtual interface 'net-id' in
virtual interface list.

DocImpact - See nova/api/openstack/rest_api_version_history.rst
for details

APIImpact

Implements blueprint add-vif-net-id-in-vif-list

Change-Id: Ic8b26df8d7e69bd71d23dfbc983fa3449c16fa7d
2015-08-27 16:50:44 +09:00
Andrey Kurilin 9e78de9fa9 Re-write way of compare APIVersionRequest's
`cmp` method was removed in Python 3, so it would be nice to use __lt__,
__le__, __eq__, __ne__, __gt__ and __ge__ instead, which are Py2 and Py3
compatible.

Change-Id: I1c89da0831b77b73f55d8681fd7d946535cc89b5
2015-08-18 15:36:44 +03:00
Andrey Kurilin c6c3d7c314 Store "null api version" as 0.0
Nova API doesn't have 0 version, so we can use 0.0 for Null APIVersion.
It will help to write simple comparison methods.

Change-Id: I9010007e6e5a92a378299ccb0d674b30fdabc365
2015-08-18 15:35:58 +03:00
Roman Dobosz ff80032bd4 New nova API call to mark nova-compute down
Introducing new API call for changing the new flag state for forcing
nova-compute state. This is done via adding new forced_down field to the
Service objects and its check in timeout affected service groups drivers.

Blueprint mark-host-down

APIImpact

Change-Id: I39f1a84c100726f87a4dc464dd9922d66efdb53f
2015-08-05 20:45:45 +02:00
Vladik Romanovsky 1b8a2e0a92 Adding user_id handling to keypair index, show and create api calls
Administering an openstack cluster I found the need to see what keypairs a
user had. I found this bug that was requesting the same thing and decided
to implement it. This is the update to the api server to handle a query
param passed to return a keypair list for a specific user-id. Only a user
with admin privileges is allowed to make this call.

Allowing the administrators to be able to list and get details of keypairs
which owned by users other than themselves, as well as creating new and
deleting keypairs on behalf of their users.

DocImpact: This adds API microversion
Implements blueprint admin-query-any-keypair
APIImpact
UpgradeImpact: Policy rules of the index, create, delete and show
               operations has been updated to support the change.
               os_compute_api:os-keypairs:{index, show, create, delete}:
               "rule:admin_api or user_id:%(user_id)s

Co-Authored-By: Dan Smith <dansmith@redhat.com>
Co-Authored-By: Dan Radez <dradez@redhat.com>
Closes-Bug: #1182965
Change-Id: I45846f770628e8f24a8c137dcdc46baa64c50801
2015-08-04 16:34:24 -07:00
Jenkins 7c66b2bcba Merge "Show 'locked' information in server details" 2015-07-31 16:03:32 +00:00
ghanshyam 49a572a043 Show 'locked' information in server details
Adds a new microversion to show server 'locked' information in
server details.

DocImpact - See nova/api/openstack/rest_api_version_history.rst
for details

APIImpact

Implements blueprint add-locking-information-in-server-get-response

Depends-on: I5be664c3e99adc37738f8b074f1891dad97497b1

Change-Id: I3e5dc6e37f130f70e3a861a9906bb062c6110742
2015-07-30 07:22:35 +00:00
Davanum Srinivas ed0196ebb6 Get py34 subunit.run test discovery to work
Currently the tox py34 target uses testtools.run to run
a subset of our test harness. We need to be able to use
pretty_tox.sh just like py27 as we make progress with py34
support.

The first step is to make sure we can discover all the
tests using:
python -m subunit.run discover -t . ./nova/tests/ --list

So, we need to fix a bunch of things for the discovery
to work including updating to a new version of websockify.

In the xen code, we should keep the original import and
add except for py34 as xen uses an older python that does
not work with six.moves.

Depends-On: Ib4ef2e79b28b7180e564b3d6dc2188456c66c08a
Change-Id: I88b6746da6136a7386a173f6cacd42f0b470deee
2015-07-28 10:40:56 +00:00
Radoslav Gerganov 14ca7c37ba Add MKS protocol for remote consoles
MKS is the native protocol for VMware consoles and this patch is adding
API support for it. For now there is only one console type for this
protocol and this is 'webmks'. A new microversion is introduced which
adds protocol 'mks' and type 'webmks' for requesting a remote console.

Example request:

POST /servers/<uuid>/remote-consoles
{
  "remote_console": {
    "protocol": "mks",
    "type": "webmks"
  }
}

Example response:

{
  "remote_console": {
    "protocol": "mks",
    "type": "webmks",
    "url": "http://example.com:6090/mks.html?token=XYZ"
  }
}

APIImpact
Implements: blueprint vmware-webmks-console

Change-Id: I7217b999fb8d64a5646d8f20d7426c26553871d7
2015-07-25 15:10:22 +03:00
jichenjc 6abb88befe Check flavor type before add tenant access
Currently we allow tenant access for public flavor, however,
we can't query it after that because flavor is public.
This patch adds check for add access function to raise exception
if the flavor is public.

Also, a nit change is use methods introduced in
793bcc07b9 to get flavor.

APIImpact: Adds new 2.7 API microversion due to new error condition
           in flavor access API
Implements blueprint check-flavor-type-before-add-tenant
Closes-Bug: #1361476

Change-Id: I461175e9969a0dd5b2b7ef75ea7d9f36f3a306d0
2015-07-24 15:36:29 +03:00
Radoslav Gerganov 578bafeda0 Consolidate the APIs for getting consoles
A new API is added with microversion 2.6:

POST /servers/<uuid>/remote-consoles
{
  "remote_console": {
    "protocol": ["vnc"|"rdp"|"serial"|"spice"],
    "type": ["novnc"|"xpvnc"|"rdp-html5"|"spice-html5"|"serial"]
  }
}

which supports all protocols and types for remote consoles.

Implements: blueprint consolidate-console-api

APIImpact

Change-Id: I175a778cede8fbeee9c47a502ab7a98f6d73c074
2015-07-03 11:03:36 +03:00
Jens Rosenboom 56feb2b649 Add microversion to allow server search option ip6 for non-admin
Currently the command "nova list --ip6 xxx" will return all servers for
non-admins, as the filter option is silently discarded. There is no
reason to treat ip6 different from ip, though, so we add a new
microversion that will allow this filter to be applied.

APIImpact: Filtering by ip6 will now be allowed for non-admin
DocImpact: Filtering by ip6 will now be allowed for non-admin
Implements blueprint allow-ip6-search-for-non-admin
Partial-Bug: 1450859
Change-Id: I26a0b576636bd7e6b4dd7d53ded05907397d2f26
2015-06-22 10:29:54 +02:00
Matt Riedemann 8886590f30 Show 'reserved' status in os-fixed-ips
Adds a new microversion to show the 'reserved' status on a FixedIP in
the os-fixed-ips extension.

Closes-Bug: #1249526

Implements blueprint show-reserved-status-in-os-fixed-ips-api

Change-Id: Iadaae393fce0c78dbdfd3b02958ddfd6276edb94
2015-05-15 10:38:47 -07:00
Alexandre Levine abc656d3d5 Add info for Standalone EC2 API to cut access to Nova DB.
This change adds properties to v2.1
os-extended-server-properties and os-extended-volumes nova APIs
in order to expose information which is required for the standalone
EC2 API implementation (resides on stackforge/ec2-api) to use only
public APIs. Right now this information is taken by directly accessing
internal Nova DB.
It adds proposed microversion v2.3.
It implements the spec "Nova changes required for standalone EC2 API
implementation" in this review: https://review.openstack.org/#/c/153636/

APIImpact
Implements: blueprint ec2-api

Change-Id: I850e51e730c82906f68fddb14fb0004d7091eb91
2015-03-05 19:19:23 +04:00
Chris Yeoh c836f425bc Adds keypair type in nova-api
X509 certificates are used by Windows for passwordless
authentication (WinRM) in a way which can be considered
consistent with the usage of SSH keys on Linux, as both
are based on public / private keypairs.

Enables nova-api to return the keypair type, updates
nova-api version to reflect the changes and updates the
unit and functional tests to validate the API changes.

Unit tests have been updated to ensure that the keypair
type is not being returned on previous API versions.

Note: x509 keypair implementation is added in the next
commit.

DocImpact - See nova/api/openstack/rest_api_version_history.rst
for details

APIImpact

Depends-On: Id5b210d7afe5c0a590abcbd42b9ff85b071a5c55

Co-Authored-By: Chris Yeoh <cyeoh@au1.ibm.com>
Partially implements: blueprint keypair-x509-certificates

Change-Id: I215662f2f92a01921a866c3218031787a9eaf915
2015-03-04 22:16:37 +00:00
Chris Yeoh d8a17851b4 Adds global API version check for microversions
Adds a check for a request that the version requested is within the
global API version range supported by the REST API. Both the minimum
and maximum are currently set to "2.1". The maximum will be increased
everytime an API change is made.

Also sets up some template/doc files for clearly documenting
the REST API changes with each microversion increment.

Partially implements blueprint api-microversions

Change-Id: Ie7fdb2928d957c03ed788c2ddd29fe798c645fce
2014-12-05 09:55:37 +08:00
Chris Yeoh bd84cf4a7a Adds APIVersionRequest class for API Microversions
Adds the APIVersionRequest class which handles converting the API
version requested from a request header string and supplies
comparison and matching methods used by microversions and REST
API code to determine what code paths to take.

Partially implements blueprint api-microversions

Change-Id: Ic75d36fc0d27b615e70e1fe56c1626e9e501b1d6
2014-11-28 11:07:25 +11:00