Repository URL to install this package:
|
Version:
2.5 ▾
|
ó
±EYc @ s d d l Z d d l m Z d d l m Z d Z d Z d Z e Z d Z d Z
d Z d
Z e e d Z
d e f d
YZ d S( iÿÿÿÿN( t exception( t _sP
REST API Version History:
* 2.1 - Initial version. Equivalent to v2.0 code
* 2.2 - Adds (keypair) type parameter for os-keypairs plugin
Fixes success status code for create/delete a keypair method
* 2.3 - Exposes additional os-extended-server-attributes
Exposes delete_on_termination for os-extended-volumes
* 2.4 - Exposes reserved field in os-fixed-ips.
* 2.5 - Allow server search option ip6 for non-admin
* 2.6 - Consolidate the APIs for getting remote consoles
* 2.7 - Check flavor type before add tenant access.
* 2.8 - Add new protocol for VM console (mks)
* 2.9 - Exposes lock information in server details.
* 2.10 - Allow admins to query, create and delete keypairs owned by any
user.
* 2.11 - Exposes forced_down attribute for os-services
* 2.12 - Exposes VIF net_id in os-virtual-interfaces
* 2.13 - Add project id and user id information for os-server-groups API
* 2.14 - Remove onSharedStorage from evacuate request body and remove
adminPass from the response body
* 2.15 - Add soft-affinity and soft-anti-affinity policies
* 2.16 - Exposes host_status for servers/detail and servers/{server_id}
* 2.17 - Add trigger_crash_dump to server actions
* 2.18 - Makes project_id optional in v2.1
* 2.19 - Allow user to set and get the server description
* 2.20 - Add attach and detach volume operations for instances in shelved
and shelved_offloaded state
* 2.21 - Make os-instance-actions read deleted instances
* 2.22 - Add API to force live migration to complete
* 2.23 - Add index/show API for server migrations.
Also add migration_type for /os-migrations and add ref link for it
when the migration is an in progress live migration.
* 2.24 - Add API to cancel a running live migration
* 2.25 - Make block_migration support 'auto' and remove
disk_over_commit for os-migrateLive.
* 2.26 - Adds support of server tags
* 2.27 - Adds support for new-style microversion headers while
keeping support for the original style.
* 2.28 - Changes compute_node.cpu_info from string to object
* 2.29 - Add a force flag in evacuate request body and change the
behaviour for the host flag by calling the scheduler.
* 2.30 - Add a force flag in live-migrate request body and change the
behaviour for the host flag by calling the scheduler.
* 2.31 - Fix os-console-auth-tokens to work for all console types.
* 2.32 - Add tag to networks and block_device_mapping_v2 in server boot
request body.
* 2.33 - Add pagination support for hypervisors.
* 2.34 - Checks before live-migration are made in asynchronous way.
os-Migratelive Action does not throw badRequest in case of
pre-checks failure. Verification result is available over
instance-actions.
* 2.35 - Adds keypairs pagination support.
* 2.36 - Deprecates all the API which proxy to another service and fping
API.
* 2.37 - Adds support for auto-allocating networking, otherwise known as
"Get me a Network". Also enforces server.networks.uuid to be in
UUID format.
* 2.38 - Add a condition to return HTTPBadRequest if invalid status is
provided for listing servers.
s 2.1s 2.38s 2.35s 2.36c C s
t t S( N( t APIVersionRequestt _MIN_API_VERSION( ( ( s[ /home/tvault/.virtenv/lib/python2.7/site-packages/nova/api/openstack/api_version_request.pyt min_api_versionv s c C s
t t S( N( R t _MAX_API_VERSION( ( ( s[ /home/tvault/.virtenv/lib/python2.7/site-packages/nova/api/openstack/api_version_request.pyt max_api_versionz s c C s' t | | j k o$ t | k SS( s Check if API request version satisfies version restrictions.
:param req: request object
:param min_version: minimal version of API needed for correct
request processing
:param max_version: maximum version of API needed for correct
request processing
:returns True if request satisfies minimal and maximum API version
requirements. False in other case.
( R t api_version_request( t reqt min_versiont max_version( ( s[ /home/tvault/.virtenv/lib/python2.7/site-packages/nova/api/openstack/api_version_request.pyt is_supported~ s R c B s} e Z d Z d
d Z d Z d Z d Z d Z d Z d Z
d Z d Z d
Z
d Z d Z RS( s´ This class represents an API Version Request with convenience
methods for manipulation and comparison of version
numbers that we need to do to implement microversions.
c C s d | _ d | _ | d k r~ t j d | } | ri t | j d | _ t | j d | _ q~ t j d | n d S( s+ Create an API version request object.
:param version_string: String representation of APIVersionRequest.
Correct format is 'X.Y', where 'X' and 'Y' are int values.
None value should be used to create Null APIVersionRequest,
which is equal to 0.0
i s ^([1-9]\d*)\.([1-9]\d*|0)$i i t versionN( t ver_majort ver_minort Nonet ret matcht intt groupR t InvalidAPIVersionString( t selft version_stringR ( ( s[ /home/tvault/.virtenv/lib/python2.7/site-packages/nova/api/openstack/api_version_request.pyt __init__ s c C s d | j | j f S( s' Debug/Logging representation of object.s( API Version Request Major: %s, Minor: %s( R
R ( R ( ( s[ /home/tvault/.virtenv/lib/python2.7/site-packages/nova/api/openstack/api_version_request.pyt __str__ª s c C s | j d k o | j d k S( Ni ( R
R ( R ( ( s[ /home/tvault/.virtenv/lib/python2.7/site-packages/nova/api/openstack/api_version_request.pyt is_null¯ s c C s% t t d i | d 6| j d 6 S( Ns. '%(other)s' should be an instance of '%(cls)s't othert cls( t TypeErrorR t __class__( R R ( ( s[ /home/tvault/.virtenv/lib/python2.7/site-packages/nova/api/openstack/api_version_request.pyt _format_type_error² s c C sC t | t s! | j | n | j | j f | j | j f k S( N( t
isinstanceR R R
R ( R R ( ( s[ /home/tvault/.virtenv/lib/python2.7/site-packages/nova/api/openstack/api_version_request.pyt __lt__¶ s c C sC t | t s! | j | n | j | j f | j | j f k S( N( R R R R
R ( R R ( ( s[ /home/tvault/.virtenv/lib/python2.7/site-packages/nova/api/openstack/api_version_request.pyt __eq__½ s c C sC t | t s! | j | n | j | j f | j | j f k S( N( R R R R
R ( R R ( ( s[ /home/tvault/.virtenv/lib/python2.7/site-packages/nova/api/openstack/api_version_request.pyt __gt__Ä s c C s | | k p | | k S( N( ( R R ( ( s[ /home/tvault/.virtenv/lib/python2.7/site-packages/nova/api/openstack/api_version_request.pyt __le__Ë s c C s | j | S( N( R! ( R R ( ( s[ /home/tvault/.virtenv/lib/python2.7/site-packages/nova/api/openstack/api_version_request.pyt __ne__Î s c C s | | k p | | k S( N( ( R R ( ( s[ /home/tvault/.virtenv/lib/python2.7/site-packages/nova/api/openstack/api_version_request.pyt __ge__Ñ s c C sy | j r t n | j r1 | j r1 t S| j rG | | k S| j r] | | k S| | k or | k SSd S( sä Returns whether the version object represents a version
greater than or equal to the minimum version and less than
or equal to the maximum version.
@param min_version: Minimum acceptable version.
@param max_version: Maximum acceptable version.
@returns: boolean
If min_version is null then there is no minimum limit.
If max_version is null then there is no maximum limit.
If self is null then raise ValueError
N( R t
ValueErrort True( R R R
( ( s[ /home/tvault/.virtenv/lib/python2.7/site-packages/nova/api/openstack/api_version_request.pyt matchesÔ s
c C s) | j r t n d | j | j f S( s Converts object to string representation which if used to create
an APIVersionRequest object results in the same version request.
s %s.%s( R R&