/usr/lib/python2.6/site-packages/novaclient
Edit: /usr/lib/python2.6/site-packages/novaclient/api_versions.pyc (13706B)
Ñò
=vVc @ st d d k Z d d k Z d d k Z d d k Z d d k Z d d k l Z d d k Z d d k l Z d d k l
Z
l Z d d k l
Z
d d k l Z e i e ƒ Z e i p e i e i ƒ ƒ n h d d 6Z h Z e
d ƒ Z d
e f d „ ƒ YZ d e f d
„ ƒ YZ d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z! d d „ Z# d d „ Z$ d S( iÿÿÿÿN( t strutils( t
exceptions( t _t _LW( t cliutils( t utilst 2s 1.1s. '%(other)s' should be an instance of '%(cls)s't
APIVersionc 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 d
„ Z RS( s¬ This class represents an API Version with convenience
methods for manipulation and comparison of version
numbers that we need to do to implement microversions.
c C s¼ d | _ d | _ | d j o™ t i d | ƒ } | o] t | i d ƒ ƒ | _ | i d ƒ d j o t d ƒ | _ q´ t | i d ƒ ƒ | _ q¸ t d ƒ | } t i
| ƒ ‚ n d S( s Create an API version object.i s! ^([1-9]\d*)\.([1-9]\d*|0|latest)$i i t latestt infsw Invalid format of client version '%s'. Expected format 'X.Y', where X is a major part and Y is a minor part of version.N( t ver_majort ver_minort Nonet ret matcht intt groupt floatR R t UnsupportedVersion( t selft version_strR t msg( ( sB /tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt __init__/ s
c C s- | i ƒ o d | i Sd | i | i f S( s' Debug/Logging representation of object.s Latest API Version Major: %ss API Version Major: %s, Minor: %s( t is_latestR
R ( R ( ( sB /tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt __str__E s
c C s$ | i ƒ o d Sd | i ƒ Sd S( Ns
s ( t is_nullt
get_string( R ( ( sB /tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt __repr__L s
c C s | i d j o
| i d j S( Ni ( R
R ( R ( ( sB /tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyR R s c C s | i t d ƒ j S( NR ( R R ( R ( ( sB /tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyR U s c C sW t | t ƒ p% t t h | d 6| i d 6ƒ ‚ n | i | i f | i | i f j S( Nt othert cls( t
isinstanceR t TypeErrort _type_error_msgt __class__R
R ( R R ( ( sB /tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt __lt__X s
c C sW t | t ƒ p% t t h | d 6| i d 6ƒ ‚ n | i | i f | i | i f j S( NR R ( R R R R R! R
R ( R R ( ( sB /tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt __eq__` s
c C sW t | t ƒ p% t t h | d 6| i d 6ƒ ‚ n | i | i f | i | i f j S( NR R ( R R R R R! R
R ( R R ( ( sB /tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt __gt__h s
c C s | | j p
| | j S( N( ( R R ( ( sB /tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt __le__p s c C s | i | ƒ S( N( R# ( R R ( ( sB /tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt __ne__s s c C s | | j p
| | j S( N( ( R R ( ( sB /tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt __ge__v s c C s | i ƒ o t t d ƒ ƒ ‚ n | i ƒ o | i ƒ o t S| i ƒ o | | j S| i ƒ o | | j S| | j o | j 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
s* Null APIVersion doesn't support 'matches'.N( R t
ValueErrorR t True( R t min_versiont max_version( ( sB /tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt matchesy s
c C sV | i ƒ o t t d ƒ ƒ ‚ n | i ƒ o d | i d f Sd | i | i f S( sƒ Converts object to string representation which if used to create
an APIVersion object results in the same version.
s. Null APIVersion cannot be converted to string.s %s.%sR ( R R( R R R
R ( R ( ( sB /tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyR ’ s
N( t __name__t
__module__t __doc__R R R R R R R" R# R$ R% R&